From ca837abc0b51f23e81137076d37d8049152b606c Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 13 Oct 2014 17:39:26 +0000 Subject: Bump to 8.5.17 --- README | 2 +- library/tk.tcl | 2 +- unix/configure | 2 +- unix/configure.in | 2 +- unix/tk.spec | 2 +- win/configure | 2 +- win/configure.in | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README b/README index 9bb0e26..5551ebd 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ README: Tk - This is the Tk 8.5.16 source distribution. + This is the Tk 8.5.17 source distribution. http://sourceforge.net/projects/tcl/files/Tcl/ You can get any source release of Tk from the URL above. diff --git a/library/tk.tcl b/library/tk.tcl index bb8cb2f..3dae5d4 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -15,7 +15,7 @@ package require Tcl 8.5 ;# Guard against [source] in an 8.4- interp before # Insist on running with compatible version of Tcl package require Tcl 8.5.0 # Verify that we have Tk binary and script components from the same release -package require -exact Tk 8.5.16 +package require -exact Tk 8.5.17 # Create a ::tk namespace namespace eval ::tk { diff --git a/unix/configure b/unix/configure index 65adb1e..6a053d9 100755 --- a/unix/configure +++ b/unix/configure @@ -1338,7 +1338,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".16" +TK_PATCH_LEVEL=".17" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" diff --git a/unix/configure.in b/unix/configure.in index d40c0a1..7be1791 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -25,7 +25,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".16" +TK_PATCH_LEVEL=".17" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" diff --git a/unix/tk.spec b/unix/tk.spec index 37d9107..32c0520 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -4,7 +4,7 @@ Name: tk Summary: Tk graphical toolkit for the Tcl scripting language. -Version: 8.5.16 +Version: 8.5.17 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index 136887f..7a009e7 100755 --- a/win/configure +++ b/win/configure @@ -1312,7 +1312,7 @@ SHELL=/bin/sh TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".16" +TK_PATCH_LEVEL=".17" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index de877e0..78cc2e7 100644 --- a/win/configure.in +++ b/win/configure.in @@ -14,7 +14,7 @@ SHELL=/bin/sh TK_VERSION=8.5 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 -TK_PATCH_LEVEL=".16" +TK_PATCH_LEVEL=".17" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From 1470bc986ad9550cff741af15c0dea3c252046c9 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 13 Oct 2014 17:47:40 +0000 Subject: update changes file --- changes | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changes b/changes index 19aeb11..7e0fcff 100644 --- a/changes +++ b/changes @@ -6951,3 +6951,15 @@ Many revisions to better support a Cygwin environment (nijtmans) 2014-08-01 (bug fix) OSX font config crash (rob@bitkeeper) --- Released 8.5.16, August 25, 2014 --- http://core.tcl.tk/tk/ for details + +2014-08-27 (bug) Cocoa: Crash after [$button destroy] (walzer) + +2014-09-23 (bug) Cocoa: button and scroll display fixes (walzer) + +2014-09-24 (bug) Cocoa: improved drawing performance (walzer) + +2014-10-11 (bug)[9e487e] Phony button clicks from browsers to plugin (nijtmans) + +2014-10-11 (bug)[810c43] [text] elide changes advance epoch (vogel) + +--- Released 8.5.17, October 25, 2014 --- http://core.tcl.tk/tk/ for details -- cgit v0.12 From c9ecf0793b8a211a2a5835951dfefef6b77cc8b7 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 15 Oct 2014 14:42:11 +0000 Subject: missed bump bits --- generic/tk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index ac74807..186732b 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -59,10 +59,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 5 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 16 +#define TK_RELEASE_SERIAL 17 #define TK_VERSION "8.5" -#define TK_PATCH_LEVEL "8.5.16" +#define TK_PATCH_LEVEL "8.5.17" /* * A special definition used to allow this header file to be included from -- cgit v0.12 From 6b7189fe67176362caeb0a64936b14ff7783a30a Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Tue, 21 Oct 2014 15:00:47 +0000 Subject: Fix for Mac crash on Yosemite because of changes in version checking --- macosx/tkMacOSXInit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 2bf1962..1d14990 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -225,11 +225,16 @@ TkpInit( if (!uname(&name)) { tkMacOSXMacOSXVersion = (strtod(name.release, NULL) + 96) * 10; } - if (tkMacOSXMacOSXVersion && + /*Check for new versioning scheme on Yosemite (10.10) and later.*/ + if (MAC_OS_X_VERSION_MIN_REQUIRED > 100000) { + tkMacOSXMacOSXVersion = MAC_OS_X_VERSION_MIN_REQUIRED/100; + } + if (tkMacOSXMacOSXVersion && MAC_OS_X_VERSION_MIN_REQUIRED < 100000 && tkMacOSXMacOSXVersion/10 < MAC_OS_X_VERSION_MIN_REQUIRED/10) { Tcl_Panic("Mac OS X 10.%d or later required !", (MAC_OS_X_VERSION_MIN_REQUIRED/10)-100); } + #ifdef TK_FRAMEWORK /* -- cgit v0.12 From 3da1bdd7794af6f2179dc7a61d3358fd33578d2f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 21 Oct 2014 18:32:54 +0000 Subject: Restore the use of -DTCL_NO_DEPRECATED when building Tk. Without this, attempts to build with the latest Xcode tools fail because of a conflict between the long (long long long long) deprecated macro panic() from Tcl's header and a panic() prototype in the system mach.h file, which rides into the build on the tails of Cocoa.h --- unix/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 1fde28d..d869528 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -186,7 +186,7 @@ KEYSYM_FLAGS = # Tk does not used deprecated Tcl constructs so it should # compile fine with -DTCL_NO_DEPRECATED. To remove its own # set of deprecated code uncomment the second line. -NO_DEPRECATED_FLAGS = +NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED #NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED # Some versions of make, like SGI's, use the following variable to -- cgit v0.12 From d379ee9cbafa57fcfd2c6d9cca16db84730f8185 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 21 Oct 2014 22:08:23 +0000 Subject: Fixed failing text-29.2.x - Bug [857686bb3d] --- tests/textDisp.test | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tests/textDisp.test b/tests/textDisp.test index 8e99eff..6ff71f8 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -27,9 +27,10 @@ proc scrollError args { # Create entries in the option database to be sure that geometry options # like border width have predictable values. - -option add *Text.borderWidth 2 -option add *Text.highlightThickness 2 +set twbw 2 +set twht 2 +option add *Text.borderWidth $twbw +option add *Text.highlightThickness $twht # The frame .f is needed to make sure that the overall window is always # fairly wide, even if the text window is very narrow. This is needed @@ -3366,7 +3367,7 @@ test textDisp-29.1 {miscellaneous: lines wrap but are still too long} {textfonts .t2.t window create 1.1 -window .t2.t.f update list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] -} [list [list 0.0 [expr {14.0/30}]] 300x50+5+[expr {$fixedDiff + 18}] [list 12 [expr {$fixedDiff + 68}] 7 $fixedHeight]] +} [list [list 0.0 [expr {20.0*$fixedWidth/300}]] 300x50+[expr {$twbw + $twht + 1}]+[expr {$twbw + $twht + $fixedHeight + 1}] [list [expr {$twbw + $twht + $fixedWidth + 1}] [expr {$twbw + $twht + $fixedHeight + 50 + 1}] $fixedWidth $fixedHeight]] test textDisp-29.2 {miscellaneous: lines wrap but are still too long} {textfonts} { catch {destroy .t2} toplevel .t2 @@ -3379,10 +3380,11 @@ test textDisp-29.2 {miscellaneous: lines wrap but are still too long} {textfonts .t2.t insert end 123 frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised .t2.t window create 1.1 -window .t2.t.f + update .t2.t xview scroll 1 unit update list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] -} [list [list [expr {7.0/300}] 0.49] 300x50+-2+[expr {$fixedDiff + 18}] [list 5 [expr {$fixedDiff + 68}] 7 $fixedHeight]] +} [list [list [expr {1.0*$fixedWidth/300}] [expr {21.0*$fixedWidth/300}]] 300x50+[expr {$twbw + $twht + 1 - $fixedWidth}]+[expr {$twbw + $twht + $fixedHeight + 1}] [list [expr {$twbw + $twht + $fixedWidth + 1 - $fixedWidth}] [expr {$twbw + $twht + $fixedHeight + 50 + 1}] $fixedWidth $fixedHeight]] test textDisp-29.2.1 {miscellaneous: lines wrap but are still too long} {textfonts} { catch {destroy .t2} toplevel .t2 @@ -3394,6 +3396,7 @@ test textDisp-29.2.1 {miscellaneous: lines wrap but are still too long} {textfon pack .t2.s -side bottom -fill x .t2.t insert end 1\n .t2.t insert end [string repeat "abc" 30] + update .t2.t xview scroll 5 unit update .t2.t xview @@ -3410,10 +3413,11 @@ test textDisp-29.2.2 {miscellaneous: lines wrap but are still too long} {textfon .t2.t insert end 123 frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised .t2.t window create 1.1 -window .t2.t.f + update .t2.t xview scroll 2 unit update list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] -} [list [list [expr {14.0/300}] [expr {154.0/300}]] 300x50+-9+[expr {$fixedDiff + 18}] {}] +} [list [list [expr {2.0*$fixedWidth/300}] [expr {22.0*$fixedWidth/300}]] 300x50+[expr {$twbw + $twht + 1 - 2*$fixedWidth}]+[expr {$twbw + $twht + $fixedHeight + 1}] {}] test textDisp-29.2.3 {miscellaneous: lines wrap but are still too long} {textfonts} { catch {destroy .t2} toplevel .t2 @@ -3426,10 +3430,11 @@ test textDisp-29.2.3 {miscellaneous: lines wrap but are still too long} {textfon .t2.t insert end 123 frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised .t2.t window create 1.1 -window .t2.t.f + update .t2.t xview scroll 7 pixels update list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] -} [list [list [expr {7.0/300}] 0.49] 300x50+-2+[expr {$fixedDiff + 18}] [list 5 [expr {$fixedDiff + 68}] 7 $fixedHeight]] +} [list [list [expr {7.0/300}] [expr {(20.0*$fixedWidth + 7)/300}]] 300x50+[expr {$twbw + $twht + 1 - 7}]+[expr {$twbw + $twht + $fixedHeight + 1}] [list [expr {$twbw + $twht + $fixedWidth + 1 - 7}] [expr {$twbw + $twht + $fixedHeight + 50 + 1}] $fixedWidth $fixedHeight]] test textDisp-29.2.4 {miscellaneous: lines wrap but are still too long} {textfonts} { catch {destroy .t2} toplevel .t2 @@ -3442,10 +3447,11 @@ test textDisp-29.2.4 {miscellaneous: lines wrap but are still too long} {textfon .t2.t insert end 123 frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised .t2.t window create 1.1 -window .t2.t.f + update .t2.t xview scroll 17 pixels update list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] -} [list [list [expr {17.0/300}] [expr {157.0/300}]] 300x50+-12+[expr {$fixedDiff + 18}] {}] +} [list [list [expr {17.0/300}] [expr {(20.0*$fixedWidth + 17)/300}]] 300x50+[expr {$twbw + $twht + 1 - 17}]+[expr {$twbw + $twht + $fixedHeight + 1}] [list [expr {$twbw + $twht + $fixedWidth + 1 - 17}] [expr {$twbw + $twht + $fixedHeight + 50 + 1}] $fixedWidth $fixedHeight]] test textDisp-29.2.5 {miscellaneous: can show last character} { catch {destroy .t2} toplevel .t2 -- cgit v0.12 From 180d7a54d787d46ab9864daa475b02345a10bb16 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 21 Oct 2014 22:31:23 +0000 Subject: Fixed remaining issue with textDisp-29.2.4 --- tests/textDisp.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textDisp.test b/tests/textDisp.test index 6ff71f8..70c7208 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -3451,7 +3451,7 @@ test textDisp-29.2.4 {miscellaneous: lines wrap but are still too long} {textfon .t2.t xview scroll 17 pixels update list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] -} [list [list [expr {17.0/300}] [expr {(20.0*$fixedWidth + 17)/300}]] 300x50+[expr {$twbw + $twht + 1 - 17}]+[expr {$twbw + $twht + $fixedHeight + 1}] [list [expr {$twbw + $twht + $fixedWidth + 1 - 17}] [expr {$twbw + $twht + $fixedHeight + 50 + 1}] $fixedWidth $fixedHeight]] +} [list [list [expr {17.0/300}] [expr {(20.0*$fixedWidth + 17)/300}]] 300x50+[expr {$twbw + $twht + 1 - 17}]+[expr {$twbw + $twht + $fixedHeight + 1}] {}] test textDisp-29.2.5 {miscellaneous: can show last character} { catch {destroy .t2} toplevel .t2 -- cgit v0.12 From 3c89aa72257c3d63d9bbdc1f944565ec1bcd66a4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 26 Oct 2014 07:59:14 +0000 Subject: Add support for Windows 10 --- win/wish.exe.manifest.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win/wish.exe.manifest.in b/win/wish.exe.manifest.in index 7db42e3..4829471 100644 --- a/win/wish.exe.manifest.in +++ b/win/wish.exe.manifest.in @@ -20,6 +20,8 @@ + + -- cgit v0.12 From 2de899be4f282336d57ace6810563233c87b13d6 Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Tue, 28 Oct 2014 14:40:24 +0000 Subject: Fix for different ttk notebook tab metrics on OS X/Yosemite --- macosx/ttkMacOSXTheme.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 5752fb1..a4abc7b 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -294,14 +294,22 @@ static Ttk_StateTable TabPositionTable[] = { * TP30000359-TPXREF116> */ -static const int TAB_HEIGHT = 10; -static const int TAB_OVERLAP = 10; + +int TAB_HEIGHT = 0; +int TAB_OVERLAP = 0; static void TabElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { - *heightPtr = TAB_HEIGHT + TAB_OVERLAP - 1; + TAB_HEIGHT = 10; + TAB_OVERLAP = 10; + /*Different metrics on 10.10/Yosemite.*/ + if (MAC_OS_X_VERSION_MIN_REQUIRED > 100000) { + TAB_OVERLAP = 5; + } + *heightPtr = TAB_HEIGHT + TAB_OVERLAP - 1; + } static void TabElementDraw( -- cgit v0.12 From 90f1bb2871f27fb60b636b4b70b9b6e5f9dc3eda Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Tue, 28 Oct 2014 14:42:40 +0000 Subject: Fix for different ttk notebook tab metrics on OS X/Yosemite --- macosx/ttkMacOSXTheme.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 5752fb1..64b96cb 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -294,14 +294,21 @@ static Ttk_StateTable TabPositionTable[] = { * TP30000359-TPXREF116> */ -static const int TAB_HEIGHT = 10; -static const int TAB_OVERLAP = 10; +int TAB_HEIGHT = 0; +int TAB_OVERLAP = 0; static void TabElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { - *heightPtr = TAB_HEIGHT + TAB_OVERLAP - 1; + TAB_HEIGHT = 10; + TAB_OVERLAP = 10; + /*Different metrics on 10.10/Yosemite.*/ + if (MAC_OS_X_VERSION_MIN_REQUIRED > 100000) { + TAB_OVERLAP = 5; + } + *heightPtr = TAB_HEIGHT + TAB_OVERLAP - 1; + } static void TabElementDraw( -- cgit v0.12 From f3920ba043d2210ee77a82e052b6861a04815dea Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 29 Oct 2014 23:05:22 +0000 Subject: Fixed bug [3417012fff] --- generic/tkScale.c | 11 ++++++++--- tests/scale.test | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/generic/tkScale.c b/generic/tkScale.c index 28e5b16..258a1fa 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -632,7 +632,12 @@ ConfigureScale( scalePtr->tickInterval = -scalePtr->tickInterval; } - ComputeFormat(scalePtr); + if (scalePtr->digits > TCL_MAX_PREC) { + Tcl_AppendResult(interp, "too large -digits value", NULL); + continue; + } else { + ComputeFormat(scalePtr); + } scalePtr->labelLength = scalePtr->label ? (int)strlen(scalePtr->label) : 0; @@ -888,7 +893,7 @@ static void ComputeScaleGeometry( register TkScale *scalePtr) /* Information about widget. */ { - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; int tmp, valuePixels, x, y, extraSpace; Tk_FontMetrics fm; @@ -1304,7 +1309,7 @@ ScaleSetVariable( register TkScale *scalePtr) /* Info about widget. */ { if (scalePtr->varNamePtr != NULL) { - char string[PRINT_CHARS]; + char string[TCL_DOUBLE_SPACE]; sprintf(string, scalePtr->format, scalePtr->value); scalePtr->flags |= SETTING_VAR; diff --git a/tests/scale.test b/tests/scale.test index 657f668..527b319 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -35,6 +35,7 @@ foreach test { {-command "set x" {set x} {} {}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} {-digits 5 5 badValue {expected integer but got "badValue"}} + {-digits 17 17 18 {too large -digits value}} {-fg #00ff00 #00ff00 badValue {unknown color name "badValue"}} {-font fixed fixed {} {font "" doesn't exist}} {-foreground green green badValue {unknown color name "badValue"}} -- cgit v0.12 From 01c3b6eae077a604ee4419c21a8192125bb42844 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 30 Oct 2014 15:07:28 +0000 Subject: Pushing the fix out to more files. --- generic/tkScale.c | 10 ++++------ generic/tkScale.h | 6 ------ macosx/tkMacOSXScale.c | 2 +- tests/scale.test | 1 - unix/tkUnixScale.c | 8 ++++---- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/generic/tkScale.c b/generic/tkScale.c index 258a1fa..69a7d91 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -632,12 +632,7 @@ ConfigureScale( scalePtr->tickInterval = -scalePtr->tickInterval; } - if (scalePtr->digits > TCL_MAX_PREC) { - Tcl_AppendResult(interp, "too large -digits value", NULL); - continue; - } else { - ComputeFormat(scalePtr); - } + ComputeFormat(scalePtr); scalePtr->labelLength = scalePtr->label ? (int)strlen(scalePtr->label) : 0; @@ -813,6 +808,9 @@ ComputeFormat( */ numDigits = scalePtr->digits; + if (numDigits > TCL_MAX_PREC) { + numDigits = 0; + } if (numDigits <= 0) { if (scalePtr->resolution > 0) { /* diff --git a/generic/tkScale.h b/generic/tkScale.h index f406bf6..a2c5f2b 100644 --- a/generic/tkScale.h +++ b/generic/tkScale.h @@ -220,12 +220,6 @@ typedef struct TkScale { #define SPACING 2 /* - * How many characters of space to provide when formatting the scale's value: - */ - -#define PRINT_CHARS 150 - -/* * Declaration of procedures used in the implementation of the scale widget. */ diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c index e94763d..a37029c 100644 --- a/macosx/tkMacOSXScale.c +++ b/macosx/tkMacOSXScale.c @@ -145,7 +145,7 @@ TkpDisplayScale( Tk_Window tkwin = scalePtr->tkwin; Tcl_Interp *interp = scalePtr->interp; int result; - char string[PRINT_CHARS]; + char string[TCL_DOUBLE_SPACE]; MacScale *macScalePtr = (MacScale *) clientData; Rect r; WindowRef windowRef; diff --git a/tests/scale.test b/tests/scale.test index 527b319..657f668 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -35,7 +35,6 @@ foreach test { {-command "set x" {set x} {} {}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} {-digits 5 5 badValue {expected integer but got "badValue"}} - {-digits 17 17 18 {too large -digits value}} {-fg #00ff00 #00ff00 badValue {unknown color name "badValue"}} {-font fixed fixed {} {font "" doesn't exist}} {-foreground green green badValue {unknown color name "badValue"}} diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c index e158549..71f9ea8 100644 --- a/unix/tkUnixScale.c +++ b/unix/tkUnixScale.c @@ -262,7 +262,7 @@ DisplayVerticalValue( { register Tk_Window tkwin = scalePtr->tkwin; int y, width, length; - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; Tk_FontMetrics fm; Tk_GetFontMetrics(scalePtr->tkfont, &fm); @@ -341,7 +341,7 @@ DisplayHorizontalScale( */ if (tickInterval != 0) { - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; double ticks, maxTicks; /* @@ -478,7 +478,7 @@ DisplayHorizontalValue( { register Tk_Window tkwin = scalePtr->tkwin; int x, y, length, width; - char valueString[PRINT_CHARS]; + char valueString[TCL_DOUBLE_SPACE]; Tk_FontMetrics fm; x = TkScaleValueToPixel(scalePtr, value); @@ -535,7 +535,7 @@ TkpDisplayScale( Tcl_Interp *interp = scalePtr->interp; Pixmap pixmap; int result; - char string[PRINT_CHARS]; + char string[TCL_DOUBLE_SPACE]; XRectangle drawnArea; scalePtr->flags &= ~REDRAW_PENDING; -- cgit v0.12 From 69a9c784d764e95b1b34c1b37d7a7df4a4c90647 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 30 Oct 2014 15:13:10 +0000 Subject: Test for 3417012 --- tests/scale.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/scale.test b/tests/scale.test index 657f668..d7ded7f 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -387,6 +387,11 @@ test scale-6.20 {ComputeFormat procedure} { .s set 1001.23456789 .s get } {1001.235} +test scale-6.21 {ComputeFormat procedure} { + .s configure -length 200 -from 1000 -to 1001.8 -resolution 0 -digits 200 + .s set 1001.23456789 + .s get +} {1001.235} test scale-7.1 {ComputeScaleGeometry procedure} {nonPortable fonts} { catch {destroy .s} -- cgit v0.12 From c58fbb3f9791fad348f5441c96d26b1015e0098c Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 30 Oct 2014 21:50:07 +0000 Subject: Fixed bug [3529885fff] --- library/scale.tcl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/scale.tcl b/library/scale.tcl index b4da824..771c7a4 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -223,7 +223,13 @@ proc ::tk::ScaleIncrement {w dir big repeat} { set inc [$w cget -resolution] } if {([$w cget -from] > [$w cget -to]) ^ ($dir eq "up")} { - set inc [expr {-$inc}] + if {$inc > 0} { + set inc [expr {-$inc}] + } + } else { + if {$inc < 0} { + set inc [expr {-$inc}] + } } $w set [expr {[$w get] + $inc}] -- cgit v0.12 From 3216e67c5daaf17434319af4d2456c2209b5d39f Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 6 Nov 2014 17:30:39 +0000 Subject: [9d72dcd3bc] Plug memleak --- macosx/tkMacOSXButton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 41436df..b9ee7a3 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -198,7 +198,7 @@ TkpDestroyButton( [macButtonPtr->button setTag:(NSInteger)-1]; TkMacOSXMakeCollectableAndRelease(macButtonPtr->button); - TkMacOSXMakeCollectableAndRelease(macButtonPtr->selectImage); + TkMacOSXMakeCollectableAndRelease(macButtonPtr->image); TkMacOSXMakeCollectableAndRelease(macButtonPtr->selectImage); TkMacOSXMakeCollectableAndRelease(macButtonPtr->tristateImage); } -- cgit v0.12 From ba46065bdddd77146da41ff64ffd1f6dce7189e1 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 6 Nov 2014 18:31:41 +0000 Subject: Stop invalid read. --- generic/tkMenu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 064eaca..3808b09 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -1461,6 +1461,7 @@ DestroyMenuEntry( } } UnhookCascadeEntry(mePtr); + menuRefPtr = mePtr->childMenuRefPtr; if (menuRefPtr != NULL) { if (menuRefPtr->menuPtr == destroyThis) { menuRefPtr->menuPtr = NULL; -- cgit v0.12 From 047316eaff14d14c10caa5f0742c426f3963c60b Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 6 Nov 2014 21:45:40 +0000 Subject: Added test case for bug [3529885fff] --- tests/scale.test | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/scale.test b/tests/scale.test index d7ded7f..73d0f2d 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -867,6 +867,39 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} \ } \ -result {0 {}} +test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \ + -setup { + catch {destroy .s} + catch {destroy .s1 .s2 .s3 .s4} + scale .s1 -from 0 -to 100 -resolution 1 -variable x1 -digits 4 -orient horizontal -length 100 + scale .s2 -from 0 -to 100 -resolution -1 -variable x2 -digits 4 -orient horizontal -length 100 + scale .s3 -from 100 -to 0 -resolution 1 -variable x3 -digits 4 -orient horizontal -length 100 + scale .s4 -from 100 -to 0 -resolution -1 -variable x4 -digits 4 -orient horizontal -length 100 + pack .s1 .s2 .s3 .s4 -side left + update + } \ + -body { + foreach {x y} [.s1 coord 50] {} + event generate .s1 <1> -x $x -y $y + event generate .s1 -x $x -y $y + foreach {x y} [.s2 coord 50] {} + event generate .s2 <1> -x $x -y $y + event generate .s2 -x $x -y $y + foreach {x y} [.s3 coord 50] {} + event generate .s3 <1> -x $x -y $y + event generate .s3 -x $x -y $y + foreach {x y} [.s4 coord 50] {} + event generate .s4 <1> -x $x -y $y + event generate .s4 -x $x -y $y + update + list $x1 $x2 $x3 $x4 + } \ + -cleanup { + unset x1 x2 x3 x4 x y + destroy .s1 .s2 .s3 .s4 + } \ + -result {1.0 1.0 1.0 1.0} + catch {destroy .s} option clear -- cgit v0.12