From 6bed69024f0d8f0bcee255d51cbc3dcba438443a Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 5 May 2004 01:17:23 +0000 Subject: [PATCH] removed action "select-by-color". 2004-05-05 Michael Natterer * app/actions/select-actions.c: removed action "select-by-color". * app/tools/gimpbycolorselecttool.c: add the shortcut here. * app/actions/tools-actions.c: added alternative tool actions for "by-color-select" and "rotate" which are identical to the ones generated from the GimpToolInfo except for their label. Make sure they have the same accelerators as the generated ones. * menus/image-menu.xml.in: use the alternative actions for "/Select/By Color" and "/Transform/Arbitrary Rotation...". --- ChangeLog | 15 +++++++++++++++ app/actions/select-actions.c | 16 ---------------- app/actions/tools-actions.c | 29 ++++++++++++++++++++++++++++- app/tools/gimpbycolorselecttool.c | 2 +- menus/image-menu.xml.in | 3 ++- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c5ec32bb6..a0b6e68774 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-05-05 Michael Natterer + + * app/actions/select-actions.c: removed action "select-by-color". + + * app/tools/gimpbycolorselecttool.c: add the shortcut here. + + * app/actions/tools-actions.c: added alternative tool actions for + "by-color-select" and "rotate" which are identical to the ones + generated from the GimpToolInfo except for their label. Make sure + they have the same accelerators as the generated ones. + + * menus/image-menu.xml.in: use the alternative actions for + "/Select/By Color" and + "/Transform/Arbitrary Rotation...". + 2004-05-05 Sven Neumann * libgimpwidgets/gimphelpui.c: documentation. diff --git a/app/actions/select-actions.c b/app/actions/select-actions.c index 633f498952..dee854501f 100644 --- a/app/actions/select-actions.c +++ b/app/actions/select-actions.c @@ -34,7 +34,6 @@ #include "actions.h" #include "select-actions.h" #include "select-commands.h" -#include "tools-commands.h" #include "vectors-commands.h" #include "gimp-intl.h" @@ -106,14 +105,6 @@ static GimpActionEntry select_actions[] = GIMP_HELP_SELECTION_TO_PATH } }; -static GimpStringActionEntry select_tool_actions[] = -{ - { "select-by-color", GIMP_STOCK_TOOL_BY_COLOR_SELECT, - N_("_By Color"), "O", NULL, - "gimp-by-color-select-tool", - GIMP_HELP_TOOL_BY_COLOR_SELECT } -}; - void select_actions_setup (GimpActionGroup *group) @@ -121,11 +112,6 @@ select_actions_setup (GimpActionGroup *group) gimp_action_group_add_actions (group, select_actions, G_N_ELEMENTS (select_actions)); - - gimp_action_group_add_string_actions (group, - select_tool_actions, - G_N_ELEMENTS (select_tool_actions), - G_CALLBACK (tools_select_cmd_callback)); } void @@ -158,8 +144,6 @@ select_actions_update (GimpActionGroup *group, SET_SENSITIVE ("select-from-vectors", lp && vectors); SET_SENSITIVE ("select-float", lp && sel); - SET_SENSITIVE ("select-by-color", lp); - SET_SENSITIVE ("select-feather", lp && sel); SET_SENSITIVE ("select-sharpen", lp && sel); SET_SENSITIVE ("select-shrink", lp && sel); diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c index 815885cfbd..e038c9e789 100644 --- a/app/actions/tools-actions.c +++ b/app/actions/tools-actions.c @@ -58,16 +58,43 @@ static GimpActionEntry tools_actions[] = GIMP_HELP_TOOLBOX_SWAP_COLORS } }; +static GimpStringActionEntry tools_alternative_actions[] = +{ + { "tools-by-color-select-short", GIMP_STOCK_TOOL_BY_COLOR_SELECT, + N_("_By Color"), NULL, NULL, + "gimp-by-color-select-tool", + GIMP_HELP_TOOL_BY_COLOR_SELECT }, + + { "tools-rotate-arbitrary", GIMP_STOCK_TOOL_ROTATE, + N_("_Arbitrary Rotation..."), NULL, NULL, + "gimp-rotate-tool", + GIMP_HELP_TOOL_ROTATE } +}; + void tools_actions_setup (GimpActionGroup *group) { - GList *list; + GtkAction *action; + GList *list; gimp_action_group_add_actions (group, tools_actions, G_N_ELEMENTS (tools_actions)); + gimp_action_group_add_string_actions (group, + tools_alternative_actions, + G_N_ELEMENTS (tools_alternative_actions), + G_CALLBACK (tools_select_cmd_callback)); + + action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), + "tools-by-color-select-short"); + gtk_action_set_accel_path (action, "/tools/tools-by-color-select"); + + action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), + "tools-rotate-arbitrary"); + gtk_action_set_accel_path (action, "/tools/tools-rotate"); + for (list = GIMP_LIST (group->gimp->tool_info_list)->list; list; list = g_list_next (list)) diff --git a/app/tools/gimpbycolorselecttool.c b/app/tools/gimpbycolorselecttool.c index 4f857b0b29..77d6153690 100644 --- a/app/tools/gimpbycolorselecttool.c +++ b/app/tools/gimpbycolorselecttool.c @@ -81,7 +81,7 @@ gimp_by_color_select_tool_register (GimpToolRegisterCallback callback, "gimp-by-color-select-tool", _("Select By Color"), _("Select regions by color"), - N_("_By Color Select"), NULL, + N_("_By Color Select"), "O", NULL, GIMP_HELP_TOOL_BY_COLOR_SELECT, GIMP_STOCK_TOOL_BY_COLOR_SELECT, data); diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in index 8ac1434a9c..5cffdb56a1 100644 --- a/menus/image-menu.xml.in +++ b/menus/image-menu.xml.in @@ -64,7 +64,7 @@ - + @@ -209,6 +209,7 @@ +