summaryrefslogtreecommitdiffstats
path: root/patches/glademm-2.6.0/box_pack_child_with_responseid.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/glademm-2.6.0/box_pack_child_with_responseid.diff')
-rw-r--r--patches/glademm-2.6.0/box_pack_child_with_responseid.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/glademm-2.6.0/box_pack_child_with_responseid.diff b/patches/glademm-2.6.0/box_pack_child_with_responseid.diff
new file mode 100644
index 000000000..e9374541b
--- /dev/null
+++ b/patches/glademm-2.6.0/box_pack_child_with_responseid.diff
@@ -0,0 +1,32 @@
+Subject: children of box with response id will also get packed
+By: Luotao Fu <l.fu@pengutronix.de>
+ Box addchild function returns before adding pack...() call if "response_id"
+ is set in property. This is bad because the most objects have a response_id,
+ though marked to 0. Without this patch we will only be able to see few
+ objects like radiobuttons in a box, most objects don't appear at all. To
+ solve this problem we acquire the property value now and only return if it's
+ not 0. (I'm not quite sure what this response_id is actually for, question to
+ developer is pending)
+
+Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
+---
+ src/writers/box.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+Index: b/src/writers/box.cc
+===================================================================
+--- a/src/writers/box.cc
++++ b/src/writers/box.cc
+@@ -55,8 +55,10 @@ void Gtk_Box::AddChild(const Widget &w,C
+ int padding(ch.getIntProperty("padding",0));
+
+ // this is for dialog (see there)
+- if (GTKMM2 && w.hasProperty("response_id")) return;
+-
++ if (GTKMM2 && w.hasProperty("response_id")) {
++ if (w.getIntProperty("response_id")!=0)
++ return;
++ }
+ f.Statement() << instance
+ << (pack_end?"pack_end":"pack_start")
+ << '(' << Reference(w);