[gtk+] radio-menu-item: Handle a !NULL group



commit 955aed92272b88a72617cbadca6f3010920a4f1f
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Mar 5 13:09:47 2012 +0000

    radio-menu-item: Handle a !NULL group
    
    If we create a RadioMenuItem without a group, and then set a group, the
    menu item will still be set as active, which means an inconsistently
    drawn radio menu item - as the RadioMenuItem will set the active flag on
    itself, but then it won't reset it when it gets a new group.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671362

 gtk/gtkradiomenuitem.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkradiomenuitem.c b/gtk/gtkradiomenuitem.c
index 8eaab3b..ee49423 100644
--- a/gtk/gtkradiomenuitem.c
+++ b/gtk/gtkradiomenuitem.c
@@ -208,6 +208,8 @@ gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
 
          tmp_item->priv->group = priv->group;
        }
+
+      _gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radio_menu_item), FALSE);
     }
   else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]