summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-03-21 20:06:40 (GMT)
committerjenglish <jenglish@flightlab.com>2007-03-21 20:06:40 (GMT)
commitf479296307f674dc9267c506a41d3a0d7f4b92ef (patch)
tree31bd9d0b2518447966e0d0a7c32a2297580caae7 /generic
parent44bc3e12acfd6ccb492f90a574ab9bf722ad2d11 (diff)
downloadtk-f479296307f674dc9267c506a41d3a0d7f4b92ef.zip
tk-f479296307f674dc9267c506a41d3a0d7f4b92ef.tar.gz
tk-f479296307f674dc9267c506a41d3a0d7f4b92ef.tar.bz2
BUGFIX (Ttk_BuildLayoutTemplate): Nested TTK_GROUP nodes did not work
unless they appeared at the end of the layout (and only by accident then).
Diffstat (limited to 'generic')
-rw-r--r--generic/ttk/ttkLayout.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c
index 2dbdfdf..ca1a6e9 100644
--- a/generic/ttk/ttkLayout.c
+++ b/generic/ttk/ttkLayout.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 2003 Joe English. Freely redistributable.
*
- * $Id: ttkLayout.c,v 1.7 2007/01/11 19:59:26 jenglish Exp $
+ * $Id: ttkLayout.c,v 1.8 2007/03/21 20:06:41 jenglish Exp $
*/
#include <string.h>
@@ -735,9 +735,19 @@ Ttk_LayoutTemplate Ttk_BuildLayoutTemplate(Ttk_LayoutSpec spec)
}
if (spec->opcode & TTK_CHILDREN) {
+ int depth = 1;
last->child = Ttk_BuildLayoutTemplate(spec+1);
- while (!(spec->opcode & TTK_LAYOUT_END)) {
+
+ /* Skip to end of group:
+ */
+ while (depth) {
++spec;
+ if (spec->opcode & TTK_CHILDREN) {
+ ++depth;
+ }
+ if (spec->opcode & TTK_LAYOUT_END) {
+ --depth;
+ }
}
}
} /* for */