From cf639f41686877c0b44bc4ca34edd2f1ee98fd2e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 22 Sep 2003 08:54:23 +0000 Subject: [PATCH] Initially activate the JUSTIFY_RIGHT group member to test the fix for 2003-09-22 Matthias Clasen * tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT group member to test the fix for #122904. * gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): Add the action to the group before activating it, otherwise we may end up with multiple active group members. (#122904, Marco Pesenti Gritti) --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtkactiongroup.c | 9 +++++---- tests/testmerge.c | 4 +++- 7 files changed, 58 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb03cd1d99..935a6f64f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-09-22 Matthias Clasen + + * tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT + group member to test the fix for #122904. + + * gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): + Add the action to the group before activating it, otherwise we + may end up with multiple active group members. (#122904, Marco + Pesenti Gritti) + 2003-09-21 Matthias Clasen Changes to make cross-process merging feasible: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fb03cd1d99..935a6f64f0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2003-09-22 Matthias Clasen + + * tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT + group member to test the fix for #122904. + + * gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): + Add the action to the group before activating it, otherwise we + may end up with multiple active group members. (#122904, Marco + Pesenti Gritti) + 2003-09-21 Matthias Clasen Changes to make cross-process merging feasible: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index fb03cd1d99..935a6f64f0 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +2003-09-22 Matthias Clasen + + * tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT + group member to test the fix for #122904. + + * gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): + Add the action to the group before activating it, otherwise we + may end up with multiple active group members. (#122904, Marco + Pesenti Gritti) + 2003-09-21 Matthias Clasen Changes to make cross-process merging feasible: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fb03cd1d99..935a6f64f0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2003-09-22 Matthias Clasen + + * tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT + group member to test the fix for #122904. + + * gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): + Add the action to the group before activating it, otherwise we + may end up with multiple active group members. (#122904, Marco + Pesenti Gritti) + 2003-09-21 Matthias Clasen Changes to make cross-process merging feasible: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fb03cd1d99..935a6f64f0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2003-09-22 Matthias Clasen + + * tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT + group member to test the fix for #122904. + + * gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): + Add the action to the group before activating it, otherwise we + may end up with multiple active group members. (#122904, Marco + Pesenti Gritti) + 2003-09-21 Matthias Clasen Changes to make cross-process merging feasible: diff --git a/gtk/gtkactiongroup.c b/gtk/gtkactiongroup.c index f09e2e4ae9..f58a44273e 100644 --- a/gtk/gtkactiongroup.c +++ b/gtk/gtkactiongroup.c @@ -597,14 +597,15 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group, if (i == 0) first_action = action; - if (value == entries[i].value) - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); - gtk_radio_action_set_group (GTK_RADIO_ACTION (action), group); group = gtk_radio_action_get_group (GTK_RADIO_ACTION (action)); + if (value == entries[i].value) + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); + /* set the accel path for the menu item */ - accel_path = g_strconcat ("/", action_group->private_data->name, "/", + accel_path = g_strconcat ("/", + action_group->private_data->name, "/", entries[i].name, NULL); if (entries[i].accelerator) { diff --git a/tests/testmerge.c b/tests/testmerge.c index c79090b20d..ea794ddfa7 100644 --- a/tests/testmerge.c +++ b/tests/testmerge.c @@ -462,7 +462,7 @@ main (int argc, char **argv) NULL); gtk_action_group_add_radio_actions (action_group, radio_entries, n_radio_entries, - JUSTIFY_LEFT, + JUSTIFY_RIGHT, G_CALLBACK (radio_action_changed), NULL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -556,6 +556,8 @@ main (int argc, char **argv) gtk_widget_show_all (window); gtk_main (); + g_object_unref (action_group); + g_object_unref (merge); return 0; }