summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkCanvas.c18
-rw-r--r--generic/tkEntry.c8
-rw-r--r--generic/tkListbox.c5
-rw-r--r--generic/ttk/ttkScroll.c4
-rw-r--r--library/ttk/panedwindow.tcl12
-rw-r--r--unix/Makefile.in2
-rw-r--r--win/Makefile.in2
7 files changed, 25 insertions, 26 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index aa23203..b80c197 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -7,7 +7,7 @@
*
* Copyright (c) 1991-1994 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright (c) 1998-1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -2064,14 +2064,11 @@ CanvasWidgetCmd(
}
args = TkGetStringsFromObjs(objc, objv);
- type = Tk_GetScrollInfo(interp, objc, args, &fraction, &count);
+ type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count);
if (args != NULL) {
ckfree(args);
}
switch (type) {
- case TK_SCROLL_ERROR:
- result = TCL_ERROR;
- goto done;
case TK_SCROLL_MOVETO:
newX = canvasPtr->scrollX1 - canvasPtr->inset
+ (int) (fraction * (canvasPtr->scrollX2
@@ -2089,6 +2086,9 @@ CanvasWidgetCmd(
* (Tk_Width(canvasPtr->tkwin) - 2*canvasPtr->inset));
}
break;
+ default:
+ result = TCL_ERROR;
+ goto done;
}
CanvasSetOrigin(canvasPtr, newX, canvasPtr->yOrigin);
break;
@@ -2110,14 +2110,11 @@ CanvasWidgetCmd(
}
args = TkGetStringsFromObjs(objc, objv);
- type = Tk_GetScrollInfo(interp, objc, args, &fraction, &count);
+ type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count);
if (args != NULL) {
ckfree(args);
}
switch (type) {
- case TK_SCROLL_ERROR:
- result = TCL_ERROR;
- goto done;
case TK_SCROLL_MOVETO:
newY = canvasPtr->scrollY1 - canvasPtr->inset + (int) (
fraction*(canvasPtr->scrollY2-canvasPtr->scrollY1) + 0.5);
@@ -2134,6 +2131,9 @@ CanvasWidgetCmd(
* (Tk_Height(canvasPtr->tkwin) - 2*canvasPtr->inset));
}
break;
+ default:
+ result = TCL_ERROR;
+ goto done;
}
CanvasSetOrigin(canvasPtr, canvasPtr->xOrigin, newY);
break;
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index a6684c7..bf7626a 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -953,8 +953,6 @@ EntryWidgetObjCmd(
index = entryPtr->leftIndex;
switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction,
&count)) {
- case TK_SCROLL_ERROR:
- goto error;
case TK_SCROLL_MOVETO:
index = (int) ((fraction * entryPtr->numChars) + 0.5);
break;
@@ -972,6 +970,8 @@ EntryWidgetObjCmd(
case TK_SCROLL_UNITS:
index += count;
break;
+ default:
+ goto error;
}
}
if (index >= entryPtr->numChars) {
@@ -4181,8 +4181,6 @@ SpinboxWidgetObjCmd(
index = entryPtr->leftIndex;
switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction,
&count)) {
- case TK_SCROLL_ERROR:
- goto error;
case TK_SCROLL_MOVETO:
index = (int) ((fraction * entryPtr->numChars) + 0.5);
break;
@@ -4201,6 +4199,8 @@ SpinboxWidgetObjCmd(
case TK_SCROLL_UNITS:
index += count;
break;
+ default:
+ goto error;
}
}
if (index >= entryPtr->numChars) {
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 79c644a..7977d43 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -1280,8 +1280,6 @@ ListboxXviewSubCmd(
ChangeListboxOffset(listPtr, index*listPtr->xScrollUnit);
} else {
switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count)) {
- case TK_SCROLL_ERROR:
- return TCL_ERROR;
case TK_SCROLL_MOVETO:
offset = (int) (fraction*listPtr->maxWidth + 0.5);
break;
@@ -1297,6 +1295,8 @@ ListboxXviewSubCmd(
case TK_SCROLL_UNITS:
offset = listPtr->xOffset + count*listPtr->xScrollUnit;
break;
+ default:
+ return TCL_ERROR;
}
ChangeListboxOffset(listPtr, offset);
}
@@ -1367,7 +1367,6 @@ ListboxYviewSubCmd(
case TK_SCROLL_UNITS:
index = listPtr->topIndex + count;
break;
- case TK_SCROLL_ERROR:
default:
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index 9cf8eae..c3b847a 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -229,8 +229,6 @@ int TtkScrollviewCommand(
int count;
switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count)) {
- case TK_SCROLL_ERROR:
- return TCL_ERROR;
case TK_SCROLL_MOVETO:
newFirst = (int) ((fraction * s->total) + 0.5);
break;
@@ -242,6 +240,8 @@ int TtkScrollviewCommand(
newFirst = s->first + count * perPage;
break;
}
+ default:
+ return TCL_ERROR;
}
}
diff --git a/library/ttk/panedwindow.tcl b/library/ttk/panedwindow.tcl
index 0fd9bd7..1989b89 100644
--- a/library/ttk/panedwindow.tcl
+++ b/library/ttk/panedwindow.tcl
@@ -45,9 +45,9 @@ proc ttk::panedwindow::Press {w x y} {
proc ttk::panedwindow::Drag {w x y} {
variable State
if {!$State(pressed)} { return }
- switch -- [$w cget -orient] {
- horizontal { set delta [expr {$x - $State(pressX)}] }
- vertical { set delta [expr {$y - $State(pressY)}] }
+ switch -glob -- [$w cget -orient] {
+ h* { set delta [expr {$x - $State(pressX)}] }
+ v* { set delta [expr {$y - $State(pressY)}] }
}
$w sashpos $State(sash) [expr {$State(sashPos) + $delta}]
}
@@ -80,9 +80,9 @@ proc ttk::panedwindow::SetCursor {w x y} {
set cursor $State(userConfCursor)
if {[llength [$w identify $x $y]]} {
# Assume we're over a sash.
- switch -- [$w cget -orient] {
- horizontal { set cursor hresize }
- vertical { set cursor vresize }
+ switch -glob -- [$w cget -orient] {
+ h* { set cursor hresize }
+ v* { set cursor vresize }
}
}
ttk::setCursor $w $cursor
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 3b3fa69..e98070e 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -911,7 +911,7 @@ clean:
distclean: clean
rm -rf Makefile config.status config.cache config.log tkConfig.sh \
- tkConfig.h *.plist Tk.framework tk.pc
+ tkConfig.h *.plist Tk.framework tk.pc tkUuid.h
depend:
makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
diff --git a/win/Makefile.in b/win/Makefile.in
index 7903efc..2b7c2f1 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -732,7 +732,7 @@ clean: cleanhelp
distclean: clean
$(RM) Makefile config.status config.cache config.log tkConfig.sh \
- wish.exe.manifest
+ wish.exe.manifest tkUuid.h
Makefile: $(SRC_DIR)/Makefile.in
./config.status