GtkPopover: inherit actions from the relative_to widget

Make the relative_to widget the parent for a GtkPopover's
GtkActionGroup. This, for example, makes the menu model of a
GtkMenuButton find action groups attached to the button.

https://bugzilla.gnome.org/show_bug.cgi?id=729915
This commit is contained in:
Owen W. Taylor 2014-05-12 16:25:25 -04:00
parent 1e3af04dd9
commit 8f9e50de80
2 changed files with 3 additions and 0 deletions

View File

@ -1636,6 +1636,7 @@ gtk_popover_update_relative_to (GtkPopover *popover,
G_CALLBACK (scrollable_notify_cb), popover);
}
_gtk_widget_update_parent_muxer (GTK_WIDGET (popover));
_gtk_popover_update_context_parent (popover);
g_object_unref (popover);
}

View File

@ -15724,6 +15724,8 @@ _gtk_widget_update_parent_muxer (GtkWidget *widget)
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else if (GTK_IS_POPOVER (widget))
parent = gtk_popover_get_relative_to (GTK_POPOVER (widget));
else
parent = gtk_widget_get_parent (widget);