[glade/wip/beniofel/popover: 13/19] Refuse to add popovers to another containers



commit 6eefaf3501b2d3479da155caec6f979cc7c60a40
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 18 13:51:08 2015 -0500

    Refuse to add popovers to another containers
    
    It doesn't make sense to allow this.

 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 fe9f9b8..753eca6 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))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]