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:
Michael Natterer 2004-10-23 10:28:56 +00:00 committed by Michael Natterer
parent 5256fb2c25
commit 6e9d0cfa5d
8 changed files with 54 additions and 31 deletions

View File

@ -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>
When there are variants of actions with and without dialog, let

View File

@ -275,6 +275,7 @@ select_stroke_cmd_callback (GtkAction *action,
}
dialog = stroke_dialog_new (GIMP_ITEM (gimp_image_get_mask (gimage)),
_("Stroke Selection"),
GIMP_STOCK_SELECTION_STROKE,
GIMP_HELP_SELECTION_STROKE,
widget);

View File

@ -362,6 +362,7 @@ vectors_stroke_cmd_callback (GtkAction *action,
}
dialog = stroke_dialog_new (GIMP_ITEM (vectors),
_("Stroke Path"),
GIMP_STOCK_PATH_STROKE,
GIMP_HELP_PATH_STROKE,
widget);

View File

@ -66,6 +66,7 @@ static void stroke_dialog_paint_info_selected (GimpContainerView *view,
GtkWidget *
stroke_dialog_new (GimpItem *item,
const gchar *title,
const gchar *stock_id,
const gchar *help_id,
GtkWidget *parent)
@ -97,21 +98,19 @@ stroke_dialog_new (GimpItem *item,
if (saved_desc)
gimp_config_sync (GIMP_CONFIG (saved_desc), GIMP_CONFIG (desc), 0);
/* the dialog */
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (item),
_("Stroke Options"), "gimp-stroke-options",
stock_id,
_("Choose Stroke Style"),
parent,
gimp_standard_help_func,
help_id,
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (item),
title, "gimp-stroke-options",
stock_id,
_("Choose Stroke Style"),
parent,
gimp_standard_help_func,
help_id,
GIMP_STOCK_RESET, RESPONSE_RESET,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
GIMP_STOCK_RESET, RESPONSE_RESET,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
stock_id, GTK_RESPONSE_OK,
NULL);
NULL);
g_signal_connect (dialog, "response",
G_CALLBACK (stroke_dialog_response),

View File

@ -23,6 +23,7 @@
GtkWidget * stroke_dialog_new (GimpItem *item,
const gchar *title,
const gchar *stock_id,
const gchar *help_id,
GtkWidget *parent);

View File

@ -1910,6 +1910,7 @@ gimp_vector_tool_stroke_vectors (GimpVectorTool *vector_tool,
}
dialog = stroke_dialog_new (GIMP_ITEM (vector_tool->vectors),
_("Stroke Path"),
GIMP_STOCK_PATH_STROKE,
GIMP_HELP_PATH_STROKE,
button);

View File

@ -206,7 +206,7 @@ gimp_stroke_editor_constructor (GType type,
gtk_box_pack_start (GTK_BOX (box), size, FALSE, FALSE, 0);
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_widget_show (expander);
@ -240,48 +240,54 @@ gimp_stroke_editor_constructor (GType type,
1.0, 1.0, 1,
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);
gtk_container_add (GTK_CONTAINER (frame), box);
gtk_widget_show (box);
dash_editor = gimp_dash_editor_new (editor->options);
gtk_widget_show (dash_editor);
button = g_object_new (GTK_TYPE_BUTTON,
"width-request", 14,
NULL);
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
gtk_widget_show (button);
g_signal_connect_object (button, "clicked",
G_CALLBACK (gimp_dash_editor_shift_left),
dash_editor, G_CONNECT_SWAPPED);
g_signal_connect_after (button, "expose-event",
G_CALLBACK (gimp_stroke_editor_paint_button),
button);
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (box), dash_editor, TRUE, TRUE, 0);
gtk_widget_show (dash_editor);
button = g_object_new (GTK_TYPE_BUTTON,
"width-request", 14,
NULL);
gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
gtk_widget_show (button);
g_signal_connect_object (button, "clicked",
G_CALLBACK (gimp_dash_editor_shift_right),
dash_editor, G_CONNECT_SWAPPED);
g_signal_connect_after (button, "expose-event",
G_CALLBACK (gimp_stroke_editor_paint_button),
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);
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_CALLBACK (gimp_stroke_editor_dash_preset),
editor->options);
@ -289,10 +295,6 @@ gimp_stroke_editor_constructor (GType type,
G_CALLBACK (gimp_int_combo_box_set_active),
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",
_("_Antialiasing"));

View File

@ -150,11 +150,11 @@ static GtkStockItem gimp_stock_items[] =
{ GIMP_STOCK_SELECTION_ADD, 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_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_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_SMOOTH, NULL, 0, 0, LIBGIMP_DOMAIN },