diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-01-18 13:51:08 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-12-10 16:14:26 -0500 |
commit | 104168b917dc1eaf344597fade714d091fa678c0 (patch) | |
tree | fa9ec3dcb7eb0ac986e1ab10defe6f6863d72e9e | |
parent | fa312a67dccf9fbefcf6c02e1750e22ea03eeb92 (diff) | |
download | glade-104168b917dc1eaf344597fade714d091fa678c0.tar.gz |
Refuse to add popovers to another containers
It doesn't make sense to allow this.
-rw-r--r-- | plugins/gtk+/glade-gtk-container.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/gtk+/glade-gtk-container.c b/plugins/gtk+/glade-gtk-container.c index fe9f9b88..753eca69 100644 --- a/plugins/gtk+/glade-gtk-container.c +++ b/plugins/gtk+/glade-gtk-container.c @@ -59,6 +59,15 @@ glade_gtk_container_add_verify (GladeWidgetAdaptor *adaptor, return FALSE; } + else if (GTK_IS_POPOVER (child)) + { + if (user_feedback) + glade_util_ui_message (glade_app_get_window (), + GLADE_UI_INFO, NULL, + _("Cannot add a popover to a container.")); + + return FALSE; + } else if (!GTK_IS_WIDGET (child) || GTK_IS_TOOL_ITEM (child) || GTK_IS_MENU_ITEM (child)) |