Commit 417d0dcc authored by Michael Natterer's avatar Michael Natterer 😴

app: start porting away from GtkAction and friends

Step one: get rid of all those deprecation warnings that make
it hard to see any other warnings:

- add a lot of dummy API to GimpAction, GimpActionGroup, GimpUIManager
  etc. which simply forwards to the deprecated GTK functions, they
  will all go away again later
- rename GimpAction to GimpActionImpl
- add interface GimpAction that is implemented by all action classes,
  creates a common interface and allows to remove some duplicated
  logic from GimpToggleAction and GimpRadioAction, and at the same
  time adds more features

(cherry picked from commit 86e07c16)

Merged to gimp-2-10 to keep the diff to master as small as possible
parent 5801ee04
......@@ -22,6 +22,8 @@
#include "actions-types.h"
#include "widgets/gimptoggleaction.h"
#include "display/gimpcursorview.h"
#include "cursor-info-commands.h"
......@@ -36,7 +38,7 @@ cursor_info_sample_merged_cmd_callback (GtkAction *action,
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
active = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_cursor_view_set_sample_merged (view, active);
}
......@@ -28,6 +28,8 @@
#include "widgets/gimpdashboard.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpradioaction.h"
#include "widgets/gimptoggleaction.h"
#include "widgets/gimpuimanager.h"
#include "dialogs/dialogs.h"
......@@ -59,7 +61,8 @@ dashboard_update_interval_cmd_callback (GtkAction *action,
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GimpDashboardUpdateInteval update_interval;
update_interval = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
update_interval =
gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
gimp_dashboard_set_update_interval (dashboard, update_interval);
}
......@@ -72,7 +75,8 @@ dashboard_history_duration_cmd_callback (GtkAction *action,
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GimpDashboardHistoryDuration history_duration;
history_duration = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
history_duration =
gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
gimp_dashboard_set_history_duration (dashboard, history_duration);
}
......@@ -235,7 +239,8 @@ dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean low_swap_space_warning;
low_swap_space_warning = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
low_swap_space_warning =
gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
}
......
......@@ -23,6 +23,7 @@
#include "actions-types.h"
#include "widgets/gimpdataeditor.h"
#include "widgets/gimptoggleaction.h"
#include "data-editor-commands.h"
......@@ -36,7 +37,7 @@ data_editor_edit_active_cmd_callback (GtkAction *action,
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
gboolean edit_active;
edit_active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
edit_active = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_data_editor_set_edit_active (editor, edit_active);
}
......@@ -36,6 +36,7 @@
#include "gegl/gimp-gegl-utils.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpmenufactory.h"
#include "widgets/gimpuimanager.h"
......@@ -169,7 +170,7 @@ debug_dump_managers_cmd_callback (GtkAction *action,
"========================================\n\n",
entry->identifier);
g_print ("%s\n", gtk_ui_manager_get_ui (managers->data));
g_print ("%s\n", gimp_ui_manager_get_ui (managers->data));
}
}
}
......@@ -180,19 +181,19 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
{
GimpDisplay *display;
GimpImageWindow *window;
GtkUIManager *manager;
GimpUIManager *manager;
GtkAccelGroup *accel_group;
GList *group_it;
GList *strings = NULL;
return_if_no_display (display, data);
window = gimp_display_shell_get_window (gimp_display_get_shell (display));
manager = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
manager = gimp_image_window_get_ui_manager (window);
accel_group = gtk_ui_manager_get_accel_group (manager);
accel_group = gimp_ui_manager_get_accel_group (manager);
/* Gather formatted strings of keyboard shortcuts */
for (group_it = gtk_ui_manager_get_action_groups (manager);
for (group_it = gimp_ui_manager_get_action_groups (manager);
group_it;
group_it = g_list_next (group_it))
{
......@@ -200,13 +201,13 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
GList *actions = NULL;
GList *action_it = NULL;
actions = gtk_action_group_list_actions (GTK_ACTION_GROUP (group));
actions = gimp_action_group_list_actions (group);
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
for (action_it = actions; action_it; action_it = g_list_next (action_it))
{
GtkAction *action = action_it->data;
const gchar *name = gtk_action_get_name (action);
GimpAction *action = action_it->data;
const gchar *name = gimp_action_get_name (action);
GClosure *accel_closure = NULL;
if (strstr (name, "-menu") ||
......@@ -214,7 +215,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
name[0] == '<')
continue;
accel_closure = gtk_action_get_accel_closure (action);
accel_closure = gimp_action_get_accel_closure (action);
if (accel_closure)
{
......@@ -229,7 +230,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
gchar *label;
gchar *key_string;
label_tmp = gtk_action_get_label (action);
label_tmp = gimp_action_get_label (action);
label = gimp_strip_uline (label_tmp);
key_string = gtk_accelerator_get_label (key->accel_key,
key->accel_mods);
......
......@@ -26,6 +26,7 @@
#include "widgets/gimpdockwindow.h"
#include "widgets/gimpdockwindow.h"
#include "widgets/gimptoggleaction.h"
#include "actions.h"
#include "dock-commands.h"
......@@ -58,7 +59,8 @@ dock_toggle_image_menu_cmd_callback (GtkAction *action,
if (dock_window)
{
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active =
gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_dock_window_set_show_image_menu (dock_window, active);
}
......@@ -76,7 +78,8 @@ dock_toggle_auto_cmd_callback (GtkAction *action,
if (dock_window)
{
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active =
gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_dock_window_set_auto_follow_active (dock_window, active);
}
......
......@@ -33,7 +33,9 @@
#include "widgets/gimpdockable.h"
#include "widgets/gimpdockbook.h"
#include "widgets/gimpdocked.h"
#include "widgets/gimpradioaction.h"
#include "widgets/gimpsessioninfo.h"
#include "widgets/gimptoggleaction.h"
#include "dockable-commands.h"
......@@ -91,7 +93,8 @@ dockable_lock_tab_cmd_callback (GtkAction *action,
if (dockable)
{
gboolean lock = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean lock =
gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_dockable_set_locked (dockable, lock);
}
......@@ -108,7 +111,7 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
gint page_num;
view_type = (GimpViewType)
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
......@@ -219,7 +222,7 @@ dockable_view_size_cmd_callback (GtkAction *action,
GimpDockable *dockable = dockable_get_current (dockbook);
gint view_size;
view_size = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
view_size = gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
if (dockable)
{
......@@ -248,7 +251,7 @@ dockable_tab_style_cmd_callback (GtkAction *action,
GimpTabStyle tab_style;
tab_style = (GimpTabStyle)
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
if (dockable && gimp_dockable_get_tab_style (dockable) != tab_style)
{
......@@ -277,7 +280,7 @@ dockable_show_button_bar_cmd_callback (GtkAction *action,
gboolean show;
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
show = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
show = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
gimp_docked_set_show_button_bar (docked, show);
}
......
......@@ -35,6 +35,8 @@
#include "core/gimplayermask.h"
#include "core/gimpprogress.h"
#include "widgets/gimptoggleaction.h"
#include "dialogs/dialogs.h"
#include "actions.h"
......@@ -91,7 +93,7 @@ drawable_linked_cmd_callback (GtkAction *action,
gboolean linked;
return_if_no_drawable (image, drawable, data);
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
linked = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
......@@ -122,7 +124,7 @@ drawable_visible_cmd_callback (GtkAction *action,
gboolean visible;
return_if_no_drawable (image, drawable, data);
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
visible = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
......@@ -153,7 +155,7 @@ drawable_lock_content_cmd_callback (GtkAction *action,
gboolean locked;
return_if_no_drawable (image, drawable, data);
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
locked = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
......@@ -188,7 +190,7 @@ drawable_lock_position_cmd_callback (GtkAction *action,
gboolean locked;
return_if_no_drawable (image, drawable, data);
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
locked = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
......
......@@ -34,6 +34,7 @@
#include "core/gimptoolinfo.h"
#include "core/gimpundostack.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
......@@ -235,7 +236,7 @@ edit_actions_setup (GimpActionGroup *group)
GimpContext *context = gimp_get_user_context (group->gimp);
GimpRGB color;
GimpPattern *pattern;
GtkAction *action;
GimpAction *action;
gimp_action_group_add_actions (group, "edit-action",
edit_actions,
......@@ -251,9 +252,10 @@ edit_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (edit_fill_actions),
G_CALLBACK (edit_fill_cmd_callback));
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
"edit-paste-as-new-image-short");
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new-image");
action = gimp_action_group_get_action (group,
"edit-paste-as-new-image-short");
gimp_action_set_accel_path (action,
"<Actions>/edit/edit-paste-as-new-image");
gimp_action_group_set_action_context (group, "edit-fill-fg", context);
gimp_action_group_set_action_context (group, "edit-fill-bg", context);
......
......@@ -30,6 +30,7 @@
#include "widgets/gimperrorconsole.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimptextbuffer.h"
#include "widgets/gimptoggleaction.h"
#include "error-console-commands.h"
......@@ -138,7 +139,7 @@ error_console_highlight_error_cmd_callback (GtkAction *action,
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
active = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
console->highlight[GIMP_MESSAGE_ERROR] = active;
}
......@@ -150,7 +151,7 @@ error_console_highlight_warning_cmd_callback (GtkAction *action,
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
active = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
console->highlight[GIMP_MESSAGE_WARNING] = active;
}
......@@ -162,7 +163,7 @@ error_console_highlight_info_cmd_callback (GtkAction *action,
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
active = gimp_toggle_action_get_active (GIMP_TOGGLE_ACTION (action));
console->highlight[GIMP_MESSAGE_INFO] = active;
}
......
......@@ -39,6 +39,7 @@
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpactionimpl.h"
#include "widgets/gimphelp-ids.h"
#include "display/gimpdisplay.h"
......@@ -355,17 +356,17 @@ file_actions_last_opened_update (GimpContainer *container,
for (i = 0; i < n; i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("file-open-recent-%02d", i + 1);
GimpAction *action;
gchar *name = g_strdup_printf ("file-open-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
action = gimp_action_group_get_action (group, name);
if (i < num_documents)
{
GimpImagefile *imagefile = (GimpImagefile *)
gimp_container_get_child_by_index (container, i);
if (GIMP_ACTION (action)->viewable != (GimpViewable *) imagefile)
if (GIMP_ACTION_IMPL (action)->viewable != (GimpViewable *) imagefile)
{
GFile *file;
const gchar *name;
......
......@@ -30,6 +30,7 @@
#include "pdb/gimpprocedure.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
......@@ -1068,7 +1069,7 @@ filters_actions_history_changed (Gimp *gimp,
if (proc)
{
GtkAction *actual_action = NULL;
GimpAction *actual_action = NULL;
const gchar *label;
gchar *repeat;
gchar *reshow;
......@@ -1088,8 +1089,8 @@ filters_actions_history_changed (Gimp *gimp,
if (g_str_has_prefix (gimp_object_get_name (proc), "filters-"))
{
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
gimp_action_group_get_action (group,
gimp_object_get_name (proc));
}
else if (plug_in_group)
{
......@@ -1100,12 +1101,12 @@ filters_actions_history_changed (Gimp *gimp,
* #517683.
*/
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
gimp_action_group_get_action (plug_in_group,
gimp_object_get_name (proc));
}
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
sensitive = gimp_action_get_sensitive (actual_action);
gimp_action_group_set_action_sensitive (group, "filters-repeat",
sensitive);
......@@ -1125,14 +1126,14 @@ filters_actions_history_changed (Gimp *gimp,
for (i = 0; i < gimp_filter_history_length (gimp); i++)
{
GtkAction *action;
GtkAction *actual_action = NULL;
GimpAction *action;
GimpAction *actual_action = NULL;
const gchar *label;
gchar *name;
gboolean sensitive = FALSE;
name = g_strdup_printf ("filters-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
action = gimp_action_group_get_action (group, name);
g_free (name);
proc = gimp_filter_history_nth (gimp, i);
......@@ -1142,19 +1143,19 @@ filters_actions_history_changed (Gimp *gimp,
if (g_str_has_prefix (gimp_object_get_name (proc), "filters-"))
{
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
gimp_action_group_get_action (group,
gimp_object_get_name (proc));
}
else if (plug_in_group)
{
/* see comment above */
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
gimp_action_group_get_action (plug_in_group,
gimp_object_get_name (proc));
}
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
sensitive = gimp_action_get_sensitive (actual_action);
g_object_set (action,
"visible", TRUE,
......@@ -1168,10 +1169,10 @@ filters_actions_history_changed (Gimp *gimp,
for (; i < gimp_filter_history_size (gimp); i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
GimpAction *action;
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
action = gimp_action_group_get_action (group, name);
g_free (name);
g_object_set (action,
......
......@@ -36,6 +36,8 @@
#include "core/gimpprogress.h"
#include "core/gimpsettings.h"
#include "widgets/gimpaction.h"
#include "actions.h"
#include "filters-commands.h"
#include "gimpgeglprocedure.h"
......@@ -58,7 +60,7 @@ static void filters_run_procedure (Gimp *gimp,
/* public functions */
void
filters_apply_cmd_callback (GtkAction *action,
filters_apply_cmd_callback (GimpAction *action,
const gchar *operation_str,
gpointer data)
{
......@@ -71,18 +73,17 @@ filters_apply_cmd_callback (GtkAction *action,
operation = filters_parse_operation (image->gimp,
operation_str,
gtk_action_get_icon_name (action),
gimp_action_get_icon_name (action),
&settings);
procedure = gimp_gegl_procedure_new (image->gimp,
GIMP_RUN_NONINTERACTIVE, settings,
operation,
gtk_action_get_name (action),
gtk_action_get_label (action),
gtk_action_get_tooltip (action),
gtk_action_get_icon_name (action),
g_object_get_qdata (G_OBJECT (action),
GIMP_HELP_ID));
gimp_action_get_name (action),
gimp_action_get_label (action),
gimp_action_get_tooltip (action),
gimp_action_get_icon_name (action),
gimp_action_get_help_id (action));
g_free (operation);
......@@ -96,7 +97,7 @@ filters_apply_cmd_callback (GtkAction *action,
}
void
filters_apply_interactive_cmd_callback (GtkAction *action,
filters_apply_interactive_cmd_callback (GimpAction *action,
const gchar *operation,
gpointer data)
{
......@@ -108,12 +109,11 @@ filters_apply_interactive_cmd_callback (GtkAction *action,
procedure = gimp_gegl_procedure_new (image->gimp,
GIMP_RUN_INTERACTIVE, NULL,
operation,
gtk_action_get_name (action),
gtk_action_get_label (action),
gtk_action_get_tooltip (action),
gtk_action_get_icon_name (action),
g_object_get_qdata (G_OBJECT (action),
GIMP_HELP_ID));
gimp_action_get_name (action),
gimp_action_get_label (action),
gimp_action_get_tooltip (action),
gimp_action_get_icon_name (action),
gimp_action_get_help_id (action));
gimp_filter_history_add (image->gimp, procedure);
filters_history_cmd_callback (NULL, procedure, data);
......@@ -122,9 +122,9 @@ filters_apply_interactive_cmd_callback (GtkAction *action,
}
void
filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data)
filters_repeat_cmd_callback (GimpAction *action,
gint value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
......@@ -141,7 +141,7 @@ filters_repeat_cmd_callback (GtkAction *action,
}
void
filters_history_cmd_callback (GtkAction *action,
filters_history_cmd_callback (GimpAction *action,
GimpProcedure *procedure,
gpointer data)
{
......
......@@ -19,17 +19,17 @@
#define __FILTERS_COMMANDS_H__
void filters_apply_cmd_callback (GtkAction *action,
void filters_apply_cmd_callback (GimpAction *action,
const gchar *operation,
gpointer data);
void filters_apply_interactive_cmd_callback (GtkAction *action,
void filters_apply_interactive_cmd_callback (GimpAction *action,
const gchar *operation,
gpointer data);
void filters_repeat_cmd_callback (GtkAction *action,
void filters_repeat_cmd_callback (GimpAction *action,
gint value,
gpointer data);
void filters_history_cmd_callback (GtkAction *action,
void filters_history_cmd_callback (GimpAction *action,
GimpProcedure *procedure,
gpointer data);
......
......@@ -31,6 +31,7 @@
#include "widgets/gimpgradienteditor.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpradioaction.h"
#include "widgets/gimpuimanager.h"
#include "widgets/gimpviewabledialog.h"
......@@ -72,7 +73,7 @@ gradient_editor_left_color_type_cmd_callback (GtkAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
color_type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
color_type = gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
if (gradient &&
color_type >= 0 &&
......@@ -189,7 +190,7 @@ gradient_editor_right_color_type_cmd_callback (GtkAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
color_type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
color_type = gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
if (gradient &&
color_type >= 0 &&
......@@ -299,7 +300,7 @@ gradient_editor_blending_func_cmd_callback (GtkAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
type = gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));
enum_class = g_type_class_ref (GIMP_TYPE_GRADIENT_SEGMENT_TYPE);
......@@ -327,7 +328,7 @@ gradient_editor_coloring_type_cmd_callback (GtkAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
color = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
color = gimp_radio_action_get_current_value (GIMP_RADIO_ACTION (action));