summaryrefslogtreecommitdiffstats
path: root/generic/tkGrid.c
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2001-08-22 19:59:49 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2001-08-22 19:59:49 (GMT)
commite72d91fc37cc268684a0e95f77a496e42e46032b (patch)
tree4eb55a50c29337e96d318bbf40d24ef9d80ce5fd /generic/tkGrid.c
parentce114e255a0c035ea07b74552f8d4270b3fd998b (diff)
downloadtk-e72d91fc37cc268684a0e95f77a496e42e46032b.zip
tk-e72d91fc37cc268684a0e95f77a496e42e46032b.tar.gz
tk-e72d91fc37cc268684a0e95f77a496e42e46032b.tar.bz2
Fixed a bug where adjacent 'x' and '^' where not handled properly.
Diffstat (limited to 'generic/tkGrid.c')
-rw-r--r--generic/tkGrid.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index 7fdfe19..9ac3d41 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGrid.c,v 1.13 2001/08/21 20:21:36 pspjuth Exp $
+ * RCS: @(#) $Id: tkGrid.c,v 1.14 2001/08/22 19:59:49 pspjuth Exp $
*/
#include "tkInt.h"
@@ -2391,6 +2391,7 @@ ConfigureSlaves(interp, tkwin, objc, objv)
int defaultColumnSpan = 1; /* default number of columns */
char *lastWindow; /* use this window to base current
* Row/col on */
+ int numSkip; /* number of 'x' found */
static char *optionStrings[] = {
"-column", "-columnspan", "-in", "-ipadx", "-ipady",
"-padx", "-pady", "-row", "-rowspan", "-sticky",
@@ -2720,16 +2721,21 @@ ConfigureSlaves(interp, tkwin, objc, objv)
/* Now look for all the "^"'s. */
lastWindow = NULL;
+ numSkip = 0;
for (j = 0; j < numWindows; j++) {
struct Gridder *otherPtr;
int match; /* found a match for the ^ */
- int lastRow, lastColumn; /* implied end of table */
+ int lastRow, lastColumn; /* implied end of table */
string = Tcl_GetString(objv[j]);
firstChar = string[0];
if (firstChar == '.') {
lastWindow = string;
+ numSkip = 0;
+ }
+ if (firstChar == REL_SKIP) {
+ numSkip++;
}
if (firstChar != REL_VERT) {
continue;
@@ -2766,6 +2772,8 @@ ConfigureSlaves(interp, tkwin, objc, objv)
lastColumn = otherPtr->column + otherPtr->numCols;
}
+ lastColumn += numSkip;
+
for (match=0, slavePtr = masterPtr->slavePtr; slavePtr != NULL;
slavePtr = slavePtr->nextPtr) {
@@ -2776,6 +2784,7 @@ ConfigureSlaves(interp, tkwin, objc, objv)
match++;
j += slavePtr->numCols - 1;
lastWindow = Tk_PathName(slavePtr->tkwin);
+ numSkip = 0;
break;
}
}
@@ -2785,7 +2794,6 @@ ConfigureSlaves(interp, tkwin, objc, objv)
(char *) NULL);
return TCL_ERROR;
}
-/* j += width - 1; */
}
if (masterPtr == NULL) {