blob: e9374541b74e609dd85c2e1f570f3592b7f0eba7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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);
|