Commit ed891b72 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/actions/context-actions.c added actions & callback to select the

2004-06-16  Michael Natterer  <mitch@gimp.org>

	* app/actions/context-actions.c
	* app/actions/context-commands.[ch]: added actions & callback
	to select the first/last/prev/next tool.
parent 1209fb5d
2004-06-16 Michael Natterer <mitch@gimp.org>
* app/actions/context-actions.c
* app/actions/context-commands.[ch]: added actions & callback
to select the first/last/prev/next tool.
2004-06-16 Simon Budig <simon@gimp.org>
* modules/controller_linux_input.c: removed BTN_MISC,
......
......@@ -91,6 +91,26 @@ static GimpEnumActionEntry context_opacity_actions[] =
NULL }
};
static GimpEnumActionEntry context_tool_select_actions[] =
{
{ "context-tool-first", GTK_STOCK_GOTO_FIRST,
"First Tool", NULL, NULL,
GIMP_CONTEXT_SELECT_FIRST,
NULL },
{ "context-tool-last", GTK_STOCK_GOTO_LAST,
"Last Tool", NULL, NULL,
GIMP_CONTEXT_SELECT_LAST,
NULL },
{ "context-tool-previous", GTK_STOCK_GO_BACK,
"Previous Tool", NULL, NULL,
GIMP_CONTEXT_SELECT_PREVIOUS,
NULL },
{ "context-tool-next", GTK_STOCK_GO_FORWARD,
"Next Tool", NULL, NULL,
GIMP_CONTEXT_SELECT_NEXT,
NULL }
};
static GimpEnumActionEntry context_brush_select_actions[] =
{
{ "context-brush-first", GTK_STOCK_GOTO_FIRST,
......@@ -316,6 +336,10 @@ context_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (context_opacity_actions),
G_CALLBACK (context_opacity_cmd_callback));
gimp_action_group_add_enum_actions (group,
context_tool_select_actions,
G_N_ELEMENTS (context_tool_select_actions),
G_CALLBACK (context_tool_select_cmd_callback));
gimp_action_group_add_enum_actions (group,
context_brush_select_actions,
G_N_ELEMENTS (context_brush_select_actions),
......
......@@ -89,6 +89,18 @@ context_opacity_cmd_callback (GtkAction *action,
gimp_context_set_opacity (context, opacity);
}
void
context_tool_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
return_if_no_context (context, data);
context_select_object (context, context->gimp->tool_info_list,
(GimpContextSelectType) value);
}
void
context_brush_select_cmd_callback (GtkAction *action,
gint value,
......
......@@ -40,6 +40,9 @@ void context_opacity_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_tool_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment