Commit db0713ec authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

Allow to construct a group of radio actions in multiple chunks. (not used

2005-11-15  Michael Natterer  <mitch@gimp.org>

	Allow to construct a group of radio actions in multiple chunks.
	(not used yet).

	* app/widgets/gimpactiongroup.[ch]
	(gimp_action_group_add_radio_actions): added "GSList *radio_group"
	parameter and return value.

	* app/actions/dockable-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/quick-mask-actions.c
	* app/actions/text-editor-actions.c
	* app/actions/view-actions.c
	* app/actions/window-actions.c: pass NULL as radio_group.
parent d5751a77
2005-11-15 Michael Natterer <mitch@gimp.org>
Allow to construct a group of radio actions in multiple chunks.
(not used yet).
* app/widgets/gimpactiongroup.[ch]
(gimp_action_group_add_radio_actions): added "GSList *radio_group"
parameter and return value.
* app/actions/dockable-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/quick-mask-actions.c
* app/actions/text-editor-actions.c
* app/actions/view-actions.c
* app/actions/window-actions.c: pass NULL as radio_group.
2005-11-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainercombobox.c: implement
......
......@@ -144,18 +144,21 @@ dockable_actions_setup (GimpActionGroup *group)
gimp_action_group_add_radio_actions (group,
dockable_preview_size_actions,
G_N_ELEMENTS (dockable_preview_size_actions),
NULL,
GIMP_VIEW_SIZE_MEDIUM,
G_CALLBACK (dockable_preview_size_cmd_callback));
gimp_action_group_add_radio_actions (group,
dockable_tab_style_actions,
G_N_ELEMENTS (dockable_tab_style_actions),
NULL,
GIMP_TAB_STYLE_PREVIEW,
G_CALLBACK (dockable_tab_style_cmd_callback));
gimp_action_group_add_radio_actions (group,
dockable_view_type_actions,
G_N_ELEMENTS (dockable_view_type_actions),
NULL,
GIMP_VIEW_TYPE_LIST,
G_CALLBACK (dockable_toggle_view_cmd_callback));
}
......
......@@ -361,12 +361,14 @@ gradient_editor_actions_setup (GimpActionGroup *group)
gimp_action_group_add_radio_actions (group,
gradient_editor_blending_actions,
G_N_ELEMENTS (gradient_editor_blending_actions),
NULL,
0,
G_CALLBACK (gradient_editor_blending_func_cmd_callback));
gimp_action_group_add_radio_actions (group,
gradient_editor_coloring_actions,
G_N_ELEMENTS (gradient_editor_coloring_actions),
NULL,
0,
G_CALLBACK (gradient_editor_coloring_type_cmd_callback));
......
......@@ -85,6 +85,7 @@ quick_mask_actions_setup (GimpActionGroup *group)
gimp_action_group_add_radio_actions (group,
quick_mask_invert_actions,
G_N_ELEMENTS (quick_mask_invert_actions),
NULL,
FALSE,
G_CALLBACK (quick_mask_invert_cmd_callback));
}
......
......@@ -79,6 +79,7 @@ text_editor_actions_setup (GimpActionGroup *group)
gimp_action_group_add_radio_actions (group,
text_editor_direction_actions,
G_N_ELEMENTS (text_editor_direction_actions),
NULL,
GIMP_TEXT_DIRECTION_LTR,
G_CALLBACK (text_editor_direction_cmd_callback));
}
......
......@@ -432,6 +432,7 @@ view_actions_setup (GimpActionGroup *group)
gimp_action_group_add_radio_actions (group,
view_zoom_explicit_actions,
G_N_ELEMENTS (view_zoom_explicit_actions),
NULL,
10000,
G_CALLBACK (view_zoom_explicit_cmd_callback));
......
......@@ -72,7 +72,7 @@ window_actions_setup (GimpActionGroup *group,
g_free (screen_name);
}
gimp_action_group_add_radio_actions (group, entries, n_entries, 0,
gimp_action_group_add_radio_actions (group, entries, n_entries, NULL, 0,
G_CALLBACK (move_to_screen_callback));
for (i = 0; i < n_entries; i++)
......
......@@ -455,18 +455,18 @@ gimp_action_group_add_toggle_actions (GimpActionGroup *group,
}
}
void
GSList *
gimp_action_group_add_radio_actions (GimpActionGroup *group,
GimpRadioActionEntry *entries,
guint n_entries,
GSList *radio_group,
gint value,
GCallback callback)
{
GtkRadioAction *first_action = NULL;
GSList *radio_group = NULL;
gint i;
g_return_if_fail (GIMP_IS_ACTION_GROUP (group));
g_return_val_if_fail (GIMP_IS_ACTION_GROUP (group), NULL);
for (i = 0; i < n_entries; i++)
{
......@@ -512,6 +512,8 @@ gimp_action_group_add_radio_actions (GimpActionGroup *group,
g_signal_connect (first_action, "changed",
callback,
group->user_data);
return radio_group;
}
void
......
......@@ -152,11 +152,12 @@ void gimp_action_group_add_actions (GimpActionGroup *group,
void gimp_action_group_add_toggle_actions (GimpActionGroup *group,
GimpToggleActionEntry *entries,
guint n_entries);
void gimp_action_group_add_radio_actions (GimpActionGroup *group,
GSList *gimp_action_group_add_radio_actions (GimpActionGroup *group,
GimpRadioActionEntry *entries,
guint n_entries,
GSList *radio_group,
gint value,
GCallback on_change);
GCallback callback);
void gimp_action_group_add_enum_actions (GimpActionGroup *group,
GimpEnumActionEntry *entries,
......
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