diff options
author | Osamu Aoki <osamu@debian.org> | 2021-07-28 13:36:29 +0900 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2022-04-21 12:53:35 +0000 |
commit | 308c5bf0a396b749faa7435f0e5adf046a99014f (patch) | |
tree | 6b22fdc09c5e081187f951eceb09855858b68ee9 | |
parent | efdd5338b034a11c5d617684d92d11edc600965e (diff) | |
download | glade-308c5bf0a396b749faa7435f0e5adf046a99014f.tar.gz |
Drop overzealous check using only the first child
This fixes issue #499 and #509
* Can't add GtkHeaderBar to window with existing widgets / containers
* Cannot add GtkBox or other widgets inside a GtkPopoverMenu
Please note:
bin_child = gtk_bin_get_child (GTK_BIN (container))) was getting the
first child only. Checking if the first child is placeholder causes
false positives.
glade_util_count_placeholders (gwidget) recursively checks placeholder.
Signed-off-by: Osamu Aoki <osamu@debian.org>
-rw-r--r-- | plugins/gtk+/glade-gtk-container.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/gtk+/glade-gtk-container.c b/plugins/gtk+/glade-gtk-container.c index eb6552a3..18a22826 100644 --- a/plugins/gtk+/glade-gtk-container.c +++ b/plugins/gtk+/glade-gtk-container.c @@ -87,11 +87,7 @@ glade_gtk_container_add_verify (GladeWidgetAdaptor *adaptor, /* GtkBox and GtkGrid size is adjusted automaticaly in GladeCommand */ return TRUE; else if (GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS (adaptor) && - /* Special case GtkBin since Windows can hace a placeholder in the titlebar */ - ((GTK_IS_BIN (container) && - (bin_child = gtk_bin_get_child (GTK_BIN (container))) && - !GLADE_IS_PLACEHOLDER(bin_child)) || - glade_util_count_placeholders (gwidget) == 0)) + (glade_util_count_placeholders (gwidget) == 0)) { if (user_feedback) glade_util_ui_message (glade_app_get_window (), |