Commit 3b6b3fc1 authored by Michael Natterer's avatar Michael Natterer 😴

app: GtkAction -> GAction madness part two

Change all action callbacks so they can be invoked by a GAction:

- add GimpActionCallback typedef:
  void (* cb) (GimpAction*, GVariant*, gpointer)
- change all action callbacks to the GimpActionCallback signature
- add "gimp-activate" and "gimp-change-state" signals to GimpAction,
  with the same signature as the resp. GAction signals
- remove all other custom action signals and only use the new
  GimpAction signals
- pass around appropriate GVariants containing booleans, int32,
  strings
- badly hack around to force a GimpProcedure pointer into a
  uint64 variant
- remove all G_CALLBACK() casts from all action callbacks,
  they all have the same signature now
parent c1802056
......@@ -48,7 +48,7 @@ static const GimpToggleActionEntry brush_editor_toggle_actions[] =
{
{ "brush-editor-edit-active", GIMP_ICON_LINKED,
NC_("brush-editor-action", "Edit Active Brush"), NULL, NULL,
G_CALLBACK (data_editor_edit_active_cmd_callback),
data_editor_edit_active_cmd_callback,
FALSE,
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
};
......
......@@ -46,43 +46,43 @@ static const GimpActionEntry brushes_actions[] =
{ "brushes-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
NC_("brushes-action", "_Open Brush as Image"), NULL,
NC_("brushes-action", "Open brush as image"),
G_CALLBACK (data_open_as_image_cmd_callback),
data_open_as_image_cmd_callback,
GIMP_HELP_BRUSH_OPEN_AS_IMAGE },
{ "brushes-new", GIMP_ICON_DOCUMENT_NEW,
NC_("brushes-action", "_New Brush"), NULL,
NC_("brushes-action", "Create a new brush"),
G_CALLBACK (data_new_cmd_callback),
data_new_cmd_callback,
GIMP_HELP_BRUSH_NEW },
{ "brushes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("brushes-action", "D_uplicate Brush"), NULL,
NC_("brushes-action", "Duplicate this brush"),
G_CALLBACK (data_duplicate_cmd_callback),
data_duplicate_cmd_callback,
GIMP_HELP_BRUSH_DUPLICATE },
{ "brushes-copy-location", GIMP_ICON_EDIT_COPY,
NC_("brushes-action", "Copy Brush _Location"), NULL,
NC_("brushes-action", "Copy brush file location to clipboard"),
G_CALLBACK (data_copy_location_cmd_callback),
data_copy_location_cmd_callback,
GIMP_HELP_BRUSH_COPY_LOCATION },
{ "brushes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
NC_("brushes-action", "Show in _File Manager"), NULL,
NC_("brushes-action", "Show brush file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback),
data_show_in_file_manager_cmd_callback,
GIMP_HELP_BRUSH_SHOW_IN_FILE_MANAGER },
{ "brushes-delete", GIMP_ICON_EDIT_DELETE,
NC_("brushes-action", "_Delete Brush"), NULL,
NC_("brushes-action", "Delete this brush"),
G_CALLBACK (data_delete_cmd_callback),
data_delete_cmd_callback,
GIMP_HELP_BRUSH_DELETE },
{ "brushes-refresh", GIMP_ICON_VIEW_REFRESH,
NC_("brushes-action", "_Refresh Brushes"), NULL,
NC_("brushes-action", "Refresh brushes"),
G_CALLBACK (data_refresh_cmd_callback),
data_refresh_cmd_callback,
GIMP_HELP_BRUSH_REFRESH }
};
......@@ -106,7 +106,7 @@ brushes_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group, "brushes-action",
brushes_edit_actions,
G_N_ELEMENTS (brushes_edit_actions),
G_CALLBACK (data_edit_cmd_callback));
data_edit_cmd_callback);
}
void
......
......@@ -45,13 +45,13 @@ static const GimpActionEntry buffers_actions[] =
{ "buffers-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
NC_("buffers-action", "Paste Buffer as _New Image"), NULL,
NC_("buffers-action", "Paste the selected buffer as a new image"),
G_CALLBACK (buffers_paste_as_new_image_cmd_callback),
buffers_paste_as_new_image_cmd_callback,
GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
{ "buffers-delete", GIMP_ICON_EDIT_DELETE,
NC_("buffers-action", "_Delete Buffer"), NULL,
NC_("buffers-action", "Delete the selected buffer"),
G_CALLBACK (buffers_delete_cmd_callback),
buffers_delete_cmd_callback,
GIMP_HELP_BUFFER_DELETE }
};
......@@ -107,7 +107,7 @@ buffers_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "buffers-action",
buffers_paste_actions,
G_N_ELEMENTS (buffers_paste_actions),
G_CALLBACK (buffers_paste_cmd_callback));
buffers_paste_cmd_callback);
}
void
......
......@@ -47,14 +47,14 @@
void
buffers_paste_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
GimpContext *context;
GimpBuffer *buffer;
GimpPasteType paste_type = (GimpPasteType) value;
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
container = gimp_container_view_get_container (editor->view);
context = gimp_container_view_get_context (editor->view);
......@@ -97,6 +97,7 @@ buffers_paste_cmd_callback (GimpAction *action,
void
buffers_paste_as_new_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
......@@ -125,6 +126,7 @@ buffers_paste_as_new_image_cmd_callback (GimpAction *action,
void
buffers_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
......
......@@ -20,11 +20,13 @@
void buffers_paste_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data);
void buffers_paste_as_new_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void buffers_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
......
......@@ -52,58 +52,58 @@ static const GimpActionEntry channels_actions[] =
{ "channels-edit-attributes", GIMP_ICON_EDIT,
NC_("channels-action", "_Edit Channel Attributes..."), NULL,
NC_("channels-action", "Edit the channel's name, color and opacity"),
G_CALLBACK (channels_edit_attributes_cmd_callback),
channels_edit_attributes_cmd_callback,
GIMP_HELP_CHANNEL_EDIT },
{ "channels-new", GIMP_ICON_DOCUMENT_NEW,
NC_("channels-action", "_New Channel..."), NULL,
NC_("channels-action", "Create a new channel"),
G_CALLBACK (channels_new_cmd_callback),
channels_new_cmd_callback,
GIMP_HELP_CHANNEL_NEW },
{ "channels-new-last-values", GIMP_ICON_DOCUMENT_NEW,
NC_("channels-action", "_New Channel"), NULL,
NC_("channels-action", "Create a new channel with last used values"),
G_CALLBACK (channels_new_last_vals_cmd_callback),
channels_new_last_vals_cmd_callback,
GIMP_HELP_CHANNEL_NEW },
{ "channels-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("channels-action", "D_uplicate Channel"), NULL,
NC_("channels-action",
"Create a duplicate of this channel and add it to the image"),
G_CALLBACK (channels_duplicate_cmd_callback),
channels_duplicate_cmd_callback,
GIMP_HELP_CHANNEL_DUPLICATE },
{ "channels-delete", GIMP_ICON_EDIT_DELETE,
NC_("channels-action", "_Delete Channel"), NULL,
NC_("channels-action", "Delete this channel"),
G_CALLBACK (channels_delete_cmd_callback),
channels_delete_cmd_callback,
GIMP_HELP_CHANNEL_DELETE },
{ "channels-raise", GIMP_ICON_GO_UP,
NC_("channels-action", "_Raise Channel"), NULL,
NC_("channels-action", "Raise this channel one step in the channel stack"),
G_CALLBACK (channels_raise_cmd_callback),
channels_raise_cmd_callback,
GIMP_HELP_CHANNEL_RAISE },
{ "channels-raise-to-top", GIMP_ICON_GO_TOP,
NC_("channels-action", "Raise Channel to _Top"), NULL,
NC_("channels-action",
"Raise this channel to the top of the channel stack"),
G_CALLBACK (channels_raise_to_top_cmd_callback),
channels_raise_to_top_cmd_callback,
GIMP_HELP_CHANNEL_RAISE_TO_TOP },
{ "channels-lower", GIMP_ICON_GO_DOWN,
NC_("channels-action", "_Lower Channel"), NULL,
NC_("channels-action", "Lower this channel one step in the channel stack"),
G_CALLBACK (channels_lower_cmd_callback),
channels_lower_cmd_callback,
GIMP_HELP_CHANNEL_LOWER },
{ "channels-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("channels-action", "Lower Channel to _Bottom"), NULL,
NC_("channels-action",
"Lower this channel to the bottom of the channel stack"),
G_CALLBACK (channels_lower_to_bottom_cmd_callback),
channels_lower_to_bottom_cmd_callback,
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
};
......@@ -111,25 +111,25 @@ static const GimpToggleActionEntry channels_toggle_actions[] =
{
{ "channels-visible", GIMP_ICON_VISIBLE,
NC_("channels-action", "Toggle Channel _Visibility"), NULL, NULL,
G_CALLBACK (channels_visible_cmd_callback),
channels_visible_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_VISIBLE },
{ "channels-linked", GIMP_ICON_LINKED,
NC_("channels-action", "Toggle Channel _Linked State"), NULL, NULL,
G_CALLBACK (channels_linked_cmd_callback),
channels_linked_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_LINKED },
{ "channels-lock-content", NULL /* GIMP_ICON_LOCK */,
NC_("channels-action", "L_ock Pixels of Channel"), NULL, NULL,
G_CALLBACK (channels_lock_content_cmd_callback),
channels_lock_content_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_LOCK_PIXELS },
{ "channels-lock-position", GIMP_ICON_TOOL_MOVE,
NC_("channels-action", "L_ock Position of Channel"), NULL, NULL,
G_CALLBACK (channels_lock_position_cmd_callback),
channels_lock_position_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_LOCK_POSITION }
};
......@@ -260,17 +260,17 @@ channels_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "channels-action",
channels_color_tag_actions,
G_N_ELEMENTS (channels_color_tag_actions),
G_CALLBACK (channels_color_tag_cmd_callback));
channels_color_tag_cmd_callback);
gimp_action_group_add_enum_actions (group, "channels-action",
channels_to_selection_actions,
G_N_ELEMENTS (channels_to_selection_actions),
G_CALLBACK (channels_to_selection_cmd_callback));
channels_to_selection_cmd_callback);
gimp_action_group_add_enum_actions (group, "channels-action",
channels_select_actions,
G_N_ELEMENTS (channels_select_actions),
G_CALLBACK (channels_select_cmd_callback));
channels_select_cmd_callback);
items_actions_setup (group, "channels");
}
......
......@@ -91,6 +91,7 @@ static void channels_edit_attributes_callback (GtkWidget *dialog,
void
channels_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -137,6 +138,7 @@ channels_edit_attributes_cmd_callback (GimpAction *action,
void
channels_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -182,6 +184,7 @@ channels_new_cmd_callback (GimpAction *action,
void
channels_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -208,6 +211,7 @@ channels_new_last_vals_cmd_callback (GimpAction *action,
void
channels_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -220,6 +224,7 @@ channels_raise_cmd_callback (GimpAction *action,
void
channels_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -232,6 +237,7 @@ channels_raise_to_top_cmd_callback (GimpAction *action,
void
channels_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -244,6 +250,7 @@ channels_lower_cmd_callback (GimpAction *action,
void
channels_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -256,6 +263,7 @@ channels_lower_to_bottom_cmd_callback (GimpAction *action,
void
channels_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -308,6 +316,7 @@ channels_duplicate_cmd_callback (GimpAction *action,
void
channels_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
......@@ -320,13 +329,13 @@ channels_delete_cmd_callback (GimpAction *action,
void
channels_to_selection_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data)
{
GimpChannelOps op;
GimpImage *image;
op = (GimpChannelOps) value;
op = (GimpChannelOps) g_variant_get_int32 (value);
if (GIMP_IS_COMPONENT_EDITOR (data))
{
......@@ -352,75 +361,84 @@ channels_to_selection_cmd_callback (GimpAction *action,
void
channels_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_visible_cmd_callback (action, image, GIMP_ITEM (channel));
items_visible_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_linked_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_linked_cmd_callback (action, image, GIMP_ITEM (channel));
items_linked_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_content_cmd_callback (action, image, GIMP_ITEM (channel));
items_lock_content_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_position_cmd_callback (action, image, GIMP_ITEM (channel));
items_lock_position_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_color_tag_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
GimpImage *image;
GimpChannel *channel;
GimpColorTag color_tag;
return_if_no_channel (image, channel, data);
color_tag = (GimpColorTag) g_variant_get_int32 (value);
items_color_tag_cmd_callback (action, image, GIMP_ITEM (channel),
(GimpColorTag) value);
color_tag);
}
void
channels_select_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
GimpChannel *channel2;
GimpContainer *container;
GimpImage *image;
GimpChannel *channel;
GimpChannel *channel2;
GimpContainer *container;
GimpActionSelectType type;
return_if_no_channel (image, channel, data);
type = (GimpActionSelectType) g_variant_get_int32 (value);
container = gimp_image_get_channels (image);
channel2 = (GimpChannel *) action_select_object ((GimpActionSelectType) value,
container,
channel2 = (GimpChannel *) action_select_object (type, container,
(GimpObject *) channel);
if (channel2 && channel2 != channel)
......
......@@ -19,46 +19,59 @@
#define __CHANNELS_COMMANDS_H__
void channels_edit_attributes_cmd_callback (GimpAction *action,
gpointer data);
void channels_new_cmd_callback (GimpAction *action,
gpointer data);
void channels_new_last_vals_cmd_callback (GimpAction *action,
gpointer data);
void channels_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_raise_cmd_callback (GimpAction *action,
gpointer data);
void channels_raise_to_top_cmd_callback (GimpAction *action,
gpointer data);
void channels_lower_cmd_callback (GimpAction *action,
gpointer data);
void channels_lower_to_bottom_cmd_callback (GimpAction *action,
gpointer data);
void channels_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_duplicate_cmd_callback (GimpAction *action,
gpointer data);
void channels_delete_cmd_callback (GimpAction *action,
gpointer data);
void channels_to_selection_cmd_callback (GimpAction *action,
gint value,
gpointer data);
void channels_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_visible_cmd_callback (GimpAction *action,
gpointer data);
void channels_linked_cmd_callback (GimpAction *action,
gpointer data);
void channels_lock_content_cmd_callback (GimpAction *action,
gpointer data);
void channels_lock_position_cmd_callback (GimpAction *action,
gpointer data);
void channels_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_linked_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_color_tag_cmd_callback (GimpAction *action,
gint value,
gpointer data);
void channels_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_select_cmd_callback (GimpAction *action,
gint value,
gpointer data);
void channels_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CHANNELS_COMMANDS_H__ */
......@@ -48,7 +48,7 @@ static const GimpActionEntry colormap_actions[] =
{ "colormap-edit-color", GIMP_ICON_EDIT,
NC_("colormap-action", "_Edit Color..."), NULL,
NC_("colormap-action", "Edit this color"),
G_CALLBACK (colormap_edit_color_cmd_callback),
colormap_edit_color_cmd_callback,
GIMP_HELP_INDEXED_PALETTE_EDIT }
};
......@@ -104,12 +104,12 @@ colormap_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "colormap-action",
colormap_add_color_actions,
G_N_ELEMENTS (colormap_add_color_actions),
G_CALLBACK (colormap_add_color_cmd_callback));
colormap_add_color_cmd_callback);
gimp_action_group_add_enum_actions (group, "colormap-action",
colormap_to_selection_actions,
G_N_ELEMENTS (colormap_to_selection_actions),
G_CALLBACK (colormap_to_selection_cmd_callback));
colormap_to_selection_cmd_callback);
}
void
......
......@@ -38,6 +38,7 @@
void
colormap_edit_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
......@@ -47,19 +48,22 @@ colormap_edit_color_cmd_callback (GimpAction *action,
void
colormap_add_color_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpImage *image;
gboolean background;
return_if_no_context (context, data);
return_if_no_image (image, data);
background = (gboolean) g_variant_get_int32 (value);
if (gimp_image_get_colormap_size (image) < 256)
{
GimpRGB color;
if (value)
if (background)
gimp_context_get_background (context, &color);
else
gimp_context_get_foreground (context, &color);
......@@ -71,7 +75,7 @@ colormap_add_color_cmd_callback (GimpAction *action,
void
colormap_to_selection_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data)
{
GimpColormapSelection *selection;
......@@ -86,7 +90,7 @@ colormap_to_selection_cmd_callback (GimpAction *action,
selection = GIMP_COLORMAP_SELECTION (editor->selection);
col_index = gimp_colormap_selection_get_index (selection, NULL);
op = (GimpChannelOps) value;
op = (GimpChannelOps) g_variant_get_int32 (value);
gimp_channel_select_by_index (gimp_image_get_mask (image),
gimp_image_get_active_drawable (image),
......
......@@ -20,12 +20,13 @@
void colormap_edit_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void colormap_add_color_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data);
void colormap_to_selection_cmd_callback (GimpAction *action,
gint value,
GVariant *value,
gpointer data);
......
......@@ -81,13 +81,13 @@ static const GimpActionEntry context_actions[] =
NC_("context-action", "_Default Colors"), "D",
NC_("context-action",
"Set foreground color to black, background color to white"),
G_CALLBACK (context_colors_default_cmd_callback),
context_colors_default_cmd_callback,
GIMP_HELP_TOOLBOX_DEFAULT_COLORS },
{ "context-colors-swap", GIMP_ICON_COLORS_SWAP,
NC_("context-action", "S_wap Colors"), "X",
NC_("context-action", "Exchange foreground and background colors"),
G_CALLBACK (context_colors_swap_cmd_callback),
context_colors_swap_cmd_callback,
GIMP_HELP_TOOLBOX_SWAP_COLORS }
};
......@@ -1098,145 +1098,145 @@ context_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "context-action",
context_palette_foreground_actions,
G_N_ELEMENTS (context_palette_foreground_actions),
G_CALLBACK (context_palette_foreground_cmd_callback));
context_palette_foreground_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_palette_background_actions,
G_N_ELEMENTS (context_palette_background_actions),
G_CALLBACK (context_palette_background_cmd_callback));
context_palette_background_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_colormap_foreground_actions,
G_N_ELEMENTS (context_colormap_foreground_actions),
G_CALLBACK (context_colormap_foreground_cmd_callback));
context_colormap_foreground_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_colormap_background_actions,
G_N_ELEMENTS (context_colormap_background_actions),
G_CALLBACK (context_colormap_background_cmd_callback));
context_colormap_background_cmd_callback);