From: Christian Dywan Date: Wed, 25 Mar 2009 01:04:41 +0000 (+0100) Subject: Always lookup an item to find a radio group X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0a947528c31dca472e5d862f60cd8eaa4c974ef;p=midori Always lookup an item to find a radio group Storing a group isn't good enough because as soon as an item is removed that group is invalid and can't be reused anymore. --- diff --git a/midori/midori-panel.c b/midori/midori-panel.c index 41574536..4f1dcc0b 100644 --- a/midori/midori-panel.c +++ b/midori/midori-panel.c @@ -29,7 +29,6 @@ struct _MidoriPanel GtkWidget* frame; GtkWidget* toolbook; GtkWidget* notebook; - GSList* group; GtkMenu* menu; gboolean right_aligned; @@ -93,7 +92,6 @@ midori_panel_class_init (MidoriPanelClass* class) GObjectClass* gobject_class; GParamFlags flags; - signals[CLOSE] = g_signal_new ( "close", G_TYPE_FROM_CLASS (class), @@ -511,9 +509,9 @@ midori_panel_append_page (MidoriPanel* panel, label = midori_viewable_get_label (viewable); stock_id = midori_viewable_get_stock_id (viewable); - toolitem = gtk_radio_tool_button_new_from_stock (panel->group, stock_id); - panel->group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON ( - toolitem)); + toolitem = gtk_radio_tool_button_new_from_stock (NULL, stock_id); + g_object_set (toolitem, "group", + gtk_toolbar_get_nth_item (GTK_TOOLBAR (panel->toolbar), 0), NULL); image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (toolitem), image); if (label)