summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/ttk/ttkLayout.c14
2 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 517ca82..1daab62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-21 Joe English <jenglish@users.sourceforge.net>
+
+ * generic/ttk/ttkLayout.c(Ttk_BuildLayoutTemplate): BUGFIX:
+ Nested TTK_GROUP nodes did not work unless they appeared
+ at the end of the layout (and only by accident then).
+
2007-03-08 Joe English <jenglish@users.sourceforge.net>
* tests/grid.test(grid-21.7): Reset wm geometry . and pack propagate .
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 */