[gtk+/gtk-3-12] GtkPopover: inherit actions from the relative_to widget
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-12] GtkPopover: inherit actions from the relative_to widget
- Date: Mon, 12 May 2014 20:45:08 +0000 (UTC)
commit 84f6eefec832f1c7e24edca22e53945140167656
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon May 12 16:25:25 2014 -0400
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
gtk/gtkpopover.c | 1 +
gtk/gtkwidget.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index d9ce632..6255e0e 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1651,6 +1651,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);
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d3d78dd..3ff83af 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15702,6 +15702,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]