Bug#991468: Patch for Glade: Bug #991468
Osamu Aoki
osamu at debian.org
Wed Jul 28 06:27:15 BST 2021
Hi,
This worked for me.
OsamuFrom 423bd0120bd4ddaa9d511282fbdd11be3c088336 Mon Sep 17 00:00:00 2001
From: Osamu Aoki <osamu at debian.org>
Date: Wed, 28 Jul 2021 12:30:50 +0900
Subject: [PATCH] Drop overzealous check using only the first child
Signed-off-by: Osamu Aoki <osamu at debian.org>
---
plugins/gtk+/glade-gtk-container.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/plugins/gtk+/glade-gtk-container.c b/plugins/gtk+/glade-gtk-container.c
index b11d5059..c1cfbe3a 100644
--- a/plugins/gtk+/glade-gtk-container.c
+++ b/plugins/gtk+/glade-gtk-container.c
@@ -83,11 +83,10 @@ glade_gtk_container_add_verify (GladeWidgetAdaptor *adaptor,
return FALSE;
}
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))
+ /* Special case GtkBin since Windows can have a placeholder in the
titlebar */
+ /* Checking only on the first child is bad idea: gtk_bin_get_child
(GTK_BIN (container)) */
+ /* Checking with glade_util_count_placeholders recursively should be
sufficient */
+ ( glade_util_count_placeholders (gwidget) == 0))
{
if (user_feedback)
glade_util_ui_message (glade_app_get_window (),
--
2.30.2
More information about the pkg-gnome-maintainers
mailing list