summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-10-07 22:07:16 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-10-07 22:07:16 +0000
commitcc46d181bd74f25793e0d5dd3c73396b37a71ed0 (patch)
tree021c0f0a53d2ce3720bfc5ed06c6697ac4c5bf75 /demos
parent0ad91b0ea1a45c51845a6a9b925b292506064066 (diff)
downloadgdk-pixbuf-cc46d181bd74f25793e0d5dd3c73396b37a71ed0.tar.gz
New callback to propertly report radio actions.
Wed Oct 8 00:06:17 2003 Matthias Clasen <maclas@gmx.de> * demos/gtk-demo/ui_manager.c (activate_radio_action): New callback to propertly report radio actions. * demos/gtk-demo/ui_manager.c (do_ui_manager): Use it here.
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/ui_manager.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/demos/gtk-demo/ui_manager.c b/demos/gtk-demo/ui_manager.c
index 78267b3f9..900e24dae 100644
--- a/demos/gtk-demo/ui_manager.c
+++ b/demos/gtk-demo/ui_manager.c
@@ -12,6 +12,13 @@ activate_action (GtkAction *action)
g_message ("Action \"%s\" activated", gtk_action_get_name (action));
}
+static void
+activate_radio_action (GtkAction *action, GtkRadioAction *current)
+{
+ g_message ("Radio action \"%s\" selected",
+ gtk_action_get_name (GTK_ACTION (current)));
+}
+
static GtkActionEntry entries[] = {
{ "FileMenu", NULL, "_File" }, /* name, stock id, label */
{ "PreferencesMenu", NULL, "_Preferences" }, /* name, stock id, label */
@@ -164,12 +171,12 @@ do_ui_manager (void)
gtk_action_group_add_radio_actions (actions,
color_entries, n_color_entries,
COLOR_RED,
- G_CALLBACK (activate_action),
+ G_CALLBACK (activate_radio_action),
NULL);
gtk_action_group_add_radio_actions (actions,
shape_entries, n_shape_entries,
SHAPE_OVAL,
- G_CALLBACK (activate_action),
+ G_CALLBACK (activate_radio_action),
NULL);
ui = gtk_ui_manager_new ();