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.
This commit is contained in:
parent
3df21e947f
commit
d0a947528c
1 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue