summaryrefslogtreecommitdiff
path: root/tests/testactions.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-02-01 11:20:47 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-02-01 11:20:47 +0000
commit2a9c3e80e7657c83d090d35905f67f8149171d4d (patch)
tree8ecfe2128e3d6ac0b79f325ad061cd1bfe6aad4b /tests/testactions.c
parent857fe308f5c2ddd6ef5beab954f60d1dbd4dbeba (diff)
downloadgtk+-2a9c3e80e7657c83d090d35905f67f8149171d4d.tar.gz
initialize GdkColor structs to fix warning about uninitialized "pixel"
2008-02-01 Michael Natterer <mitch@imendio.com> * tests/testgtk.c: initialize GdkColor structs to fix warning about uninitialized "pixel" member. * tests/testactions.c: connect the toolbar_style() callback so it does something useful and doesn't warn about being defined but not used. svn path=/trunk/; revision=19454
Diffstat (limited to 'tests/testactions.c')
-rw-r--r--tests/testactions.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/testactions.c b/tests/testactions.c
index 01b6655171..9b97b7c605 100644
--- a/tests/testactions.c
+++ b/tests/testactions.c
@@ -95,13 +95,15 @@ show_accel_dialog (GtkAction *action)
}
static void
-toolbar_style (GtkAction *action,
- gpointer user_data)
+toolbar_style (GtkAction *action)
{
GtkToolbarStyle style;
g_return_if_fail (toolbar != NULL);
- style = GPOINTER_TO_INT (user_data);
+
+ radio_action (action);
+
+ style = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
gtk_toolbar_set_style (toolbar, style);
}
@@ -430,7 +432,7 @@ main (int argc, char **argv)
gtk_action_group_add_radio_actions (action_group,
toolbar_entries, n_toolbar_entries,
GTK_TOOLBAR_BOTH,
- G_CALLBACK (radio_action), NULL);
+ G_CALLBACK (toolbar_style), NULL);
gtk_action_group_add_action_with_accel (action_group, action, NULL);
create_window (action_group);