added labels ("_Stroke") to the SLEECTION_STROKE and PATH_STROKE stock
2004-10-23 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpstock.c: added labels ("_Stroke") to the SLEECTION_STROKE and PATH_STROKE stock items so they can be used in action areas. * app/widgets/gimpstrokeeditor.c: changed mnemonic to no clash with "_Stroke" and reordered some code. * app/dialogs/stroke-dialog.[ch]: use the passed stock_id instead of GTK_STOCK_OK. Added parameters to specify the dialog's title so it doesn't say "Stroke Options". * app/actions/select-commands.c * app/actions/vectors-commands.c * app/tools/gimpvectortool.c: pass "Stroke Selection" and "Stroke Path" as dialog titles.
This commit is contained in:

committed by
Michael Natterer

parent
5256fb2c25
commit
6e9d0cfa5d
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
|||||||
|
2004-10-23 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* libgimpwidgets/gimpstock.c: added labels ("_Stroke") to the
|
||||||
|
SLEECTION_STROKE and PATH_STROKE stock items so they can be used
|
||||||
|
in action areas.
|
||||||
|
|
||||||
|
* app/widgets/gimpstrokeeditor.c: changed mnemonic to no clash
|
||||||
|
with "_Stroke" and reordered some code.
|
||||||
|
|
||||||
|
* app/dialogs/stroke-dialog.[ch]: use the passed stock_id instead
|
||||||
|
of GTK_STOCK_OK. Added parameters to specify the dialog's title
|
||||||
|
so it doesn't say "Stroke Options".
|
||||||
|
|
||||||
|
* app/actions/select-commands.c
|
||||||
|
* app/actions/vectors-commands.c
|
||||||
|
* app/tools/gimpvectortool.c: pass "Stroke Selection" and "Stroke
|
||||||
|
Path" as dialog titles.
|
||||||
|
|
||||||
2004-10-23 Michael Natterer <mitch@gimp.org>
|
2004-10-23 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
When there are variants of actions with and without dialog, let
|
When there are variants of actions with and without dialog, let
|
||||||
|
@ -275,6 +275,7 @@ select_stroke_cmd_callback (GtkAction *action,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialog = stroke_dialog_new (GIMP_ITEM (gimp_image_get_mask (gimage)),
|
dialog = stroke_dialog_new (GIMP_ITEM (gimp_image_get_mask (gimage)),
|
||||||
|
_("Stroke Selection"),
|
||||||
GIMP_STOCK_SELECTION_STROKE,
|
GIMP_STOCK_SELECTION_STROKE,
|
||||||
GIMP_HELP_SELECTION_STROKE,
|
GIMP_HELP_SELECTION_STROKE,
|
||||||
widget);
|
widget);
|
||||||
|
@ -362,6 +362,7 @@ vectors_stroke_cmd_callback (GtkAction *action,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialog = stroke_dialog_new (GIMP_ITEM (vectors),
|
dialog = stroke_dialog_new (GIMP_ITEM (vectors),
|
||||||
|
_("Stroke Path"),
|
||||||
GIMP_STOCK_PATH_STROKE,
|
GIMP_STOCK_PATH_STROKE,
|
||||||
GIMP_HELP_PATH_STROKE,
|
GIMP_HELP_PATH_STROKE,
|
||||||
widget);
|
widget);
|
||||||
|
@ -66,6 +66,7 @@ static void stroke_dialog_paint_info_selected (GimpContainerView *view,
|
|||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
stroke_dialog_new (GimpItem *item,
|
stroke_dialog_new (GimpItem *item,
|
||||||
|
const gchar *title,
|
||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
const gchar *help_id,
|
const gchar *help_id,
|
||||||
GtkWidget *parent)
|
GtkWidget *parent)
|
||||||
@ -97,21 +98,19 @@ stroke_dialog_new (GimpItem *item,
|
|||||||
if (saved_desc)
|
if (saved_desc)
|
||||||
gimp_config_sync (GIMP_CONFIG (saved_desc), GIMP_CONFIG (desc), 0);
|
gimp_config_sync (GIMP_CONFIG (saved_desc), GIMP_CONFIG (desc), 0);
|
||||||
|
|
||||||
/* the dialog */
|
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (item),
|
||||||
dialog =
|
title, "gimp-stroke-options",
|
||||||
gimp_viewable_dialog_new (GIMP_VIEWABLE (item),
|
stock_id,
|
||||||
_("Stroke Options"), "gimp-stroke-options",
|
_("Choose Stroke Style"),
|
||||||
stock_id,
|
parent,
|
||||||
_("Choose Stroke Style"),
|
gimp_standard_help_func,
|
||||||
parent,
|
help_id,
|
||||||
gimp_standard_help_func,
|
|
||||||
help_id,
|
|
||||||
|
|
||||||
GIMP_STOCK_RESET, RESPONSE_RESET,
|
GIMP_STOCK_RESET, RESPONSE_RESET,
|
||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
stock_id, GTK_RESPONSE_OK,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_signal_connect (dialog, "response",
|
g_signal_connect (dialog, "response",
|
||||||
G_CALLBACK (stroke_dialog_response),
|
G_CALLBACK (stroke_dialog_response),
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
GtkWidget * stroke_dialog_new (GimpItem *item,
|
GtkWidget * stroke_dialog_new (GimpItem *item,
|
||||||
|
const gchar *title,
|
||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
const gchar *help_id,
|
const gchar *help_id,
|
||||||
GtkWidget *parent);
|
GtkWidget *parent);
|
||||||
|
@ -1910,6 +1910,7 @@ gimp_vector_tool_stroke_vectors (GimpVectorTool *vector_tool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialog = stroke_dialog_new (GIMP_ITEM (vector_tool->vectors),
|
dialog = stroke_dialog_new (GIMP_ITEM (vector_tool->vectors),
|
||||||
|
_("Stroke Path"),
|
||||||
GIMP_STOCK_PATH_STROKE,
|
GIMP_STOCK_PATH_STROKE,
|
||||||
GIMP_HELP_PATH_STROKE,
|
GIMP_HELP_PATH_STROKE,
|
||||||
button);
|
button);
|
||||||
|
@ -206,7 +206,7 @@ gimp_stroke_editor_constructor (GType type,
|
|||||||
gtk_box_pack_start (GTK_BOX (box), size, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (box), size, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (size);
|
gtk_widget_show (size);
|
||||||
|
|
||||||
expander = gtk_expander_new_with_mnemonic (_("Line _Style"));
|
expander = gtk_expander_new_with_mnemonic (_("_Line Style"));
|
||||||
gtk_box_pack_start (GTK_BOX (editor), expander, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (editor), expander, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (expander);
|
gtk_widget_show (expander);
|
||||||
|
|
||||||
@ -240,48 +240,54 @@ gimp_stroke_editor_constructor (GType type,
|
|||||||
1.0, 1.0, 1,
|
1.0, 1.0, 1,
|
||||||
FALSE, 0.0, 0.0);
|
FALSE, 0.0, 0.0);
|
||||||
|
|
||||||
|
frame = gtk_frame_new (NULL);
|
||||||
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
|
||||||
|
_("Dash pattern:"), 0.0, 0.5,
|
||||||
|
frame, 2, FALSE);
|
||||||
|
|
||||||
box = gtk_hbox_new (FALSE, 0);
|
box = gtk_hbox_new (FALSE, 0);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||||
|
gtk_widget_show (box);
|
||||||
|
|
||||||
dash_editor = gimp_dash_editor_new (editor->options);
|
dash_editor = gimp_dash_editor_new (editor->options);
|
||||||
gtk_widget_show (dash_editor);
|
|
||||||
|
|
||||||
button = g_object_new (GTK_TYPE_BUTTON,
|
button = g_object_new (GTK_TYPE_BUTTON,
|
||||||
"width-request", 14,
|
"width-request", 14,
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
|
||||||
|
gtk_widget_show (button);
|
||||||
|
|
||||||
g_signal_connect_object (button, "clicked",
|
g_signal_connect_object (button, "clicked",
|
||||||
G_CALLBACK (gimp_dash_editor_shift_left),
|
G_CALLBACK (gimp_dash_editor_shift_left),
|
||||||
dash_editor, G_CONNECT_SWAPPED);
|
dash_editor, G_CONNECT_SWAPPED);
|
||||||
g_signal_connect_after (button, "expose-event",
|
g_signal_connect_after (button, "expose-event",
|
||||||
G_CALLBACK (gimp_stroke_editor_paint_button),
|
G_CALLBACK (gimp_stroke_editor_paint_button),
|
||||||
button);
|
button);
|
||||||
gtk_widget_show (button);
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (box), dash_editor, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (box), dash_editor, TRUE, TRUE, 0);
|
||||||
|
|
||||||
gtk_widget_show (dash_editor);
|
gtk_widget_show (dash_editor);
|
||||||
|
|
||||||
button = g_object_new (GTK_TYPE_BUTTON,
|
button = g_object_new (GTK_TYPE_BUTTON,
|
||||||
"width-request", 14,
|
"width-request", 14,
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
|
||||||
|
gtk_widget_show (button);
|
||||||
|
|
||||||
g_signal_connect_object (button, "clicked",
|
g_signal_connect_object (button, "clicked",
|
||||||
G_CALLBACK (gimp_dash_editor_shift_right),
|
G_CALLBACK (gimp_dash_editor_shift_right),
|
||||||
dash_editor, G_CONNECT_SWAPPED);
|
dash_editor, G_CONNECT_SWAPPED);
|
||||||
g_signal_connect_after (button, "expose-event",
|
g_signal_connect_after (button, "expose-event",
|
||||||
G_CALLBACK (gimp_stroke_editor_paint_button),
|
G_CALLBACK (gimp_stroke_editor_paint_button),
|
||||||
NULL);
|
NULL);
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_widget_show (box);
|
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
|
||||||
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
|
|
||||||
_("Dash pattern:"), 0.0, 0.5, frame, 2, FALSE);
|
|
||||||
|
|
||||||
box = gimp_enum_combo_box_new (GIMP_TYPE_DASH_PRESET);
|
box = gimp_enum_combo_box_new (GIMP_TYPE_DASH_PRESET);
|
||||||
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (box), GIMP_DASH_CUSTOM);
|
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (box), GIMP_DASH_CUSTOM);
|
||||||
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
|
||||||
|
_("Dash preset:"), 0.0, 0.5,
|
||||||
|
box, 2, TRUE);
|
||||||
|
|
||||||
g_signal_connect (box, "changed",
|
g_signal_connect (box, "changed",
|
||||||
G_CALLBACK (gimp_stroke_editor_dash_preset),
|
G_CALLBACK (gimp_stroke_editor_dash_preset),
|
||||||
editor->options);
|
editor->options);
|
||||||
@ -289,10 +295,6 @@ gimp_stroke_editor_constructor (GType type,
|
|||||||
G_CALLBACK (gimp_int_combo_box_set_active),
|
G_CALLBACK (gimp_int_combo_box_set_active),
|
||||||
box, G_CONNECT_SWAPPED);
|
box, G_CONNECT_SWAPPED);
|
||||||
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
|
|
||||||
_("Dash preset:"), 0.0, 0.5, box, 2, TRUE);
|
|
||||||
|
|
||||||
gtk_widget_show (box);
|
|
||||||
|
|
||||||
button = gimp_prop_check_button_new (G_OBJECT (editor->options), "antialias",
|
button = gimp_prop_check_button_new (G_OBJECT (editor->options), "antialias",
|
||||||
_("_Antialiasing"));
|
_("_Antialiasing"));
|
||||||
|
@ -150,11 +150,11 @@ static GtkStockItem gimp_stock_items[] =
|
|||||||
{ GIMP_STOCK_SELECTION_ADD, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_SELECTION_ADD, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
{ GIMP_STOCK_SELECTION_SUBTRACT, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_SELECTION_SUBTRACT, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
{ GIMP_STOCK_SELECTION_INTERSECT, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_SELECTION_INTERSECT, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
{ GIMP_STOCK_SELECTION_STROKE, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_SELECTION_STROKE, N_("_Stroke"), 0, 0, LIBGIMP_DOMAIN },
|
||||||
{ GIMP_STOCK_SELECTION_TO_CHANNEL, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_SELECTION_TO_CHANNEL, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
{ GIMP_STOCK_SELECTION_TO_PATH, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_SELECTION_TO_PATH, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
|
|
||||||
{ GIMP_STOCK_PATH_STROKE, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_PATH_STROKE, N_("_Stroke"), 0, 0, LIBGIMP_DOMAIN },
|
||||||
|
|
||||||
{ GIMP_STOCK_CURVE_FREE, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_CURVE_FREE, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
{ GIMP_STOCK_CURVE_SMOOTH, NULL, 0, 0, LIBGIMP_DOMAIN },
|
{ GIMP_STOCK_CURVE_SMOOTH, NULL, 0, 0, LIBGIMP_DOMAIN },
|
||||||
|
Reference in New Issue
Block a user