From b3560c6510a28841ff4163274f41b0e1d7c2d9e7 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 11 Mar 2003 23:48:26 +0000 Subject: Backported the code that makes the makefile build pkgIndex.tcl as part of the install step. --- ChangeLog | 5 +++++ win/makefile.vc | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25f1fff..993bc5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-03-11 Kevin Kenny + + * win/makefile.vc: Backported the code that makes the makefile + build pkgIndex.tcl as part of the install step. + 2003-03-03 Jeff Hobbs *** 8.4.2 TAGGED FOR RELEASE *** diff --git a/win/makefile.vc b/win/makefile.vc index c8fe5bf..7cc7e06 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.67 2003/02/14 20:30:36 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.67.2.1 2003/03/11 23:48:26 kennykb Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -165,7 +165,7 @@ PROJECT = tk !endif STUBPREFIX = $(PROJECT)stub -DOTVERSION = 8.4 +DOTVERSION = 8.5 VERSION = $(DOTVERSION:.=) WISHNAMEPREFIX = wish @@ -520,6 +520,13 @@ install-binaries: !endif @$(CPY) "$(TKIMPLIB)" "$(LIB_INSTALL_DIR)\" @$(CPY) "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\" +!if !$(STATIC_BUILD) + @echo Creating package index "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" + -del "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" + echo if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)] != 0} { return } > "$(OUT_DIR)\pkgIndex.tcl" + echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk] >>"$(OUT_DIR)\pkgIndex.tcl" + $(CPY) "$(OUT_DIR)\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\" +!endif install-libraries: @$(CPY) "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)\" -- cgit v0.12 From 71735b0278922067a10155f4ad78ef0ed91a9964 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Thu, 13 Mar 2003 16:41:46 +0000 Subject: Backed the version to 8.4 on the 8.4 branch. (I just loathe sticky tags). --- ChangeLog | 5 +++++ win/makefile.vc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 993bc5f..839778c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-03-13 Kevin Kenny + + * win/makefile.vc: Backed the version to 8.4 on the 8.4 branch. + (I just loathe sticky tags). + 2002-03-11 Kevin Kenny * win/makefile.vc: Backported the code that makes the makefile diff --git a/win/makefile.vc b/win/makefile.vc index 7cc7e06..7470ade 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.67.2.1 2003/03/11 23:48:26 kennykb Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.67.2.2 2003/03/13 16:41:48 kennykb Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -165,7 +165,7 @@ PROJECT = tk !endif STUBPREFIX = $(PROJECT)stub -DOTVERSION = 8.5 +DOTVERSION = 8.4 VERSION = $(DOTVERSION:.=) WISHNAMEPREFIX = wish -- cgit v0.12 From cb3a46363200816c14cf59c396fd346233a1d50c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 13 Mar 2003 19:33:41 +0000 Subject: * tests/unixWm.test: Constrained all tests older than revision 1.21 to run only on Unix. Alternative approach did not match maintainer habits. * tests/spinbox.test (spinbox-17.4): Avoid long failure message. --- ChangeLog | 7 ++ tests/spinbox.test | 3 +- tests/unixWm.test | 340 ++++++++++++++++++++++++++--------------------------- 3 files changed, 179 insertions(+), 171 deletions(-) diff --git a/ChangeLog b/ChangeLog index 839778c..72fcfe0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-03-13 Don Porter + + * tests/unixWm.test: Constrained all tests older than revision 1.21 + to run only on Unix. Alternative approach did not match maintainer + habits. + * tests/spinbox.test (spinbox-17.4): Avoid long failure message. + 2003-03-13 Kevin Kenny * win/makefile.vc: Backed the version to 8.4 on the 8.4 branch. diff --git a/tests/spinbox.test b/tests/spinbox.test index 5881087..e668a70 100644 --- a/tests/spinbox.test +++ b/tests/spinbox.test @@ -4,7 +4,7 @@ # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: spinbox.test,v 1.5 2003/02/25 00:46:41 hobbs Exp $ +# RCS: @(#) $Id: spinbox.test,v 1.5.2.1 2003/03/13 19:33:48 dgp Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -1272,6 +1272,7 @@ test spinbox-17.3 {SpinboxUpdateScrollbar procedure} { } {0.315789 0.842105} test spinbox-17.4 {SpinboxUpdateScrollbar procedure} { destroy .e + set x "Background error did not happen" proc bgerror msg { global x set x $msg diff --git a/tests/unixWm.test b/tests/unixWm.test index 4bb5379..47f1b8d 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: unixWm.test,v 1.29 2002/11/07 22:27:04 mdejong Exp $ +# RCS: @(#) $Id: unixWm.test,v 1.29.2.1 2003/03/13 19:33:49 dgp Exp $ package require tcltest 2.2 namespace import -force tcltest::configure @@ -395,7 +395,7 @@ test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} { } {test command } -test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} { +test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix { catch {destroy .t} toplevel .t -width 100 -height 300 -bg blue wm geom .t +0+0 @@ -403,7 +403,7 @@ test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} { sleep 500 winfo ismapped .t } {0} -test unixWm-9.4 {TkWmMapWindow procedure, icon windows} { +test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix { catch {destroy .t} sleep 500 toplevel .t -width 100 -height 50 -bg blue @@ -411,7 +411,7 @@ test unixWm-9.4 {TkWmMapWindow procedure, icon windows} { update set result [winfo ismapped .t] } {0} -test unixWm-9.5 {TkWmMapWindow procedure, normal windows} { +test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix { catch {destroy .t} toplevel .t -width 200 -height 20 wm geom .t +0+0 @@ -421,7 +421,7 @@ test unixWm-9.5 {TkWmMapWindow procedure, normal windows} { testConstraint testmenubar [llength [info commands testmenubar]] -test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} { +test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} unix { catch {destroy .t} toplevel .t -width 100 -height 50 wm geom .t +0+0 @@ -444,16 +444,16 @@ test unixWm-10.2 {TkWmDeadWindow procedure, destroying menubar} {unix testmenuba lappend result [winfo exists .f] } {destroyed 0} -test unixWm-11.1 {Tk_WmCmd procedure, miscellaneous errors} { +test unixWm-11.1 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm} msg] $msg } {1 {wrong # args: should be "wm option window ?arg ...?"}} -test unixWm-11.2 {Tk_WmCmd procedure, miscellaneous errors} { +test unixWm-11.2 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm aspect} msg] $msg } {1 {wrong # args: should be "wm option window ?arg ...?"}} -test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} { +test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm iconify bogus} msg] $msg } {1 {bad window path name "bogus"}} -test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} { +test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} unix { catch {destroy .b} button .b -text hello list [catch {wm geometry .b} msg] $msg @@ -466,13 +466,13 @@ toplevel .t -width 100 -height 50 wm geom .t +0+0 update -test unixWm-12.1 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.1 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 12} msg] $msg } {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}} -test unixWm-12.2 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.2 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 12 13 14 15 16} msg] $msg } {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}} -test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} unix { set result {} lappend result [wm aspect .t] wm aspect .t 3 4 10 2 @@ -480,32 +480,32 @@ test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} { wm aspect .t {} {} {} {} lappend result [wm aspect .t] } {{} {3 4 10 2} {}} -test unixWm-12.4 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.4 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t bad 14 15 16} msg] $msg } {1 {expected integer but got "bad"}} -test unixWm-12.5 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.5 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 foo 15 16} msg] $msg } {1 {expected integer but got "foo"}} -test unixWm-12.6 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.6 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 bar 16} msg] $msg } {1 {expected integer but got "bar"}} -test unixWm-12.7 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.7 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 15 baz} msg] $msg } {1 {expected integer but got "baz"}} -test unixWm-12.8 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.8 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 0 14 15 16} msg] $msg } {1 {aspect number can't be <= 0}} -test unixWm-12.9 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.9 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 0 15 16} msg] $msg } {1 {aspect number can't be <= 0}} -test unixWm-12.10 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.10 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 0 16} msg] $msg } {1 {aspect number can't be <= 0}} -test unixWm-12.11 {Tk_WmCmd procedure, "aspect" option} { +test unixWm-12.11 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 15 0} msg] $msg } {1 {aspect number can't be <= 0}} -test unixWm-13.1 {Tk_WmCmd procedure, "client" option} { +test unixWm-13.1 {Tk_WmCmd procedure, "client" option} unix { list [catch {wm client .t x y} msg] $msg } {1 {wrong # args: should be "wm client window ?name?"}} test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unix testwrapper} { @@ -518,7 +518,7 @@ test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unix testwrapper} { wm client .t {} lappend result [wm client .t] [testprop [testwrapper .t] WM_CLIENT_MACHINE] } {{} Test_String New {} {}} -test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} { +test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} unix { catch {destroy .t2} toplevel .t2 wm client .t2 Test_String @@ -527,10 +527,10 @@ test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} { destroy .t2 } {} -test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm colormapwindows .t 12 13} msg] $msg } {1 {wrong # args: should be "wm colormapwindows window ?windowList?"}} -test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} unix { catch {destroy .t2} toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 @@ -544,13 +544,13 @@ test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} { update list $x [wm colormapwindows .t2] } {{.t2.b .t2} {.t2.b .t2.c .t2}} -test unixWm-14.3 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.3 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm col . "a \{"} msg] $msg } {1 {unmatched open brace in list}} -test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm colormapwindows . foo} msg] $msg } {1 {bad window path name "foo"}} -test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} unix { catch {destroy .t2} toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 @@ -561,7 +561,7 @@ test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} { wm colormapwindows .t2 {.t2.c .t2 .t2.a} wm colormapwindows .t2 } {.t2.c .t2 .t2.a} -test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} unix { catch {destroy .t2} toplevel .t2 -width 200 -height 200 wm geom .t2 +0+0 @@ -572,7 +572,7 @@ test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} { wm colormapwindows .t2 {.t2.b .t2.a} wm colormapwindows .t2 } {.t2.b .t2.a} -test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} { +test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} unix { catch {destroy .t2} toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 @@ -582,10 +582,10 @@ test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} { } {{} {}} catch {destroy .t2} -test unixWm-15.1 {Tk_WmCmd procedure, "command" option} { +test unixWm-15.1 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t 12 13} msg] $msg } {1 {wrong # args: should be "wm command window ?value?"}} -test unixWm-15.2 {Tk_WmCmd procedure, "command" option} { +test unixWm-15.2 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t 12 13} msg] $msg } {1 {wrong # args: should be "wm command window ?value?"}} test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unix testwrapper} { @@ -600,7 +600,7 @@ test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unix testwrapper} { } {{} {test command } {new command} {} {}} -test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} { +test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} unix { catch {destroy .t2} toplevel .t2 wm geom .t2 +0+0 @@ -609,14 +609,14 @@ test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} { wm command .t2 {} destroy .t2 } {} -test unixWm-15.5 {Tk_WmCmd procedure, "command" option} { +test unixWm-15.5 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t "a \{b"} msg] $msg } {1 {unmatched open brace in list}} -test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} { +test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} unix { list [catch {wm deiconify .t 12} msg] $msg } {1 {wrong # args: should be "wm deiconify window"}} -test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} { +test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} unix { catch {destroy .icon} toplevel .icon -width 50 -height 50 -bg red wm iconwindow .t .icon @@ -624,7 +624,7 @@ test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} { destroy .icon set result } {1 {can't deiconify .icon: it is an icon for .t}} -test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} { +test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} unix { wm iconify .t set result {} lappend result [winfo ismapped .t] [wm state .t] @@ -632,13 +632,13 @@ test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} { lappend result [winfo ismapped .t] [wm state .t] } {0 iconic 1 normal} -test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} { +test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} unix { list [catch {wm focusmodel .t 12 13} msg] $msg } {1 {wrong # args: should be "wm focusmodel window ?active|passive?"}} -test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} { +test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} unix { list [catch {wm focusmodel .t bogus} msg] $msg } {1 {bad argument "bogus": must be active or passive}} -test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} { +test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} unix { set result {} lappend result [wm focusmodel .t] wm focusmodel .t active @@ -648,13 +648,13 @@ test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} { set result } {passive active passive} -test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} { +test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} unix { list [catch {wm frame .t 12} msg] $msg } {1 {wrong # args: should be "wm frame window"}} -test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} nonPortable { +test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} { expr [wm frame .t] == [winfo id .t] } {0} -test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} nonPortable { +test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} { catch {destroy .t2} toplevel .t2 wm geom .t2 +0+0 @@ -665,20 +665,20 @@ test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} nonPortable { set result } {1} -test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} { +test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} unix { list [catch {wm geometry .t 12 13} msg] $msg } {1 {wrong # args: should be "wm geometry window ?newGeometry?"}} -test unixWm-19.2 {Tk_WmCmd procedure, "geometry" option} nonPortable { +test unixWm-19.2 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t -1+5 update wm geometry .t } {100x50-1+5} -test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} nonPortable { +test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t +10-4 update wm geometry .t } {100x50+10-4} -test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} nonPortable { +test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { catch {destroy .t2} toplevel .t2 wm geom .t2 -5+10 @@ -689,7 +689,7 @@ test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} nonPortable { destroy .t2 set result } {30x12-5+10} -test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} nonPortable { +test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t 150x300+5+6 update set result {} @@ -698,17 +698,17 @@ test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} nonPortable { update lappend result [wm geometry .t] } {150x300+5+6 100x50+5+6} -test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} { +test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} {unix} { list [catch {wm geometry .t qrs} msg] $msg } {1 {bad geometry specifier "qrs"}} -test unixWm-20.1 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.1 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 12 13} msg] $msg } {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}} -test unixWm-20.2 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.2 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 12 13 14 15 16} msg] $msg } {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}} -test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} unix { set result {} lappend result [wm grid .t] wm grid .t 5 6 20 10 @@ -716,28 +716,28 @@ test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} { wm grid .t {} {} {} {} lappend result [wm grid .t] } {{} {5 6 20 10} {}} -test unixWm-20.4 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.4 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t bad 10 11 12} msg] $msg } {1 {expected integer but got "bad"}} -test unixWm-20.5 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.5 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t -1 11 12 13} msg] $msg } {1 {baseWidth can't be < 0}} -test unixWm-20.6 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.6 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 foo 12 13} msg] $msg } {1 {expected integer but got "foo"}} -test unixWm-20.7 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.7 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 -11 12 13} msg] $msg } {1 {baseHeight can't be < 0}} -test unixWm-20.8 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.8 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 bar 13} msg] $msg } {1 {expected integer but got "bar"}} -test unixWm-20.9 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.9 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 -2 13} msg] $msg } {1 {widthInc can't be < 0}} -test unixWm-20.10 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.10 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 12 bogus} msg] $msg } {1 {expected integer but got "bogus"}} -test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} { +test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 12 -1} msg] $msg } {1 {heightInc can't be < 0}} @@ -747,10 +747,10 @@ toplevel .t -width 100 -height 50 wm geom .t +0+0 update -test unixWm-21.1 {Tk_WmCmd procedure, "group" option} { +test unixWm-21.1 {Tk_WmCmd procedure, "group" option} unix { list [catch {wm group .t 12 13} msg] $msg } {1 {wrong # args: should be "wm group window ?pathName?"}} -test unixWm-21.2 {Tk_WmCmd procedure, "group" option} { +test unixWm-21.2 {Tk_WmCmd procedure, "group" option} unix { list [catch {wm group .t bogus} msg] $msg } {1 {bad window path name "bogus"}} test unixWm-21.3 {Tk_WmCmd procedure, "group" option} {unix testwrapper} { @@ -804,14 +804,14 @@ test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} { WM_HINTS] 0]]] lappend result [wm iconbitmap .t] $bit } {{} questhead 0x4 {} 0x0} -test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} { +test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option} unix { list [catch {wm iconbitmap .t bad-bitmap} msg] $msg } {1 {bitmap "bad-bitmap" not defined}} -test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} { +test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix { list [catch {wm iconify .t 12} msg] $msg } {1 {wrong # args: should be "wm iconify window"}} -test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} { +test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix { catch {destroy .t2} toplevel .t2 wm overrideredirect .t2 1 @@ -819,7 +819,7 @@ test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} { destroy .t2 set result } {1 {can't iconify ".t2": override-redirect flag is set}} -test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} { +test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} unix { catch {destroy .t2} toplevel .t2 wm geom .t2 +0+0 @@ -828,7 +828,7 @@ test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} { destroy .t2 set result } {1 {can't iconify ".t2": it is a transient}} -test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} { +test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix { catch {destroy .t2} toplevel .t2 wm geom .t2 +0+0 @@ -837,7 +837,7 @@ test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} { destroy .t2 set result } {1 {can't iconify .t2: it is an icon for .t}} -test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} { +test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix { catch {destroy .t2} toplevel .t2 wm geom .t2 +0+0 @@ -848,7 +848,7 @@ test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} { destroy .t2 set result } {0} -test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} { +test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix { catch {destroy .t2} toplevel .t2 wm geom .t2 -0+0 @@ -861,7 +861,7 @@ test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} { set result } {1 0} -test unixWm-24.1 {Tk_WmCmd procedure, "iconmask" option} { +test unixWm-24.1 {Tk_WmCmd procedure, "iconmask" option} unix { list [catch {wm iconmask .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconmask window ?bitmap?"}} test unixWm-24.2 {Tk_WmCmd procedure, "iconmask" option} {unix testwrapper} { @@ -876,14 +876,14 @@ test unixWm-24.2 {Tk_WmCmd procedure, "iconmask" option} {unix testwrapper} { WM_HINTS] 0]]] lappend result [wm iconmask .t] $bit } {{} questhead 0x20 {} 0x0} -test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} { +test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} unix { list [catch {wm iconmask .t bogus} msg] $msg } {1 {bitmap "bogus" not defined}} -test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} { +test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} unix { list [catch {wm icon .t} msg] $msg } {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} -test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} { +test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} unix { list [catch {wm iconname .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconname window ?newName?"}} test unixWm-25.3 {Tk_WmCmd procedure, "iconname" option} {unix testwrapper} { @@ -895,10 +895,10 @@ test unixWm-25.3 {Tk_WmCmd procedure, "iconname" option} {unix testwrapper} { lappend result [wm iconname .t] [testprop [testwrapper .t] WM_ICON_NAME] } {{} test_name test_name {} {}} -test unixWm-26.1 {Tk_WmCmd procedure, "iconposition" option} { +test unixWm-26.1 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t 12} msg] $msg } {1 {wrong # args: should be "wm iconposition window ?x y?"}} -test unixWm-26.2 {Tk_WmCmd procedure, "iconposition" option} { +test unixWm-26.2 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t 12 13 14} msg] $msg } {1 {wrong # args: should be "wm iconposition window ?x y?"}} test unixWm-26.3 {Tk_WmCmd procedure, "iconposition" option} {unix testwrapper} { @@ -913,14 +913,14 @@ test unixWm-26.3 {Tk_WmCmd procedure, "iconposition" option} {unix testwrapper} WM_HINTS] 0]]] lappend result [wm iconposition .t] $bit } {{} {10 15} 0xa 0xf 0x10 {} 0x0} -test unixWm-26.4 {Tk_WmCmd procedure, "iconposition" option} { +test unixWm-26.4 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t bad 13} msg] $msg } {1 {expected integer but got "bad"}} -test unixWm-26.5 {Tk_WmCmd procedure, "iconposition" option} { +test unixWm-26.5 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t 13 lousy} msg] $msg } {1 {expected integer but got "lousy"}} -test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} { +test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} unix { list [catch {wm iconwindow .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconwindow window ?pathName?"}} test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unix testwrapper} { @@ -940,17 +940,17 @@ test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unix testwrapper} { destroy .icon set result } {{} .icon icon 0x8 1 {} withdrawn 0x0} -test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} { +test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} unix { list [catch {wm iconwindow .t bogus} msg] $msg } {1 {bad window path name "bogus"}} -test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} { +test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} unix { catch {destroy .b} button .b -text Help set result [list [catch {wm iconwindow .t .b} msg] $msg] destroy .b set result } {1 {can't use .b as icon window: not at top level}} -test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} { +test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} unix { catch {destroy .icon} toplevel .icon -width 50 -height 50 -bg green catch {destroy .t2} @@ -962,7 +962,7 @@ test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} { destroy .icon set result } {1 {.icon is already an icon for .t2}} -test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} { +test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} unix { catch {destroy .icon} catch {destroy .icon2} toplevel .icon -width 50 -height 50 -bg green @@ -975,7 +975,7 @@ test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} { destroy .icon .icon2 set result } {icon normal withdrawn icon} -test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} { +test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} unix { catch {destroy .icon} toplevel .icon -width 50 -height 50 -bg green wm geometry .icon +0+0 @@ -1024,13 +1024,13 @@ toplevel .t -width 100 -height 50 wm geom .t +0+0 update -test unixWm-30.1 {Tk_WmCmd procedure, "overrideredirect" option} { +test unixWm-30.1 {Tk_WmCmd procedure, "overrideredirect" option} unix { list [catch {wm overrideredirect .t 1 2} msg] $msg } {1 {wrong # args: should be "wm overrideredirect window ?boolean?"}} -test unixWm-30.2 {Tk_WmCmd procedure, "overrideredirect" option} { +test unixWm-30.2 {Tk_WmCmd procedure, "overrideredirect" option} unix { list [catch {wm overrideredirect .t boo} msg] $msg } {1 {expected boolean value but got "boo"}} -test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} { +test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} unix { set result {} lappend result [wm overrideredirect .t] wm overrideredirect .t true @@ -1039,7 +1039,7 @@ test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} { lappend result [wm overrideredirect .t] } {0 1 0} -test unixWm-31.1 {Tk_WmCmd procedure, "positionfrom" option} { +test unixWm-31.1 {Tk_WmCmd procedure, "positionfrom" option} unix { list [catch {wm positionfrom .t 1 2} msg] $msg } {1 {wrong # args: should be "wm positionfrom window ?user/program?"}} test unixWm-31.2 {Tk_WmCmd procedure, "positionfrom" option} {unix testwrapper} { @@ -1056,14 +1056,14 @@ test unixWm-31.2 {Tk_WmCmd procedure, "positionfrom" option} {unix testwrapper} WM_NORMAL_HINTS] 0]]] lappend result [wm positionfrom .t] $bit } {user program 0x4 user 0x1} -test unixWm-31.3 {Tk_WmCmd procedure, "positionfrom" option} { +test unixWm-31.3 {Tk_WmCmd procedure, "positionfrom" option} unix { list [catch {wm positionfrom .t none} msg] $msg } {1 {bad argument "none": must be program or user}} -test unixWm-32.1 {Tk_WmCmd procedure, "protocol" option} { +test unixWm-32.1 {Tk_WmCmd procedure, "protocol" option} unix { list [catch {wm protocol .t 1 2 3} msg] $msg } {1 {wrong # args: should be "wm protocol window ?name? ?command?"}} -test unixWm-32.2 {Tk_WmCmd procedure, "protocol" option} { +test unixWm-32.2 {Tk_WmCmd procedure, "protocol" option} unix { wm protocol .t {foo a} {a b c} wm protocol .t bar {test script for bar} set result [wm protocol .t] @@ -1094,7 +1094,7 @@ test unixWm-32.3 {Tk_WmCmd procedure, "protocol" option} {unix testwrapper} { } lappend result [wm protocol .t] $x } {{} WM_DELETE_WINDOW {bar foo} {WM_DELETE_WINDOW bar foo} {} WM_DELETE_WINDOW} -test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} { +test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} unix { set result {} wm protocol .t foo {a b c} wm protocol .t bar {test script for bar} @@ -1103,7 +1103,7 @@ test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} { wm protocol .t bar {} lappend result [wm protocol .t foo] [wm protocol .t bar] } {{a b c} {test script for bar} {} {}} -test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} { +test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} unix { wm protocol .t foo {a b c} wm protocol .t foo {test script} set result [wm protocol .t foo] @@ -1111,22 +1111,22 @@ test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} { set result } {test script} -test unixWm-33.1 {Tk_WmCmd procedure, "resizable" option} { +test unixWm-33.1 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . a} msg] $msg } {1 {wrong # args: should be "wm resizable window ?width height?"}} -test unixWm-33.2 {Tk_WmCmd procedure, "resizable" option} { +test unixWm-33.2 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . a b c} msg] $msg } {1 {wrong # args: should be "wm resizable window ?width height?"}} -test unixWm-33.3 {Tk_WmCmd procedure, "resizable" option} { +test unixWm-33.3 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable .foo a b c} msg] $msg } {1 {bad window path name ".foo"}} -test unixWm-33.4 {Tk_WmCmd procedure, "resizable" option} { +test unixWm-33.4 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . x 1} msg] $msg } {1 {expected boolean value but got "x"}} -test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} { +test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . 0 gorp} msg] $msg } {1 {expected boolean value but got "gorp"}} -test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} { +test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} unix { catch {destroy .t2} toplevel .t2 -width 200 -height 100 wm geom .t2 +0+0 @@ -1142,7 +1142,7 @@ test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} { set result } {{1 1} {1 0} {0 0} {0 1}} -test unixWm-34.1 {Tk_WmCmd procedure, "sizefrom" option} { +test unixWm-34.1 {Tk_WmCmd procedure, "sizefrom" option} unix { list [catch {wm sizefrom .t 1 2} msg] $msg } {1 {wrong # args: should be "wm sizefrom window ?user|program?"}} test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unix testwrapper} { @@ -1159,17 +1159,17 @@ test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unix testwrapper} { WM_NORMAL_HINTS] 0]]] lappend result [wm sizefrom .t] $bit } {{} program 0x8 user 0x2} -test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} { +test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} unix { list [catch {wm sizefrom .t none} msg] $msg } {1 {bad argument "none": must be program or user}} test unixWm-35.1 {Tk_WmCmd procedure, "state" option} unix { list [catch {wm state .t 1} msg] $msg } {1 {bad argument "1": must be normal, iconic, or withdrawn}} -test unixWm-35.2 {Tk_WmCmd procedure, "state" option} { +test unixWm-35.2 {Tk_WmCmd procedure, "state" option} unix { list [catch {wm state .t iconic 1} msg] $msg } {1 {wrong # args: should be "wm state window ?state?"}} -test unixWm-35.3 {Tk_WmCmd procedure, "state" option} { +test unixWm-35.3 {Tk_WmCmd procedure, "state" option} unix { set result {} catch {destroy .t2} toplevel .t2 -width 120 -height 300 @@ -1186,7 +1186,7 @@ test unixWm-35.3 {Tk_WmCmd procedure, "state" option} { destroy .t2 set result } {normal normal withdrawn iconic normal} -test unixWm-35.4 {Tk_WmCmd procedure, "state" option} { +test unixWm-35.4 {Tk_WmCmd procedure, "state" option} unix { set result {} catch {destroy .t2} toplevel .t2 -width 120 -height 300 @@ -1204,7 +1204,7 @@ test unixWm-35.4 {Tk_WmCmd procedure, "state" option} { set result } {normal normal withdrawn iconic normal} -test unixWm-36.1 {Tk_WmCmd procedure, "title" option} { +test unixWm-36.1 {Tk_WmCmd procedure, "title" option} unix { list [catch {wm title .t 1 2} msg] $msg } {1 {wrong # args: should be "wm title window ?newTitle?"}} test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unix testwrapper} { @@ -1258,10 +1258,10 @@ test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create master wrapper} set result } {{} 0} -test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} { +test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} unix { list [catch {wm withdraw .t 1} msg] $msg } {1 {wrong # args: should be "wm withdraw window"}} -test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} { +test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} unix { catch {destroy .t2} toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 @@ -1270,7 +1270,7 @@ test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} { destroy .t2 set result } {1 {can't withdraw .t2: it is an icon for .t}} -test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} { +test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} unix { set result {} wm withdraw .t lappend result [wm state .t] [winfo ismapped .t] @@ -1278,14 +1278,14 @@ test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} { lappend result [wm state .t] [winfo ismapped .t] } {withdrawn 0 normal 1} -test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} { +test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} unix { list [catch {wm unknown .t} msg] $msg } {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} catch {destroy .t} catch {destroy .icon} -test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {nonPortable} { +test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {unix nonPortable} { catch {destroy .t} toplevel .t wm geometry .t 30x10+0+0 @@ -1294,7 +1294,7 @@ test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on gr update wm geometry .t } {30x10+0+0} -test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} { +test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix { catch {destroy .t} toplevel .t wm geometry .t 200x100+0+0 @@ -1306,7 +1306,7 @@ test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already wm geometry .t } {20x20+0+0} -test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} { +test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} unix { catch {destroy .t} toplevel .t -width 400 -height 150 wm geometry .t +0+0 @@ -1317,7 +1317,7 @@ test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} { sleep 500 lappend result [winfo width .t] [winfo height .t] } {400 150 200 300} -test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} { +test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} unix { catch {destroy .t} toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 @@ -1342,7 +1342,7 @@ test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] \ [winfo width .t] [winfo height .t] } {{.t.m: 200x20} {.t: 200x300} 0 0 200 20 0 20 200 300} -test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} { +test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} unix { catch {destroy .t} toplevel .t -width 400 -height 150 wm geometry .t +0+0 @@ -1353,7 +1353,7 @@ test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} { update set result } {configured: 400 150} -test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} { +test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix { catch {destroy .t} toplevel .t -width 400 -height 150 wm geometry .t +0+0 @@ -1368,7 +1368,7 @@ test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} { # No tests for ReparentEvent or ComputeReparentGeometry; I can't figure # out how to exercise these procedures reliably. -test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} { +test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} unix { catch {destroy .t} toplevel .t -width 400 -height 150 wm geometry .t +0+0 @@ -1384,7 +1384,7 @@ test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} { lappend result $x [winfo ismapped .t] } {unmapped 0 mapped 1} -test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} { +test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} unix { catch {destroy .t} toplevel .t -width 200 -height 200 wm geom .t +0+0 @@ -1402,7 +1402,7 @@ test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} { set result } {70 120 70 120} test unixWm-43.2 {TopLevelReqProc procedure, resize causes window to move} \ - {nonPortable} { + {unix nonPortable} { catch {destroy .t} toplevel .t -width 200 -height 200 wm geom .t +0+0 @@ -1417,7 +1417,7 @@ test unixWm-43.2 {TopLevelReqProc procedure, resize causes window to move} \ [winfo width .t] [winfo height .t] } {-100 50 300 150} -test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} { +test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} unix { catch {destroy .t} toplevel .t -width 100 -height 200 wm geometry .t +30+40 @@ -1427,7 +1427,7 @@ test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} { update list [winfo width .t] [winfo height .t] } {180 20} -test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} { +test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} unix { catch {destroy .t} toplevel .t -width 80 -height 60 wm grid .t 5 4 10 12 @@ -1438,7 +1438,7 @@ test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} { update list [winfo width .t] [winfo height .t] } {130 36} -test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} { +test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} unix { catch {destroy .t} toplevel .t -width 80 -height 60 wm grid .t 5 4 10 12 @@ -1449,7 +1449,7 @@ test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} { update list [winfo width .t] [winfo height .t] } {40 132} -test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} { +test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} unix { catch {destroy .t} toplevel .t -width 100 -height 200 wm geometry .t +30+40 @@ -1459,7 +1459,7 @@ test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} { update list [winfo width .t] [winfo height .t] } {300 150} -test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} { +test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} unix { catch {destroy .t} toplevel .t -width 80 -height 60 wm grid .t 18 7 10 12 @@ -1470,7 +1470,7 @@ test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} { update list [winfo width .t] [winfo height .t] } {1 72} -test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} { +test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix { catch {destroy .t} toplevel .t -width 80 -height 60 wm grid .t 18 7 10 12 @@ -1484,7 +1484,7 @@ test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} { catch {destroy .t} toplevel .t -width 80 -height 60 -test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} { +test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix { wm geometry .t +5-10 wm overrideredirect .t 1 tkwait visibility .t @@ -1493,7 +1493,7 @@ test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} { catch {destroy .t} toplevel .t -width 80 -height 60 -test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} { +test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} unix { wm geometry .t -30+2 wm overrideredirect .t 1 tkwait visibility .t @@ -1586,7 +1586,7 @@ test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenub # I don't know how to test WaitForConfigureNotify. -test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} { +test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} unix { catch {destroy .t} toplevel .t -width 200 -height 200 wm geom .t +0+0 @@ -1600,7 +1600,7 @@ test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} { list $result $x } {no yes} -test unixWm-47.1 {WaitRestrictProc procedure} {nonPortable} { +test unixWm-47.1 {WaitRestrictProc procedure} {unix nonPortable} { catch {destroy .t} toplevel .t -width 300 -height 200 frame .t.f -bd 2 -relief raised @@ -1631,45 +1631,45 @@ toplevel .t -width 300 -height 200 wm geometry .t +0+0 tkwait visibility .t -test unixWm-48.1 {ParseGeometry procedure} { +test unixWm-48.1 {ParseGeometry procedure} unix { wm geometry .t =100x120 update list [winfo width .t] [winfo height .t] } {100 120} -test unixWm-48.2 {ParseGeometry procedure} { +test unixWm-48.2 {ParseGeometry procedure} unix { list [catch {wm geometry .t =10zx120} msg] $msg } {1 {bad geometry specifier "=10zx120"}} -test unixWm-48.3 {ParseGeometry procedure} { +test unixWm-48.3 {ParseGeometry procedure} unix { list [catch {wm geometry .t x120} msg] $msg } {1 {bad geometry specifier "x120"}} -test unixWm-48.4 {ParseGeometry procedure} { +test unixWm-48.4 {ParseGeometry procedure} unix { list [catch {wm geometry .t =100x120a} msg] $msg } {1 {bad geometry specifier "=100x120a"}} -test unixWm-48.5 {ParseGeometry procedure} { +test unixWm-48.5 {ParseGeometry procedure} unix { list [catch {wm geometry .t z} msg] $msg } {1 {bad geometry specifier "z"}} -test unixWm-48.6 {ParseGeometry procedure} { +test unixWm-48.6 {ParseGeometry procedure} unix { list [catch {wm geometry .t +20&} msg] $msg } {1 {bad geometry specifier "+20&"}} -test unixWm-48.7 {ParseGeometry procedure} { +test unixWm-48.7 {ParseGeometry procedure} unix { list [catch {wm geometry .t +-} msg] $msg } {1 {bad geometry specifier "+-"}} -test unixWm-48.8 {ParseGeometry procedure} { +test unixWm-48.8 {ParseGeometry procedure} unix { list [catch {wm geometry .t +20a} msg] $msg } {1 {bad geometry specifier "+20a"}} -test unixWm-48.9 {ParseGeometry procedure} { +test unixWm-48.9 {ParseGeometry procedure} unix { list [catch {wm geometry .t +20-} msg] $msg } {1 {bad geometry specifier "+20-"}} -test unixWm-48.10 {ParseGeometry procedure} { +test unixWm-48.10 {ParseGeometry procedure} unix { list [catch {wm geometry .t +20+10z} msg] $msg } {1 {bad geometry specifier "+20+10z"}} -test unixWm-48.11 {ParseGeometry procedure} { +test unixWm-48.11 {ParseGeometry procedure} unix { catch {wm geometry .t +-10+20} } {0} -test unixWm-48.12 {ParseGeometry procedure} { +test unixWm-48.12 {ParseGeometry procedure} unix { catch {wm geometry .t +30+-10} } {0} -test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} { +test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} unix { catch {destroy .t} toplevel .t -width 200 -height 200 wm geom .t +0+0 @@ -1684,7 +1684,7 @@ test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} { [winfo width .t] [winfo height .t] } {50 -100 150 300} -test unixWm-49.1 {Tk_GetRootCoords procedure} { +test unixWm-49.1 {Tk_GetRootCoords procedure} unix { catch {destroy .t} toplevel .t -width 300 -height 200 frame .t.f -width 150 -height 100 -bd 2 -relief raised @@ -1716,7 +1716,7 @@ test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} { deleteWindows wm iconify . -test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} { +test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} unix { deleteWindows toplevel .t -width 300 -height 400 -bg green wm geom .t +40+0 @@ -1736,7 +1736,7 @@ test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} { [winfo containing [expr $x + 200] [expr $y + 250]] \ [winfo containing [expr $x + 220] [expr $y + 250]] } {{} {} .t {} .t2 .t2 {} .t} -test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and overrideredirect} { +test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and overrideredirect} unix { deleteWindows toplevel .t -width 300 -height 400 -bg yellow wm geom .t +0+50 @@ -1786,7 +1786,7 @@ test unixWm-50.3 { } -cleanup { cleanupbg } -result {{} .x .t .t.f} -test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} { +test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} unix { catch {destroy .t} catch {interp delete slave} toplevel .t -width 200 -height 200 -bg green @@ -1822,7 +1822,7 @@ test unixWm-50.5 {Tk_CoordsToWindow procedure, handling menubars} {unix testmenu [winfo containing [expr $x + 11] [expr $y + 152]] \ [winfo containing [expr $x + 12] [expr $y + 152]] } {{} .t.menu .t.menu .t.menu.f .t .t .t.f} -test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} { +test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} unix { deleteWindows toplevel .t -width 300 -height 400 -bg orange wm geom .t +0+50 @@ -1839,7 +1839,7 @@ test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} { [winfo containing [expr $x +249] [expr $y +80]] \ [winfo containing [expr $x +250] [expr $y +80]] } {.t .t2 .t2 .t} -test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} { +test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix { catch {destroy .t} toplevel .t -width 300 -height 400 -bg green wm geom .t +0+0 @@ -1856,7 +1856,7 @@ test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} { [winfo containing $x [expr $y + 350]] \ [winfo containing $x [expr $y + 450]] } {.t .t.f .t.f.f .t {}} -test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} { +test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix { catch {destroy .t} toplevel .t -width 400 -height 300 -bg green wm geom .t +0+0 @@ -1873,7 +1873,7 @@ test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} { [winfo containing [expr $x + 350] $y] \ [winfo containing [expr $x + 450] $y] } {.t .t.f .t.f.f .t {}} -test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} { +test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix { catch {destroy .t} catch {destroy .t2} sleep 500 ;# Give window manager time to catch up. @@ -1887,7 +1887,7 @@ test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} { wm iconify .t2 lappend result [winfo containing 100 100] } {.t2 .t} -test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} { +test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix { catch {destroy .t} toplevel .t -width 200 -height 200 -bg green wm geometry .t +0+0 @@ -1905,19 +1905,19 @@ wm deiconify . # No tests for UpdateVRootGeometry, Tk_GetVRootGeometry, # Tk_MoveToplevelWindow, UpdateWmProtocols, or TkWmProtocolEventProc. -test unixWm-51.1 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { +test unixWm-51.1 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} { makeToplevels update raise .raise1 winfo containing [winfo rootx .raise1] [winfo rooty .raise1] } .raise1 -test unixWm-51.2 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { +test unixWm-51.2 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} { makeToplevels update raise .raise2 winfo containing [winfo rootx .raise1] [winfo rooty .raise1] } .raise2 -test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { +test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} { makeToplevels update raise .raise3 @@ -1930,7 +1930,7 @@ test unixWm-51.3 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { list $result [winfo containing [winfo rootx .raise1] \ [winfo rooty .raise1]] } {.raise2 .raise1} -test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { +test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} { makeToplevels raise .raise2 raise .raise1 @@ -1940,7 +1940,7 @@ test unixWm-51.4 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { sleep 500 lappend result [winfo containing 100 100] } {.raise1 .raise3} -test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { +test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} { makeToplevels update raise .raise2 @@ -1957,7 +1957,7 @@ test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {nonPortable} { [winfo rooty .raise2]] } {.raise1 .raise3} deleteWindows -test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} { +test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} unix { catch {destroy .t} toplevel .t -width 200 -height 200 -bg green wm geometry .t +0+0 @@ -1967,7 +1967,7 @@ test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapp wm geometry .t2 +0+0 winfo containing 100 100 } {.t} -test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} { +test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix { foreach w {.t .t2 .t3} { catch {destroy $w} toplevel $w -width 200 -height 200 -bg green @@ -1981,7 +1981,7 @@ test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} { sleep 2000 lappend result [winfo containing 100 100] } {.t3 .t} -test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} { +test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix { catch {destroy .t} toplevel .t -width 200 -height 200 -bg green wm overrideredirect .t 1 @@ -2006,7 +2006,7 @@ test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} { raise .t2 lappend result [winfo containing $x $y] } {.t2 .t .t2} -test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} { +test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix { foreach w {.t .t2 .t3} { catch {destroy $w} toplevel $w -width 200 -height 200 -bg green @@ -2028,36 +2028,36 @@ test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} lower .t2 lappend result [winfo containing $x $y] } {.t2 .t3} -test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} { +test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix { makeToplevels raise .raise1 set time [lindex [time {raise .raise1}] 0] expr {$time < 2000000} } 1 -test unixWm-51.11 {TkWmRestackToplevel procedure, don't move window that's already in the right place} { +test unixWm-51.11 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix { makeToplevels set time [lindex [time {lower .raise1}] 0] expr {$time < 2000000} } 1 -test unixWm-51.12 {TkWmRestackToplevel procedure, don't move window that's already in the right place} { +test unixWm-51.12 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix { makeToplevels set time [lindex [time {raise .raise3 .raise2}] 0] expr {$time < 2000000} } 1 -test unixWm-51.13 {TkWmRestackToplevel procedure, don't move window that's already in the right place} { +test unixWm-51.13 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix { makeToplevels set time [lindex [time {lower .raise1 .raise2}] 0] expr {$time < 2000000} } 1 -test unixWm-52.1 {TkWmAddToColormapWindows procedure} { +test unixWm-52.1 {TkWmAddToColormapWindows procedure} unix { catch {destroy .t} toplevel .t -width 200 -height 200 -colormap new -relief raised -bd 2 wm geom .t +0+0 update wm colormap .t } {} -test unixWm-52.2 {TkWmAddToColormapWindows procedure} { +test unixWm-52.2 {TkWmAddToColormapWindows procedure} unix { catch {destroy .t} toplevel .t -colormap new -relief raised -bd 2 wm geom .t +0+0 @@ -2066,7 +2066,7 @@ test unixWm-52.2 {TkWmAddToColormapWindows procedure} { update wm colormap .t } {.t.f .t} -test unixWm-52.3 {TkWmAddToColormapWindows procedure} { +test unixWm-52.3 {TkWmAddToColormapWindows procedure} unix { catch {destroy .t} toplevel .t -colormap new wm geom .t +0+0 @@ -2077,7 +2077,7 @@ test unixWm-52.3 {TkWmAddToColormapWindows procedure} { update wm colormap .t } {.t.f .t.f2 .t} -test unixWm-52.4 {TkWmAddToColormapWindows procedure} { +test unixWm-52.4 {TkWmAddToColormapWindows procedure} unix { catch {destroy .t} toplevel .t -colormap new wm geom .t +0+0 @@ -2091,7 +2091,7 @@ test unixWm-52.4 {TkWmAddToColormapWindows procedure} { wm colormapwindows .t } {.t.f} -test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} { +test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} unix { catch {destroy .t} toplevel .t -colormap new wm geom .t +0+0 @@ -2103,7 +2103,7 @@ test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} { destroy .t.f2 wm colormap .t } {.t.f .t} -test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} { +test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} unix { catch {destroy .t} toplevel .t -colormap new wm geom .t +0+0 @@ -2339,7 +2339,7 @@ argumentNumber18 # Test exit processing and cleanup: -test unixWm-59.1 {exit processing} { +test unixWm-59.1 {exit processing} unix { set script [makeFile { update exit @@ -2352,7 +2352,7 @@ test unixWm-59.1 {exit processing} { removeFile script list $error $msg } {0 {}} -test unixWm-59.2 {exit processing} { +test unixWm-59.2 {exit processing} unix { set script [makeFile { interp create x x eval {set argc 2} @@ -2369,7 +2369,7 @@ test unixWm-59.2 {exit processing} { removeFile script list $error $msg } {0 {}} -test unixWm-59.3 {exit processing} { +test unixWm-59.3 {exit processing} unix { set script [makeFile { interp create x x eval {set argc 2} -- cgit v0.12 From 98b37d9985ff3f2d38100fd2a86bc33627f278d9 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 14 Mar 2003 21:30:46 +0000 Subject: Backport of the 'Message box buttons too wide' fix. [Bug #701812] --- ChangeLog | 5 +++++ library/msgbox.tcl | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72fcfe0..7fd4053 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-03-14 Donal K. Fellows + + * library/msgbox.tcl (Tk::MessageBox): Stop buttons from being + very wide when a messageBox has a lot of content. [Bug #701812] + 2003-03-13 Don Porter * tests/unixWm.test: Constrained all tests older than revision 1.21 diff --git a/library/msgbox.tcl b/library/msgbox.tcl index b943fb4..eb6fc35 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -3,7 +3,7 @@ # Implements messageboxes for platforms that do not have native # messagebox support. # -# RCS: @(#) $Id: msgbox.tcl,v 1.24 2003/02/21 14:40:26 dkf Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.24.2.1 2003/03/14 21:30:58 dkf Exp $ # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -342,7 +342,7 @@ proc ::tk::MessageBox {args} { set opts [list -text $capName] } - eval [list tk::AmpWidget button $w.$name] $opts \ + eval [list tk::AmpWidget button $w.$name -padx 3m] $opts \ [list -command [list set tk::Priv(button) $name]] if {[string equal $name $data(-default)]} { @@ -351,7 +351,7 @@ proc ::tk::MessageBox {args} { $w.$name configure -default normal } grid $w.$name -in $w.bot -row 0 -column $i -padx 3m -pady 2m -sticky ew - grid columnconfigure $w.bot $i -weight 1 -uniform buttons + grid columnconfigure $w.bot $i -uniform buttons incr i # create the binding for the key accelerator, based on the underline -- cgit v0.12 From 78f88f52a525c493e79fc724760e36eb76a21d43 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 18 Mar 2003 13:55:48 +0000 Subject: * macosx/Wish.pbproj/project.pbxproj: * macosx/Makefile: * macosx/README: added support for giving 'make' the location of Tcl.framework and tclsh to build and link against. * macosx/tkMacOSXXStubs.c: fixed crash in [winfo server]. --- ChangeLog | 17 +++++++-- macosx/Makefile | 10 +++-- macosx/README | 78 ++++++++++++++++++++++++++------------ macosx/Wish.pbproj/project.pbxproj | 30 ++++++++------- macosx/tkMacOSXXStubs.c | 11 ++++-- 5 files changed, 98 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fd4053..9cc536f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-03-18 Daniel Steffen + + * macosx/Wish.pbproj/project.pbxproj: + * macosx/Makefile: + * macosx/README: added support for giving 'make' the location + of Tcl.framework and tclsh to build and link against. + + * macosx/tkMacOSXXStubs.c: fixed crash in [winfo server]. + 2003-03-14 Donal K. Fellows * library/msgbox.tcl (Tk::MessageBox): Stop buttons from being @@ -5,10 +14,10 @@ 2003-03-13 Don Porter - * tests/unixWm.test: Constrained all tests older than revision 1.21 - to run only on Unix. Alternative approach did not match maintainer - habits. - * tests/spinbox.test (spinbox-17.4): Avoid long failure message. + * tests/unixWm.test: Constrained all tests older than revision 1.21 + to run only on Unix. Alternative approach did not match maintainer + habits. + * tests/spinbox.test (spinbox-17.4): Avoid long failure message. 2003-03-13 Kevin Kenny diff --git a/macosx/Makefile b/macosx/Makefile index c05c4de..3945438 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -3,7 +3,7 @@ # Simple makefile for building on Mac OS X with the # Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7 2003/02/19 16:44:16 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.1 2003/03/18 13:55:50 das Exp $ # ################################################################################ @@ -11,6 +11,9 @@ INSTALL_ROOT ?= BUILD_DIR ?= ${CURDIR}/../../build +TCL_FRAMEWORK_DIR ?= ${BUILD_DIR} +TCLSH_DIR ?= ${TCL_FRAMEWORK_DIR} + TARGET = Wish DEVBUILDSTYLE = Development @@ -18,7 +21,8 @@ DEPBUILDSTYLE = Deployment PBXBUILD = /usr/bin/pbxbuild -BUILD = ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}" +BUILD = ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}" \ + TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" TCLSH_DIR="${TCLSH_DIR}" DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" @@ -89,7 +93,7 @@ cleanup-embedded: .PHONY: all install embedded clean develop deploy install-develop install-deploy \ embedded-develop embedded-deploy install-embedded-develop install-embedded-deploy \ -clean-develop clean-deploy forceRelinkTcl \ +clean-develop clean-deploy forceRelink \ cleanup-embedded ################################################################################ diff --git a/macosx/README b/macosx/README index c62339e..9cde39c 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ TclTkAqua README ---------------- -RCS: @(#) $Id: README,v 1.6 2003/02/27 00:09:26 hobbs Exp $ +RCS: @(#) $Id: README,v 1.6.2.1 2003/03/18 13:55:51 das Exp $ This is the README file for the Mac OS X native versions of Tcl & Tk. @@ -131,32 +131,38 @@ ProjectBuilder command line tool with all the details taken care of. - Unpack the tcl and tk source release archives and place the tcl and tk source trees in a common parent directory. - [ If you don't want have the two source trees in one directory, you'll need to - [ create the following symbolic link for the build to work as setup by default - [ ln -fs /path_to_tcl/build /path_to_tk/build - [ (where /path_to_{tcl,tk} is the directory containing the tcl resp. tk tree) - [ or you can pass an argument of BUILD_DIR=/somewhere to the tcl and tk make. +[ If you don't want have the two source trees in one directory, you'll need to ] +[ create the following symbolic link for the build to work as setup by default ] +[ ln -fs /path_to_tcl/build /path_to_tk/build ] +[ (where /path_to_{tcl,tk} is the directory containing the tcl resp. tk tree) ] +[ or you can pass an argument of BUILD_DIR=/somewhere to the tcl and tk make. ] - The following instructions assume the tcl and tk source trees are named -'tcl' and 'tk', respectively, where is the version number (for -example 'tcl8.4.2'). This will be the case if you are building from a release -archive. If you are building from CVS, the version numbers will be missing; -adapt the instructions below accordingly. +"tcl${ver}" and "tk${ver}", respectively, where ${ver} is a shell variable +containing the tcl and tk version number (for example '8.4.2'). +Setup the shell variable as follows: + set ver="8.4.2" ;: if your shell is csh + ver="8.4.2" ;: if your shell is sh +The source trees will be named this way only if you are building from a release +archive, if you are building from CVS, the version numbers will be missing; so +set ${ver} to the empty string instead: + set ver="" ;: if your shell is csh + ver="" ;: if your shell is sh - If you're only interested in _building_ TclTkAqua and don't plan on doing development with the ProjectBuilder projects, using the Makefiles is easiest. The following steps will build Tcl and Tk from the Terminal, assuming you are located in the directory containing the tcl and tk source trees: - make -C tcl/macosx - make -C tk/macosx + make -C tcl${ver}/macosx + make -C tk${ver}/macosx and the following will then install Tcl and Tk onto the root volume (admin password required): - sudo make -C tcl/macosx install - sudo make -C tk/macosx install + sudo make -C tcl${ver}/macosx install + sudo make -C tk${ver}/macosx install if you don't have the admin password, you can install into your home directory, instead by passing an INSTALL_ROOT argument to make: - make -C tcl/macosx install INSTALL_ROOT=$HOME - make -C tk/macosx install INSTALL_ROOT=$HOME + make -C tcl${ver}/macosx install INSTALL_ROOT="${HOME}/" + make -C tk${ver}/macosx install INSTALL_ROOT="${HOME}/" - The default Makefile targets will build _both_ debug and optimized versions of the Tcl and Tk frameworks with the standard convention of naming the debug @@ -168,10 +174,10 @@ This allows you to dynamically link to the debug libraries at runtime by setting If you only want to build and install the debug or optimized build, use the 'develop' or 'deploy' target variants of the Makefiles, respectively. For example, to build and install only the optimized versions: - make -C tcl/macosx deploy - make -C tk/macosx deploy - sudo make -C tcl/macosx install-deploy - sudo make -C tk/macosx install-deploy + make -C tcl${ver}/macosx deploy + make -C tk${ver}/macosx deploy + sudo make -C tcl${ver}/macosx install-deploy + sudo make -C tk${ver}/macosx install-deploy - The Makefiles can also build a version of 'Wish Shell' that has the Tcl and Tk frameworks embedded in its application package. This allows for standalone @@ -179,10 +185,10 @@ deployment of the application with no installation required, e.g. from read-only media. To build & install in this manner, use the 'embedded' target variants of the Makefiles. For example, to build a standalone 'Wish Shell.app' in ./embedded/Applications/Utilities: - make -C tcl/macosx embedded - make -C tk/macosx embedded - sudo make -C tcl/macosx install-embedded INSTALL_ROOT=`pwd`/embedded - sudo make -C tk/macosx install-embedded INSTALL_ROOT=`pwd`/embedded + make -C tcl${ver}/macosx embedded + make -C tk${ver}/macosx embedded + sudo make -C tcl${ver}/macosx install-embedded INSTALL_ROOT=`pwd`/embedded/ + sudo make -C tk${ver}/macosx install-embedded INSTALL_ROOT=`pwd`/embedded/ Notes: * if you've already built standard TclTkAqua, building embedded does not require any new compiling or linking, so you can skip the first two makes. @@ -203,5 +209,27 @@ Another way is to set the build folder location directly in tcl/macosx/Tcl.pbproj and tk/macosx/Wish/pbproj using ProjectBuilder's "Project->Show Info" on the topmost icon in the filelist. Switch to "Place build products in a separate location" with a setting of "$SRCROOT/../../build" -(this gets stored in Tcl.pbproj/$USER.pbxuser & Wish.pbproj/$USER.pbxuser). +(this gets stored in Tcl.pbproj/${USER}.pbxuser & Wish.pbproj/${USER}.pbxuser). + +- It is possible to build Tk without a common build folder with Tcl, or even +without the tcl sourcetree itself; but in that case you need to tell the Tk +Makefile where the copies of 'Tcl.framework' and 'tclsh8.4' are located that +you want to build & link against (their default location is the ${BUILD_DIR}). + +For instance to use their default systemwide install locations: + make -C tk${ver}/macosx \ + TCL_FRAMEWORK_DIR=/Library/Frameworks TCLSH_DIR=/usr/bin + sudo make -C tk${ver}/macosx install \ + TCL_FRAMEWORK_DIR=/Library/Frameworks TCLSH_DIR=/usr/bin +[ of course this will only work if /Library/Frameworks does indeed contain a ] +[ Tcl.framework corresponding in version to the Tk.framework you're trying to ] +[ build, and if TCLSH_DIR contains a corresponding /usr/bin/tclsh8.4 ] + +or to use an earlier install of Tcl into INSTALL_ROOT="${TCLTK}/" : + make -C tk${ver}/macosx \ + TCL_FRAMEWORK_DIR=${TCLTK}/Library/Frameworks TCLSH_DIR=${TCLTK}/usr/bin + sudo make -C tk${ver}/macosx install INSTALL_ROOT="${TCLTK}/" \ + TCL_FRAMEWORK_DIR=${TCLTK}/Library/Frameworks TCLSH_DIR=${TCLTK}/usr/bin + +The Makefile variables TCL_FRAMEWORK_DIR and TCLSH_DIR were added in Tk 8.4.3. diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 290434d..eaec7aa 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1532,21 +1532,23 @@ DYLIB_COMPATIBILITY_VERSION = 8.4; DYLIB_CURRENT_VERSION = 8.4; DYLIB_INSTALL_PATH = /Library/Frameworks; - FRAMEWORK_SEARCH_PATHS = "\"$(SYMROOT)\""; + FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\""; FRAMEWORK_VERSION = 8.4; - GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; - HEADER_SEARCH_PATHS = "\"$(SYMROOT)/Tcl.framework/Headers\" \"$(SYMROOT)/Tcl.framework/PrivateHeaders\" ../bitmaps ../generic ../xlib"; + GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; + HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../bitmaps ../generic ../xlib"; INSTALL_PATH = "${DYLIB_INSTALL_PATH}"; LIBRARY_SEARCH_PATHS = ""; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\""; OTHER_LDFLAGS = "-seg1addr 0xb000000"; OTHER_LIBTOOL_FLAGS = ""; - OTHER_REZFLAGS = "-i \"$(SYMROOT)/Tcl.framework/Headers\" -i \"../generic\""; + OTHER_REZFLAGS = "-i \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" -i \"../generic\""; PRECOMPILE_PREFIX_HEADER = YES; PRINCIPAL_CLASS = ""; PRODUCT_NAME = Tk; SECTORDER_FLAGS = ""; + TCLSH_DIR = "$(TCL_FRAMEWORK_DIR)"; + TCL_FRAMEWORK_DIR = "$(SYMROOT)"; TK_MAJOR_VERSION = 8; TK_MINOR_VERSION = 4; TK_PATCH_LEVEL = .1; @@ -2900,18 +2902,19 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright F5877FBD031FAC6A016F146B, ); buildSettings = { - FRAMEWORK_SEARCH_PATHS = "\"$(SYMROOT)\""; + FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\" \"$(SYMROOT)\""; FRAMEWORK_VERSION = 8.4; - GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; - HEADER_SEARCH_PATHS = "\"$(SYMROOT)/Tcl.framework/Headers\" \"$(SYMROOT)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; + GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; + HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; INSTALL_PATH = /Applications/Utilities; LIBRARY_SEARCH_PATHS = ""; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\""; OTHER_LDFLAGS = "-sectcreate __TEXT __info_plist \"$TEMP_DIR/Info.plist\" -headerpad_max_install_names"; - OTHER_REZFLAGS = "-i \"$(SYMROOT)/Tcl.framework/Headers\" -i \"../generic\""; + OTHER_REZFLAGS = "-i \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" -i \"../generic\""; PRODUCT_NAME = "Wish Shell"; SECTORDER_FLAGS = ""; + TCL_FRAMEWORK_DIR = "$(SYMROOT)"; USE_GCC3_PFE_SUPPORT = NO; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; WRAPPER_EXTENSION = app; @@ -3105,8 +3108,8 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright F59D847903390D7E016F146B, ); buildSettings = { - GLOBAL_CFLAGS = "`source \"${SYMROOT}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; - HEADER_SEARCH_PATHS = "\"$(SYMROOT)/Tcl.framework/Headers\" \"$(SYMROOT)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; + GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; + HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; LIBRARY_STYLE = STATIC; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\""; @@ -3115,6 +3118,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright PRODUCT_NAME = libtkstub8.4.a; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; + TCL_FRAMEWORK_DIR = "$(SYMROOT)"; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; }; dependencies = ( @@ -3244,7 +3248,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nif [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${SYMROOT}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# fix permissions on uninstalled products\nchmod a+w \"${TEMP_ROOT}/UninstalledProducts\"\nchmod a+w \"${TEMP_ROOT}\"/UninstalledProducts/libtkstub*.a"; + shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nif [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# fix permissions on uninstalled products\nchmod a+w \"${TEMP_ROOT}/UninstalledProducts\"\nchmod a+w \"${TEMP_ROOT}\"/UninstalledProducts/libtkstub*.a"; }; F5877FBD031FAC6A016F146B = { buildActionMask = 8; @@ -3257,7 +3261,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nEXECUTABLE_DIR=\"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS\"\nif [ -n \"${EMBEDDED_BUILD:-}\" ]; then\n ln -fs \"${EXECUTABLE_DIR}\" @executable_path\nelse\n if [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\n if [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\n if [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${SYMROOT}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\n PREBIND_OPTS=\"-r .\"\nfi\nredo_prebinding ${PREBIND_OPTS:-} \"${EXECUTABLE_DIR}/${PRODUCT_NAME}\"\nif [ -n \"${EMBEDDED_BUILD:-}\" ]; then\n rm -f @executable_path\nelse\n if [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\n if [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\n if [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\nfi\n\n# install wish script & symbolic links\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nrm -f \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\ncat > \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\" <&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# install wish script & symbolic links\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nrm -f \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\ncat > \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\" <display_name = macScreenName; display->qlen = 0; display->fd = fd; + display->proto_major_version = 10; + Gestalt(gestaltQuickdrawVersion, (long*)&display->proto_minor_version); + display->proto_minor_version -= gestaltMacOSXQD; + display->vendor = "Apple"; + Gestalt(gestaltSystemVersion, (long*)&display->release); screen->root = ROOT_ID; screen->display = display; @@ -648,9 +653,9 @@ TkGetServerInfo( char buffer[8 + TCL_INTEGER_SPACE * 2]; char buffer2[TCL_INTEGER_SPACE]; - sprintf(buffer, "X%dR%d ", ProtocolVersion(Tk_Display(tkwin)), + sprintf(buffer, "QD%dR%x ", ProtocolVersion(Tk_Display(tkwin)), ProtocolRevision(Tk_Display(tkwin))); - sprintf(buffer2, " %d", VendorRelease(Tk_Display(tkwin))); + sprintf(buffer2, " %x", VendorRelease(Tk_Display(tkwin))); Tcl_AppendResult(interp, buffer, ServerVendor(Tk_Display(tkwin)), buffer2, (char *) NULL); } -- cgit v0.12 From 1829e2001615eab85494e9ec7d8923a29b3dcc6a Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 18 Mar 2003 16:19:06 +0000 Subject: * tests/unixWm.test (unixWm-41.2): Corrected typo in 2003-03-13 commit. Thanks Larry Virden. [Bug 705567] --- ChangeLog | 5 +++++ tests/unixWm.test | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cc536f..965e450 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-03-18 Don Porter + + * tests/unixWm.test (unixWm-41.2): Corrected typo in 2003-03-13 + commit. Thanks Larry Virden. [Bug 705567] + 2003-03-18 Daniel Steffen * macosx/Wish.pbproj/project.pbxproj: diff --git a/tests/unixWm.test b/tests/unixWm.test index 47f1b8d..da3c328 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: unixWm.test,v 1.29.2.1 2003/03/13 19:33:49 dgp Exp $ +# RCS: @(#) $Id: unixWm.test,v 1.29.2.2 2003/03/18 16:19:10 dgp Exp $ package require tcltest 2.2 namespace import -force tcltest::configure @@ -1317,7 +1317,7 @@ test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} u sleep 500 lappend result [winfo width .t] [winfo height .t] } {400 150 200 300} -test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} unix { +test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} { catch {destroy .t} toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 -- cgit v0.12 From 415979d88766d4d576fba5f5578f46b8ca4fa2db Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 23 Mar 2003 02:25:21 +0000 Subject: Corrected several problems that prevented OPTS=symbols from building properly. [Patch 707792] Thanks to Joe Mistachkin for the fixes. --- ChangeLog | 7 +++++++ win/makefile.vc | 18 +++++++++++++----- win/rules.vc | 8 ++++---- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 965e450..c59f7b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-03-22 Kevin Kenny + + * win/makefile.vc: + * win/rules.vc: Corrected several problems that prevented + OPTS=symbols from building properly. [Patch 707792] Thanks + to Joe Mistachkin for the fixes. + 2003-03-18 Don Porter * tests/unixWm.test (unixWm-41.2): Corrected typo in 2003-03-13 diff --git a/win/makefile.vc b/win/makefile.vc index 7470ade..2762c4d 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.67.2.2 2003/03/13 16:41:48 kennykb Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.67.2.3 2003/03/23 02:25:21 kennykb Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -373,9 +373,17 @@ cflags = $(cflags) -QIA64_Bx !endif !if $(MSVCRT) -crt = -MD$(DBGX) +!if "$(DBGX)" == "" +crt = -MD !else -crt = -MT$(DBGX) +crt = -MDd +!endif +!else +!if "$(DBGX)" == "" +crt = -MT +!else +crt = -MTd +!endif !endif BASE_CLFAGS = $(cdebug) $(cflags) $(crt) $(TK_INCLUDES) @@ -450,9 +458,9 @@ test: setup $(TKTEST) $(TKLIB) $(CAT32) set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH) !endif !if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE" - $(TKTEST) $(ROOT)/tests/all.tcl $(TESTFLAGS) | $(CAT32) + $(TKTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) | $(CAT32) !else - $(TKTEST) $(ROOT)/tests/all.tcl $(TESTFLAGS) | $(CAT32) + $(TKTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) | $(CAT32) !endif runtest: setup $(TKTEST) $(TKLIB) $(CAT32) diff --git a/win/rules.vc b/win/rules.vc index 62b21c4..fd4c1c7 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -10,7 +10,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.5 2003/02/14 20:28:21 davygrvy Exp $ +# RCS: @(#) $Id: rules.vc,v 1.5.2.1 2003/03/23 02:25:22 kennykb Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -192,15 +192,15 @@ TCL_USE_STATIC_PACKAGES = 0 # by accident. #---------------------------------------------------------- -SUFX = tsdx +SUFX = tsgx !if $(DEBUG) BUILDDIRTOP = Debug -DBGX = d +DBGX = g !else BUILDDIRTOP = Release DBGX = -SUFX = $(SUFX:d=) +SUFX = $(SUFX:g=) !endif TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX -- cgit v0.12 From 8e95bf1faee00a740455e979fa25c531a65d80f4 Mon Sep 17 00:00:00 2001 From: mdejong Date: Thu, 3 Apr 2003 02:04:53 +0000 Subject: * win/configure: Regen. * win/configure.in: Don't set TCL_DLL_FILE, TCL_LIB_FILE, TCL_STUB_LIB_FILE, TCL_STUB_LIB_FLAG, and TCL_BUILD_STUB_LIB_SPEC. These variables are already set in tclConfig.sh. [Bug 691908] --- ChangeLog | 9 +++++++++ win/configure | 7 ------- win/configure.in | 9 +-------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index c59f7b4..2759883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-04-02 Mo DeJong + + * win/configure: Regen. + * win/configure.in: Don't set TCL_DLL_FILE, + TCL_LIB_FILE, TCL_STUB_LIB_FILE, TCL_STUB_LIB_FLAG, + and TCL_BUILD_STUB_LIB_SPEC. These variables are + already set in tclConfig.sh. + [Bug 691908] + 2003-03-22 Kevin Kenny * win/makefile.vc: diff --git a/win/configure b/win/configure index 0db2034..709a8a9 100755 --- a/win/configure +++ b/win/configure @@ -1758,13 +1758,6 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${TCL_DBGX}\"" eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" -eval "TCL_DLL_FILE=\"tcl$VER${DLLSUFFIX}\"" -eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl$VER${LIBSUFFIX}\"" - -eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\"" -eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${TCL_DBGX}\"" -eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\"" - eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" eval "LIBSUFFIX=${LIBSUFFIX}" diff --git a/win/configure.in b/win/configure.in index aea2314..a251610 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49 2003/02/15 02:21:01 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.1 2003/04/03 02:04:56 mdejong Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -158,13 +158,6 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${TCL_DBGX}\"" eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" -eval "TCL_DLL_FILE=\"tcl$VER${DLLSUFFIX}\"" -eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl$VER${LIBSUFFIX}\"" - -eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\"" -eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${TCL_DBGX}\"" -eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\"" - eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" eval "LIBSUFFIX=${LIBSUFFIX}" -- cgit v0.12 From d83a9a1baf2b53553d2cc392eda9e5a5d0b44a12 Mon Sep 17 00:00:00 2001 From: mdejong Date: Thu, 3 Apr 2003 10:11:55 +0000 Subject: * win/configure: Regen. * win/configure.in: Set stub lib flag based on new LIBFLAGSUFFIX variable. * win/tcl.m4: Update from Tcl to get new LIBFLAGSUFFIX variable. --- ChangeLog | 8 ++++++++ win/configure | 47 ++++++++++++++++++++++++++++------------------- win/configure.in | 4 ++-- win/tcl.m4 | 11 ++++++++++- 4 files changed, 48 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2759883..e265dbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ 2003-04-02 Mo DeJong * win/configure: Regen. + * win/configure.in: Set stub lib flag based + on new LIBFLAGSUFFIX variable. + * win/tcl.m4: Update from Tcl to get new + LIBFLAGSUFFIX variable. + +2003-04-02 Mo DeJong + + * win/configure: Regen. * win/configure.in: Don't set TCL_DLL_FILE, TCL_LIB_FILE, TCL_STUB_LIB_FILE, TCL_STUB_LIB_FLAG, and TCL_BUILD_STUB_LIB_SPEC. These variables are diff --git a/win/configure b/win/configure index 709a8a9..2559522 100755 --- a/win/configure +++ b/win/configure @@ -1185,6 +1185,8 @@ else fi + SHLIB_SUFFIX=".dll" + # Check for a bug in gcc's windres that causes the # compile to fail when a Windows native path is # passed into windres. The mingw toolchain requires @@ -1199,9 +1201,9 @@ fi echo "END" >> $conftest echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6 -echo "configure:1203: checking for Windows native path bug in windres" >&5 +echo "configure:1205: checking for Windows native path bug in windres" >&5 cyg_conftest=`$CYGPATH $conftest` - if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then + if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then echo "$ac_t""no" 1>&6 else echo "$ac_t""yes" 1>&6 @@ -1220,7 +1222,7 @@ echo "configure:1203: checking for Windows native path bug in windres" >&5 # set various compiler flags depending on whether we are using gcc or cl echo $ac_n "checking compiler flags""... $ac_c" 1>&6 -echo "configure:1224: checking compiler flags" >&5 +echo "configure:1226: checking compiler flags" >&5 if test "${GCC}" = "yes" ; then if test "$do64bit" = "yes" ; then echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2 @@ -1272,6 +1274,7 @@ echo "configure:1224: checking compiler flags" >&5 runtime= MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" + LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else @@ -1289,17 +1292,20 @@ echo "configure:1224: checking compiler flags" >&5 # -luser32 and -lmsvcrt by default. Make sure CFLAGS is # included so -mno-cygwin passed the correct libs to the linker. SHLIB_LD='${CC} -shared ${CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' # Add SHLIB_LD_LIBS to the Make rule, not here. MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" LIBSUFFIX="\${DBGX}.a" + LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + SHLIB_SUFFIX=.dll EXTRA_CFLAGS="${extra_cflags}" @@ -1336,8 +1342,10 @@ echo "configure:1224: checking compiler flags" >&5 runtime=-MT MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" + LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" + SHLIB_LD_LIBS="" else # dynamic echo "$ac_t""using shared flags" 1>&6 @@ -1345,8 +1353,10 @@ echo "configure:1224: checking compiler flags" >&5 # Add SHLIB_LD_LIBS to the Make rule, not here. MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" LIBSUFFIX="\${DBGX}.lib" + LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" + SHLIB_LD_LIBS='${LIBS}' fi # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. @@ -1390,7 +1400,6 @@ echo "configure:1224: checking compiler flags" >&5 fi SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" - SHLIB_LD_LIBS="user32.lib advapi32.lib" LIBS="user32.lib advapi32.lib" LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib" RC_OUT=-fo @@ -1430,7 +1439,7 @@ echo "configure:1224: checking compiler flags" >&5 #-------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1434: checking how to run the C preprocessor" >&5 +echo "configure:1443: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1445,13 +1454,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1462,13 +1471,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1479,13 +1488,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1511,17 +1520,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:1515: checking for errno.h" >&5 +echo "configure:1524: checking for errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1553,7 +1562,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1557: checking for build with symbols" >&5 +echo "configure:1566: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1614,7 +1623,7 @@ TK_DBGX=${DBGX} echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1618: checking the location of tclConfig.sh" >&5 +echo "configure:1627: checking the location of tclConfig.sh" >&5 if test -d ../../tcl8.4$TK_PATCH_LEVEL/win; then TCL_BIN_DIR_DEFAULT=../../tcl8.4$TK_PATCH_LEVEL/win @@ -1642,7 +1651,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1646: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1655: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1695,7 +1704,7 @@ echo "configure:1646: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:1699: checking for tclsh" >&5 +echo "configure:1708: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1755,7 +1764,7 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # I left out the other vars that also need to get defined here. # we also need to double check about including DBGX in lib names # and spaces in file or directory names for the eval -eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${TCL_DBGX}\"" +eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\"" eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" eval "DLLSUFFIX=${DLLSUFFIX}" diff --git a/win/configure.in b/win/configure.in index a251610..9b89e2d 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.1 2003/04/03 02:04:56 mdejong Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.2 2003/04/03 10:12:07 mdejong Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -155,7 +155,7 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # I left out the other vars that also need to get defined here. # we also need to double check about including DBGX in lib names # and spaces in file or directory names for the eval -eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${TCL_DBGX}\"" +eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\"" eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" eval "DLLSUFFIX=${DLLSUFFIX}" diff --git a/win/tcl.m4 b/win/tcl.m4 index 0c07b21..2afcb6e 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -390,6 +390,8 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) + SHLIB_SUFFIX=".dll" + # Check for a bug in gcc's windres that causes the # compile to fail when a Windows native path is # passed into windres. The mingw toolchain requires @@ -475,6 +477,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ runtime= MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" + LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else @@ -492,17 +495,20 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # -luser32 and -lmsvcrt by default. Make sure CFLAGS is # included so -mno-cygwin passed the correct libs to the linker. SHLIB_LD='${CC} -shared ${CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' # Add SHLIB_LD_LIBS to the Make rule, not here. MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \ -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" LIBSUFFIX="\${DBGX}.a" + LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + SHLIB_SUFFIX=.dll EXTRA_CFLAGS="${extra_cflags}" @@ -539,8 +545,10 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ runtime=-MT MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" + LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" + SHLIB_LD_LIBS="" else # dynamic AC_MSG_RESULT([using shared flags]) @@ -548,8 +556,10 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # Add SHLIB_LD_LIBS to the Make rule, not here. MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" LIBSUFFIX="\${DBGX}.lib" + LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" + SHLIB_LD_LIBS='${LIBS}' fi # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. @@ -593,7 +603,6 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ fi SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" - SHLIB_LD_LIBS="user32.lib advapi32.lib" LIBS="user32.lib advapi32.lib" LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib" RC_OUT=-fo -- cgit v0.12 From 742abd221a0f7d0cefe9d5707d3216c9413ea72e Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 18 Apr 2003 21:56:47 +0000 Subject: * generic/tkCanvBmap.c: s/CreateBitmap/TkcCreateBitmap as Windows has a CreateBitmap function already. --- generic/tkCanvBmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index 5852533..6f979cf 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvBmap.c,v 1.7 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvBmap.c,v 1.7.2.1 2003/04/18 21:56:47 hobbs Exp $ */ #include @@ -105,7 +105,7 @@ static void ComputeBitmapBbox _ANSI_ARGS_((Tk_Canvas canvas, static int ConfigureBitmap _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int objc, Tcl_Obj *CONST objv[], int flags)); -static int CreateBitmap _ANSI_ARGS_((Tcl_Interp *interp, +static int TkcCreateBitmap _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, struct Tk_Item *itemPtr, int objc, Tcl_Obj *CONST objv[])); static void DeleteBitmap _ANSI_ARGS_((Tk_Canvas canvas, @@ -127,7 +127,7 @@ static void TranslateBitmap _ANSI_ARGS_((Tk_Canvas canvas, Tk_ItemType tkBitmapType = { "bitmap", /* name */ sizeof(BitmapItem), /* itemSize */ - CreateBitmap, /* createProc */ + TkcCreateBitmap, /* createProc */ configSpecs, /* configSpecs */ ConfigureBitmap, /* configureProc */ BitmapCoords, /* coordProc */ @@ -150,7 +150,7 @@ Tk_ItemType tkBitmapType = { /* *-------------------------------------------------------------- * - * CreateBitmap -- + * TkcCreateBitmap -- * * This procedure is invoked to create a new bitmap * item in a canvas. @@ -168,7 +168,7 @@ Tk_ItemType tkBitmapType = { */ static int -CreateBitmap(interp, canvas, itemPtr, objc, objv) +TkcCreateBitmap(interp, canvas, itemPtr, objc, objv) Tcl_Interp *interp; /* Interpreter for error reporting. */ Tk_Canvas canvas; /* Canvas to hold new item. */ Tk_Item *itemPtr; /* Record to hold new item; header -- cgit v0.12 From e3eb5cec164d8293d8804240893f09ba9c44096f Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 18 Apr 2003 21:56:59 +0000 Subject: * generic/tkCursor.c: s/GetCursor/TkcGetCursor as Windows has a GetCursor func already, which causes compiler warnings. --- generic/tkCursor.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/generic/tkCursor.c b/generic/tkCursor.c index ce6b381..4fde82f 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCursor.c,v 1.9 2002/08/05 04:30:38 dgp Exp $ + * RCS: @(#) $Id: tkCursor.c,v 1.9.2.1 2003/04/18 21:56:59 hobbs Exp $ */ #include "tkPort.h" @@ -44,7 +44,7 @@ static void DupCursorObjProc _ANSI_ARGS_((Tcl_Obj *srcObjPtr, Tcl_Obj *dupObjPtr)); static void FreeCursor _ANSI_ARGS_((TkCursor *cursorPtr)); static void FreeCursorObjProc _ANSI_ARGS_((Tcl_Obj *objPtr)); -static TkCursor * GetCursor _ANSI_ARGS_((Tcl_Interp *interp, +static TkCursor * TkcGetCursor _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, CONST char *name)); static TkCursor * GetCursorFromObj _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj *objPtr)); @@ -147,10 +147,10 @@ Tk_AllocCursorFromObj(interp, tkwin, objPtr) } /* - * Still no luck. Call GetCursor to allocate a new TkCursor object. + * Still no luck. Call TkcGetCursor to allocate a new TkCursor object. */ - cursorPtr = GetCursor(interp, tkwin, Tcl_GetString(objPtr)); + cursorPtr = TkcGetCursor(interp, tkwin, Tcl_GetString(objPtr)); objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) cursorPtr; if (cursorPtr == NULL) { return None; @@ -192,7 +192,7 @@ Tk_GetCursor(interp, tkwin, string) Tk_Uid string; /* Description of cursor. See manual entry * for details on legal syntax. */ { - TkCursor *cursorPtr = GetCursor(interp, tkwin, string); + TkCursor *cursorPtr = TkcGetCursor(interp, tkwin, string); if (cursorPtr == NULL) { return None; } @@ -202,7 +202,7 @@ Tk_GetCursor(interp, tkwin, string) /* *---------------------------------------------------------------------- * - * GetCursor -- + * TkcGetCursor -- * * Given a string describing a cursor, locate (or create if necessary) * a cursor that fits the description. This routine returns the @@ -227,7 +227,7 @@ Tk_GetCursor(interp, tkwin, string) */ static TkCursor * -GetCursor(interp, tkwin, string) +TkcGetCursor(interp, tkwin, string) Tcl_Interp *interp; /* Interpreter to use for error reporting. */ Tk_Window tkwin; /* Window in which cursor will be used. */ CONST char *string; /* Description of cursor. See manual entry -- cgit v0.12 From a46adb61bb407f5fc6a7ce81c4b7e2cfe2a2f96d Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 25 Apr 2003 20:11:06 +0000 Subject: * library/bgerror.tcl: make bgerror dialog topmost on Windows to prevent it being covered by other windows. --- library/bgerror.tcl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 0c423df..e0d32c7 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -9,8 +9,8 @@ # Copyright (c) 1998-2000 by Ajuba Solutions. # All rights reserved. # -# RCS: @(#) $Id: bgerror.tcl,v 1.23 2002/08/31 06:12:28 das Exp $ -# $Id: bgerror.tcl,v 1.23 2002/08/31 06:12:28 das Exp $ +# RCS: @(#) $Id: bgerror.tcl,v 1.23.2.1 2003/04/25 20:11:06 hobbs Exp $ +# $Id: bgerror.tcl,v 1.23.2.1 2003/04/25 20:11:06 hobbs Exp $ namespace eval ::tk { namespace eval dialog { @@ -140,7 +140,10 @@ proc ::tk::dialog::error::bgerror err { wm iconname .bgerrorDialog ErrorDialog wm protocol .bgerrorDialog WM_DELETE_WINDOW { } - if {($tcl_platform(platform) eq "macintosh") + if {$tcl_platform(platform) eq "windows"} { + wm attributes .bgerrorDialog -topmost 1 + } + if {($tcl_platform(platform) eq "macintosh") || ([tk windowingsystem] eq "aqua")} { ::tk::unsupported::MacWindowStyle style .bgerrorDialog dBoxProc } -- cgit v0.12 From 165b227f9936ee73db655e68bb22b4ddf1ad3065 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 25 Apr 2003 20:11:26 +0000 Subject: * unix/tkUnixButton.c (TkpDisplayButton): Use the normalTextGc when * win/tkWinButton.c (TkpDisplayButton): displaying disabled text that have images, as they get a gray50 stipple as well and the disabledGc is not set up correctly for font drawing. [Bug #477740] --- ChangeLog | 18 ++++++++++++++++++ unix/tkUnixButton.c | 12 ++++++++---- win/tkWinButton.c | 21 ++++++++++++--------- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e265dbe..e0b90e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2003-04-25 Jeff Hobbs + + * library/bgerror.tcl: make bgerror dialog topmost on Windows to + prevent it being covered by other windows. + + * unix/tkUnixButton.c (TkpDisplayButton): Use the normalTextGc when + * win/tkWinButton.c (TkpDisplayButton): displaying disabled text + that have images, as they get a gray50 stipple as well and the + disabledGc is not set up correctly for font drawing. [Bug #477740] + +2003-04-18 Jeff Hobbs + + * generic/tkCanvBmap.c: s/CreateBitmap/TkcCreateBitmap as Windows + has a CreateBitmap function already. + + * generic/tkCursor.c: s/GetCursor/TkcGetCursor as Windows has a + GetCursor func already, which causes compiler warnings. + 2003-04-02 Mo DeJong * win/configure: Regen. diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index c9d8448..24aef95 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixButton.c,v 1.11 2003/02/25 01:39:57 hobbs Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.1 2003/04/25 20:11:30 hobbs Exp $ */ #include "tkButton.h" @@ -266,9 +266,13 @@ TkpDisplayButton(clientData) XSetClipOrigin(butPtr->display, gc, 0, 0); } - Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, - x + textXOffset, y + textYOffset, 0, -1); - Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, + /* + * Use normalTextGC in this case since we have both text and image, + * the whole button will later be stippled 50% grey. + */ + Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, butPtr->textLayout, x + textXOffset, y + textYOffset, butPtr->underline); y += fullHeight/2; diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 1f050aa..dc8ef12 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.20 2002/09/03 01:05:11 hobbs Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.20.2.1 2003/04/25 20:11:31 hobbs Exp $ */ #define OEMRESOURCE @@ -461,10 +461,9 @@ TkpDisplayButton(clientData) } haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); - + if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { - int imageXOffset, imageYOffset, fullWidth, - fullHeight; + int imageXOffset, imageYOffset, fullWidth, fullHeight; imageXOffset = 0; imageYOffset = 0; fullWidth = 0; @@ -542,10 +541,14 @@ TkpDisplayButton(clientData) y + imageYOffset, 1); XSetClipOrigin(butPtr->display, gc, 0, 0); } - - Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, - x + textXOffset, y + textYOffset, 0, -1); - Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, + + /* + * Use normalTextGC in this case since we have both text and image, + * the whole button will later be stippled 50% grey. + */ + Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, butPtr->textLayout, x + textXOffset, y + textYOffset, butPtr->underline); height = fullHeight; @@ -643,7 +646,7 @@ TkpDisplayButton(clientData) xSrc += tsdPtr->boxWidth*2; } ySrc = (butPtr->type == TYPE_RADIO_BUTTON) ? 0 : tsdPtr->boxHeight; - + /* * Update the palette in the boxes bitmap to reflect the current * button colors. Note that this code relies on the layout of the -- cgit v0.12 From 34e11ed4fccaf6e7e181ecf0b874e60582744ee1 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 26 Apr 2003 02:53:46 +0000 Subject: * generic/tkButton.h: Rewrote the handling * generic/tkButton.c (TkButtonWorldChanged): of compound *buttons * mac/tkMacButton.c (TkpDisplayButton): to correctly display * macosx/tkMacOSXButton.c (TkpDisplayButton): mixture of disabledfg, * unix/tkUnixButton.c (TkpDisplayButton): selectcolor, indicator, * win/tkWinButton.c (TkpDisplayButton): etc. *buttons will now only stipple the image, unless no disabledfg is given, in which case it will stipple the whole button. --- ChangeLog | 9 +++++ generic/tkButton.c | 34 +++++++++++------ generic/tkButton.h | 12 +++--- mac/tkMacButton.c | 56 +++++++++++++++++----------- macosx/tkMacOSXButton.c | 97 ++++++++++++++++++++++++++++--------------------- unix/tkUnixButton.c | 59 +++++++++++++++++++----------- win/tkWinButton.c | 73 +++++++++++++++++++++---------------- 7 files changed, 205 insertions(+), 135 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0b90e7..b9e0057 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2003-04-25 Jeff Hobbs + * generic/tkButton.h: Rewrote the handling + * generic/tkButton.c (TkButtonWorldChanged): of compound *buttons + * mac/tkMacButton.c (TkpDisplayButton): to correctly display + * macosx/tkMacOSXButton.c (TkpDisplayButton): mixture of disabledfg, + * unix/tkUnixButton.c (TkpDisplayButton): selectcolor, indicator, + * win/tkWinButton.c (TkpDisplayButton): etc. *buttons will + now only stipple the image, unless no disabledfg is given, in which + case it will stipple the whole button. + * library/bgerror.tcl: make bgerror dialog topmost on Windows to prevent it being covered by other windows. diff --git a/generic/tkButton.c b/generic/tkButton.c index 07e226b..7e629cb 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.c,v 1.20 2002/08/08 09:35:34 hobbs Exp $ + * RCS: @(#) $Id: tkButton.c,v 1.20.2.1 2003/04/26 02:53:46 hobbs Exp $ */ #include "tkButton.h" @@ -699,6 +699,7 @@ ButtonCreate(clientData, interp, objc, objv, type) butPtr->normalTextGC = None; butPtr->activeTextGC = None; butPtr->disabledGC = None; + butPtr->stippleGC = None; butPtr->gray = None; butPtr->copyGC = None; butPtr->widthPtr = NULL; @@ -980,6 +981,9 @@ DestroyButton(butPtr) if (butPtr->disabledGC != None) { Tk_FreeGC(butPtr->display, butPtr->disabledGC); } + if (butPtr->stippleGC != None) { + Tk_FreeGC(butPtr->display, butPtr->stippleGC); + } if (butPtr->gray != None) { Tk_FreeBitmap(butPtr->display, butPtr->gray); } @@ -1337,20 +1341,15 @@ TkButtonWorldChanged(instanceData) butPtr->activeTextGC = newGC; } + gcValues.background = Tk_3DBorderColor(butPtr->normalBorder)->pixel; + /* - * Allocate the disabled graphics context, for drawing the widget in - * its disabled state + * Create the GC that can be used for stippling */ - gcValues.background = Tk_3DBorderColor(butPtr->normalBorder)->pixel; - if ((butPtr->disabledFg != NULL) && (butPtr->imagePtr == NULL)) { - gcValues.foreground = butPtr->disabledFg->pixel; - mask = GCForeground | GCBackground | GCFont; - } else { + + if (butPtr->stippleGC == None) { gcValues.foreground = gcValues.background; mask = GCForeground; - if (butPtr->compound != COMPOUND_NONE) { - mask |= GCFont; - } if (butPtr->gray == None) { butPtr->gray = Tk_GetBitmap(NULL, butPtr->tkwin, "gray50"); } @@ -1359,6 +1358,19 @@ TkButtonWorldChanged(instanceData) gcValues.stipple = butPtr->gray; mask |= GCFillStyle | GCStipple; } + butPtr->stippleGC = Tk_GetGC(butPtr->tkwin, mask, &gcValues); + } + + /* + * Allocate the disabled graphics context, for drawing text in + * its disabled state. + */ + + mask = GCForeground | GCBackground | GCFont; + if (butPtr->disabledFg != NULL) { + gcValues.foreground = butPtr->disabledFg->pixel; + } else { + gcValues.foreground = gcValues.background; } newGC = Tk_GetGC(butPtr->tkwin, mask, &gcValues); if (butPtr->disabledGC != None) { diff --git a/generic/tkButton.h b/generic/tkButton.h index be195c6..d0ecfea 100644 --- a/generic/tkButton.h +++ b/generic/tkButton.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.h,v 1.9 2002/06/17 10:54:29 drh Exp $ + * RCS: @(#) $Id: tkButton.h,v 1.9.2.1 2003/04/26 02:53:46 hobbs Exp $ */ #ifndef _TKBUTTON @@ -159,12 +159,10 @@ typedef struct { * screen. */ GC activeTextGC; /* GC for drawing text in active mode (NULL * means use normalTextGC). */ - GC disabledGC; /* Used to produce disabled effect. If - * disabledFg isn't NULL, this GC is used to - * draw button text or icon. Otherwise - * text or icon is drawn with normalGC and - * this GC is used to stipple background - * across it. For labels this is None. */ + GC disabledGC; /* Used to produce disabled effect for text + * and check/radio marks. */ + GC stippleGC; /* Used to produce disabled stipple effect + * for images when disabled. */ Pixmap gray; /* Pixmap for displaying disabled text if * disabledFg is NULL. */ GC copyGC; /* Used for copying information from an diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c index 2c11dba..a2a5916 100644 --- a/mac/tkMacButton.c +++ b/mac/tkMacButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacButton.c,v 1.17 2002/08/28 01:08:06 drh Exp $ + * RCS: @(#) $Id: tkMacButton.c,v 1.17.2.1 2003/04/26 02:53:47 hobbs Exp $ */ #include "tkButton.h" @@ -168,7 +168,7 @@ TkpDisplayButton( int y, relief; register Tk_Window tkwin = butPtr->tkwin; int width, height, fullWidth, fullHeight; - int imageXOffset, imageYOffset, textXOffset, textYOffset; + int textXOffset, textYOffset; int haveImage = 0, haveText = 0; int offset; /* 0 means this is a normal widget. 1 means * it is an image button, so we offset the @@ -179,6 +179,10 @@ TkpDisplayButton( GDHandle saveDevice; GWorldPtr destPort; int drawType, borderWidth; + int imageWidth, imageHeight; + int imageXOffset = 0, imageYOffset = 0; /* image information that will + * be used to restrict disabled + * pixmap as well */ GetGWorld(&saveWorld, &saveDevice); @@ -339,11 +343,11 @@ TkpDisplayButton( Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); haveImage = 1; } - haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); + imageWidth = width; + imageHeight = height; + haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { - imageXOffset = 0; - imageYOffset = 0; textXOffset = 0; textYOffset = 0; fullWidth = 0; @@ -409,25 +413,23 @@ TkpDisplayButton( x += offset; y += offset; } - + imageXOffset += x; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, - width, height, pixmap, x + imageXOffset, - y + imageYOffset); + width, height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, - height, pixmap, x + imageXOffset, - y + imageYOffset); + height, pixmap, imageXOffset, imageYOffset); } } else { - XSetClipOrigin(butPtr->display, gc, x + imageXOffset, - y + imageYOffset); + XSetClipOrigin(butPtr->display, gc, + imageXOffset, imageYOffset); XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, gc, - 0, 0, (unsigned int) width, - (unsigned int) height, x + imageXOffset, - y + imageYOffset, 1); + 0, 0, (unsigned int) width, (unsigned int) height, + imageXOffset, imageYOffset, 1); XSetClipOrigin(butPtr->display, gc, 0, 0); } @@ -452,6 +454,8 @@ TkpDisplayButton( x += offset; y += offset; } + imageXOffset += x; + imageXOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { @@ -488,23 +492,31 @@ TkpDisplayButton( * If the button is disabled with a stipple rather than a special * foreground color, generate the stippled effect. If the widget * is selected and we use a different background color when selected, - * must temporarily modify the GC. + * must temporarily modify the GC so the stippling is the right color. */ if ((butPtr->state == STATE_DISABLED) && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->selectBorder)->pixel); } - XFillRectangle(butPtr->display, pixmap, butPtr->disabledGC, - butPtr->inset, butPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*butPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*butPtr->inset)); + /* + * Stipple the whole button if no disabledFg was specified, + * otherwise restrict stippling only to displayed image + */ + if (butPtr->disabledFg == NULL) { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, 0, 0, + (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin)); + } else { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, + imageXOffset, imageYOffset, + (unsigned) imageWidth, (unsigned) imageHeight); + } if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->normalBorder)->pixel); } } diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 6314535..6bd99d9 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2 2002/08/31 06:12:29 das Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.1 2003/04/26 02:53:47 hobbs Exp $ */ #include "tkButton.h" @@ -33,10 +33,10 @@ * Some defines used to control what type of control is drawn. */ -#define DRAW_LABEL 0 /* Labels are treated genericly. */ -#define DRAW_CONTROL 1 /* Draw using the Native control. */ -#define DRAW_CUSTOM 2 /* Make our own button drawing. */ -#define DRAW_BEVEL 3 +#define DRAW_LABEL 0 /* Labels are treated genericly. */ +#define DRAW_CONTROL 1 /* Draw using the Native control. */ +#define DRAW_CUSTOM 2 /* Make our own button drawing. */ +#define DRAW_BEVEL 3 /* * Declaration of Mac specific button structure. @@ -47,18 +47,18 @@ typedef struct { SInt16 minValue; SInt16 maxValue; SInt16 procID; - int isBevel; + int isBevel; } MacControlParams; typedef struct { int drawType; Tk_3DBorder border; int relief; - int offset; /* 0 means this is a normal widget. 1 means - * it is an image button, so we offset the - * image to make the button appear to move - * up and down as the relief changes. */ - GC gc; + int offset; /* 0 means this is a normal widget. 1 means + * it is an image button, so we offset the + * image to make the button appear to move + * up and down as the relief changes. */ + GC gc; int hasImageOrBitmap; } DrawParams; @@ -201,12 +201,16 @@ TkpDisplayButton( * compiler warning. */ int y; int width, height, fullWidth, fullHeight; - int imageXOffset, imageYOffset, textXOffset, textYOffset; + int textXOffset, textYOffset; int haveImage = 0, haveText = 0; GWorldPtr destPort; int borderWidth; Pixmap pixmap; int wasUsingControl; + int imageWidth, imageHeight; + int imageXOffset = 0, imageYOffset = 0; /* image information that will + * be used to restrict disabled + * pixmap as well */ DrawParams drawParams, * dpPtr = &drawParams; butPtr->flags &= ~REDRAW_PENDING; @@ -291,10 +295,11 @@ TkpDisplayButton( Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); haveImage = 1; } + imageWidth = width; + imageHeight = height; + haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { - imageXOffset = 0; - imageYOffset = 0; textXOffset = 0; textYOffset = 0; fullWidth = 0; @@ -366,29 +371,27 @@ TkpDisplayButton( x += dpPtr->offset; y += dpPtr->offset; } - + imageXOffset += x; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, - width, height, pixmap, x + imageXOffset, - y + imageYOffset); + width, height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, - height, pixmap, x + imageXOffset, - y + imageYOffset); + height, pixmap, imageXOffset, imageYOffset); } } else { - XSetClipOrigin(butPtr->display, dpPtr->gc, x + imageXOffset, - y + imageYOffset); + XSetClipOrigin(butPtr->display, dpPtr->gc, + imageXOffset, imageYOffset); XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, dpPtr->gc, - 0, 0, (unsigned int) width, - (unsigned int) height, x + imageXOffset, - y + imageYOffset, 1); + 0, 0, (unsigned int) width, (unsigned int) height, + imageXOffset, imageYOffset, 1); XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0); } - - if (macButtonPtr->useTkText ) { + + if (macButtonPtr->useTkText) { Tk_DrawTextLayout(butPtr->display, pixmap, dpPtr->gc, butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); @@ -403,7 +406,7 @@ TkpDisplayButton( TkComputeAnchor(butPtr->anchor, tkwin, 0, 0, butPtr->indicatorSpace + width, height, &x, &y); x += butPtr->indicatorSpace; - + x += dpPtr->offset; y += dpPtr->offset; if (dpPtr->relief == TK_RELIEF_RAISED) { @@ -413,17 +416,18 @@ TkpDisplayButton( x += dpPtr->offset; y += dpPtr->offset; } + imageXOffset += x; + imageXOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, x, y); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, pixmap, x, y); } } else { - XSetClipOrigin(butPtr->display, dpPtr->gc, x, y); XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, dpPtr->gc, @@ -453,28 +457,37 @@ TkpDisplayButton( * If the button is disabled with a stipple rather than a special * foreground color, generate the stippled effect. If the widget * is selected and we use a different background color when selected, - * must temporarily modify the GC. + * must temporarily modify the GC so the stippling is the right color. */ if (macButtonPtr->useTkText) { if ((butPtr->state == STATE_DISABLED) && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn - && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, - Tk_3DBorderColor(butPtr->selectBorder)->pixel); + && (butPtr->selectBorder != NULL)) { + XSetForeground(butPtr->display, butPtr->stippledGC, + Tk_3DBorderColor(butPtr->selectBorder)->pixel); } - XFillRectangle(butPtr->display, pixmap, butPtr->disabledGC, - butPtr->inset, butPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*butPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*butPtr->inset)); + /* + * Stipple the whole button if no disabledFg was specified, + * otherwise restrict stippling only to displayed image + */ + if (butPtr->disabledFg == NULL) { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, + 0, 0, (unsigned) Tk_Width(tkwin), + (unsigned) Tk_Height(tkwin)); + } else { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, + imageXOffset, imageYOffset, + (unsigned) imageWidth, (unsigned) imageHeight); + } if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn - && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, - Tk_3DBorderColor(butPtr->normalBorder)->pixel); - } + && (butPtr->selectBorder != NULL)) { + XSetForeground(butPtr->display, butPtr->stippledGC, + Tk_3DBorderColor(butPtr->normalBorder)->pixel); + } } - + /* * Draw the border and traversal highlight last. This way, if the * button's contents overflow they'll be covered up by the border. diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index 24aef95..dd4eca9 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.1 2003/04/25 20:11:30 hobbs Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.2 2003/04/26 02:53:47 hobbs Exp $ */ #include "tkButton.h" @@ -86,12 +86,16 @@ TkpDisplayButton(clientData) int y, relief; Tk_Window tkwin = butPtr->tkwin; int width, height, fullWidth, fullHeight; - int imageXOffset, imageYOffset, textXOffset, textYOffset; + int textXOffset, textYOffset; int haveImage = 0, haveText = 0; int offset; /* 1 means this is a button widget, so we * offset the text to make the button appear * to move up and down as the relief changes. */ + int imageWidth, imageHeight; + int imageXOffset = 0, imageYOffset = 0; /* image information that will + * be used to restrict disabled + * pixmap as well */ butPtr->flags &= ~REDRAW_PENDING; if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -176,11 +180,12 @@ TkpDisplayButton(clientData) Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); haveImage = 1; } + imageWidth = width; + imageHeight = height; + haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { - imageXOffset = 0; - imageYOffset = 0; textXOffset = 0; textYOffset = 0; fullWidth = 0; @@ -246,23 +251,23 @@ TkpDisplayButton(clientData) x += offset; y += offset; } - + + imageXOffset += x; + imageYOffset += y; + if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, - width, height, pixmap, x + imageXOffset, - y + imageYOffset); + width, height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, - height, pixmap, x + imageXOffset, y + imageYOffset); + height, pixmap, imageXOffset, imageYOffset); } } else { - XSetClipOrigin(butPtr->display, gc, x + imageXOffset, - y + imageYOffset); + XSetClipOrigin(butPtr->display, gc, imageXOffset, imageYOffset); XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, gc, - 0, 0, (unsigned int) width, - (unsigned int) height, x + imageXOffset, - y + imageYOffset, 1); + 0, 0, (unsigned int) width, (unsigned int) height, + imageXOffset, imageYOffset, 1); XSetClipOrigin(butPtr->display, gc, 0, 0); } @@ -270,9 +275,9 @@ TkpDisplayButton(clientData) * Use normalTextGC in this case since we have both text and image, * the whole button will later be stippled 50% grey. */ - Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); - Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x + textXOffset, y + textYOffset, butPtr->underline); y += fullHeight/2; @@ -291,6 +296,8 @@ TkpDisplayButton(clientData) x += offset; y += offset; } + imageXOffset += x; + imageXOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { @@ -427,23 +434,31 @@ TkpDisplayButton(clientData) * If the button is disabled with a stipple rather than a special * foreground color, generate the stippled effect. If the widget * is selected and we use a different background color when selected, - * must temporarily modify the GC. + * must temporarily modify the GC so the stippling is the right color. */ if ((butPtr->state == STATE_DISABLED) && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->selectBorder)->pixel); } - XFillRectangle(butPtr->display, pixmap, butPtr->disabledGC, - butPtr->inset, butPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*butPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*butPtr->inset)); + /* + * Stipple the whole button if no disabledFg was specified, + * otherwise restrict stippling only to displayed image + */ + if (butPtr->disabledFg == NULL) { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, 0, 0, + (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin)); + } else { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, + imageXOffset, imageYOffset, + (unsigned) imageWidth, (unsigned) imageHeight); + } if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->normalBorder)->pixel); } } diff --git a/win/tkWinButton.c b/win/tkWinButton.c index dc8ef12..415a202 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.20.2.1 2003/04/25 20:11:31 hobbs Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.20.2.2 2003/04/26 02:53:47 hobbs Exp $ */ #define OEMRESOURCE @@ -355,6 +355,10 @@ TkpDisplayButton(clientData) * move up and down as the relief changes. */ int textXOffset = 0, textYOffset = 0; /* text offsets for use with * compound buttons and focus ring */ + int imageWidth, imageHeight; + int imageXOffset = 0, imageYOffset = 0; /* image information that will + * be used to restrict disabled + * pixmap as well */ DWORD *boxesPalette; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) @@ -459,15 +463,13 @@ TkpDisplayButton(clientData) Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); haveImage = 1; } + imageWidth = width; + imageHeight = height; haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { - int imageXOffset, imageYOffset, fullWidth, fullHeight; - imageXOffset = 0; - imageYOffset = 0; - fullWidth = 0; - fullHeight = 0; + int fullWidth = 0, fullHeight = 0; switch ((enum compound) butPtr->compound) { case COMPOUND_TOP: @@ -522,33 +524,27 @@ TkpDisplayButton(clientData) x += offset; y += offset; } - + imageXOffset += x; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, - width, height, pixmap, x + imageXOffset, - y + imageYOffset); + width, height, pixmap, imageXOffset, imageYOffset); } else { - Tk_RedrawImage(butPtr->image, 0, 0, width, - height, pixmap, x + imageXOffset, y + imageYOffset); + Tk_RedrawImage(butPtr->image, 0, 0, + width, height, pixmap, imageXOffset, imageYOffset); } } else { - XSetClipOrigin(butPtr->display, gc, x + imageXOffset, - y + imageYOffset); + XSetClipOrigin(butPtr->display, gc, imageXOffset, imageYOffset); XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, gc, - 0, 0, (unsigned int) width, - (unsigned int) height, x + imageXOffset, - y + imageYOffset, 1); + 0, 0, (unsigned int) width, (unsigned int) height, + imageXOffset, imageYOffset, 1); XSetClipOrigin(butPtr->display, gc, 0, 0); } - /* - * Use normalTextGC in this case since we have both text and image, - * the whole button will later be stippled 50% grey. - */ - Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); - Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x + textXOffset, y + textYOffset, butPtr->underline); height = fullHeight; @@ -563,6 +559,8 @@ TkpDisplayButton(clientData) x += offset; y += offset; } + imageXOffset += x; + imageXOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { @@ -578,7 +576,6 @@ TkpDisplayButton(clientData) (unsigned int) width, (unsigned int) height, x, y, 1); XSetClipOrigin(butPtr->display, gc, 0, 0); } - } else { TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, butPtr->indicatorSpace + butPtr->textWidth, @@ -656,7 +653,13 @@ TkpDisplayButton(clientData) * be placed into the palette. */ - boxesPalette[PAL_CHECK] = FlipColor(gc->foreground); + if ((butPtr->state == STATE_DISABLED) + && (butPtr->disabledFg == NULL)) { + boxesPalette[PAL_CHECK] = FlipColor(TkWinGetBorderPixels(tkwin, + border, TK_3D_DARK_GC)); + } else { + boxesPalette[PAL_CHECK] = FlipColor(gc->foreground); + } boxesPalette[PAL_TOP_OUTER] = FlipColor(TkWinGetBorderPixels(tkwin, border, TK_3D_DARK_GC)); boxesPalette[PAL_TOP_INNER] = FlipColor(TkWinGetBorderPixels(tkwin, @@ -689,23 +692,31 @@ TkpDisplayButton(clientData) * If the button is disabled with a stipple rather than a special * foreground color, generate the stippled effect. If the widget * is selected and we use a different background color when selected, - * must temporarily modify the GC. + * must temporarily modify the GC so the stippling is the right color. */ if ((butPtr->state == STATE_DISABLED) && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->selectBorder)->pixel); } - XFillRectangle(butPtr->display, pixmap, butPtr->disabledGC, - butPtr->inset, butPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*butPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*butPtr->inset)); + /* + * Stipple the whole button if no disabledFg was specified, + * otherwise restrict stippling only to displayed image + */ + if (butPtr->disabledFg == NULL) { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, 0, 0, + (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin)); + } else { + XFillRectangle(butPtr->display, pixmap, butPtr->stippleGC, + imageXOffset, imageYOffset, + (unsigned) imageWidth, (unsigned) imageHeight); + } if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->disabledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->normalBorder)->pixel); } } -- cgit v0.12 From 4dd5de8cb5dc5b0bd481967119258de6a7028826 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 26 Apr 2003 02:58:17 +0000 Subject: remove outdated comments --- unix/tkUnixButton.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index dd4eca9..46fac82 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.2 2003/04/26 02:53:47 hobbs Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.3 2003/04/26 02:58:17 hobbs Exp $ */ #include "tkButton.h" @@ -271,10 +271,6 @@ TkpDisplayButton(clientData) XSetClipOrigin(butPtr->display, gc, 0, 0); } - /* - * Use normalTextGC in this case since we have both text and image, - * the whole button will later be stippled 50% grey. - */ Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, -- cgit v0.12 From 513919cbad4d351c94c5bf05908de070e5627385 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 30 Apr 2003 16:18:58 +0000 Subject: * macosx/tkMacOSXButton.c (TkpDisplayButton): correct typo for stippleGC [Bug #730124]. --- ChangeLog | 5 +++++ macosx/tkMacOSXButton.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9e0057..21a7b87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-30 Jeff Hobbs + + * macosx/tkMacOSXButton.c (TkpDisplayButton): correct typo for + stippleGC [Bug #730124]. + 2003-04-25 Jeff Hobbs * generic/tkButton.h: Rewrote the handling diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 6bd99d9..2366e01 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.1 2003/04/26 02:53:47 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.2 2003/04/30 16:19:07 hobbs Exp $ */ #include "tkButton.h" @@ -465,7 +465,7 @@ TkpDisplayButton( && ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) { if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->stippledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->selectBorder)->pixel); } /* @@ -483,7 +483,7 @@ TkpDisplayButton( } if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn && (butPtr->selectBorder != NULL)) { - XSetForeground(butPtr->display, butPtr->stippledGC, + XSetForeground(butPtr->display, butPtr->stippleGC, Tk_3DBorderColor(butPtr->normalBorder)->pixel); } } -- cgit v0.12 From 996aa5aa5d6fca18e46c0f25c7f25589a1d85003 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sun, 11 May 2003 00:57:09 +0000 Subject: * generic/tkCanvPoly.c (PolygonToPostscript): * tests/canvPs.test: correct crash when generating postscript for a single-line polygon (point) with no color. [Bug #734498] (wilm) --- ChangeLog | 6 ++++++ generic/tkCanvPoly.c | 9 ++++++--- tests/canvPs.test | 22 ++++++++-------------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21a7b87..3f23e28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-05-10 Jeff Hobbs + + * generic/tkCanvPoly.c (PolygonToPostscript): + * tests/canvPs.test: correct crash when generating postscript for + a single-line polygon (point) with no color. [Bug #734498] (wilm) + 2003-04-30 Jeff Hobbs * macosx/tkMacOSXButton.c (TkpDisplayButton): correct typo for diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index 5058b9f..2b5f036 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvPoly.c,v 1.10 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvPoly.c,v 1.10.2.1 2003/05/11 00:57:09 hobbs Exp $ */ #include @@ -1852,13 +1852,16 @@ PolygonToPostscript(interp, canvas, itemPtr, prepass) } if (polyPtr->numPoints==2) { char string[128]; + if (color == NULL) { + return TCL_OK; + } + sprintf(string, "%.15g %.15g translate %.15g %.15g", polyPtr->coordPtr[0], Tk_CanvasPsY(canvas, polyPtr->coordPtr[1]), width/2.0, width/2.0); Tcl_AppendResult(interp, "matrix currentmatrix\n",string, " scale 1 0 moveto 0 0 1 0 360 arc\nsetmatrix\n", (char *) NULL); - if (Tk_CanvasPsColor(interp, canvas, color) - != TCL_OK) { + if (Tk_CanvasPsColor(interp, canvas, color) != TCL_OK) { return TCL_ERROR; } if (stipple != None) { diff --git a/tests/canvPs.test b/tests/canvPs.test index 8ab93a0..cc0f39b 100644 --- a/tests/canvPs.test +++ b/tests/canvPs.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: canvPs.test,v 1.5 2002/10/10 07:25:24 hobbs Exp $ +# RCS: @(#) $Id: canvPs.test,v 1.5.2.1 2003/05/11 00:57:10 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -124,22 +124,16 @@ test canvPs-3.2 {test ps generation with an embedded window not mapped} {} { file exists bar.ps } 1 +test canvPs-4.1 {test ps generation with single-point uncolored poly, bug 734498} {} { + destroy .c + pack [canvas .c] + .c create poly 10 20 10 20 + catch {.c postscript} +} 0 + # cleanup removeFile foo.ps removeFile bar.ps deleteWindows ::tcltest::cleanupTests return - - - - - - - - - - - - - -- cgit v0.12 From da1bf4fb459b1e4f5e1be8a76e14029d4a9d331b Mon Sep 17 00:00:00 2001 From: das Date: Tue, 13 May 2003 02:42:57 +0000 Subject: backport of Mac OS X specific changes on trunk since 8.4.2: * macosx/tkMacOSXClipboard.c (TkSelGetSelection): Convert '\r' to '\n' on the way into Tcl. (ingham) * macosx/tkMacOSXMenu.c (EventuallyInvokeMenu): New function, used to invoke menu commands at idle time. (TkMacOSXDispatchMenuEvent): Don't immediately dispatch menu commands, wait till the idle loop to do so. This is more like what is done on Windows, and avoids the crash from destroying a menu in it's command. (ingham) * macosx/tkMacOSXHLEvents.c (ReallyKillMe): Don't force the shell to exit. According to the OS X HI guidelines, it should be possible to cancel an attempt to quit, and if we force the kill, here, it would not be possible to implement this. (ingham) * macosx/tkMacOSXApplication.r (removed): * macosx/tkMacOSXLibrary.r (removed): * macosx/tkMacOSXResource.r (removed): * macosx/Wish.pbproj/project.pbxproj: * macosx/tkAboutDlg.r: updated copyrights, cleaned up about box, removed obsolete unused resource files. (steffen) --- ChangeLog | 26 ++ macosx/Wish.pbproj/project.pbxproj | 31 +-- macosx/tkAboutDlg.r | 58 ++--- macosx/tkMacOSXApplication.r | 276 -------------------- macosx/tkMacOSXClipboard.c | 15 +- macosx/tkMacOSXHLEvents.c | 11 +- macosx/tkMacOSXLibrary.r | 510 ------------------------------------- macosx/tkMacOSXMenu.c | 84 ++++-- macosx/tkMacOSXMenus.c | 3 +- macosx/tkMacOSXResource.r | 502 ------------------------------------ 10 files changed, 129 insertions(+), 1387 deletions(-) delete mode 100644 macosx/tkMacOSXApplication.r delete mode 100644 macosx/tkMacOSXLibrary.r delete mode 100644 macosx/tkMacOSXResource.r diff --git a/ChangeLog b/ChangeLog index 3f23e28..5214350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2003-05-13 Daniel Steffen + + backport of Mac OS X specific changes on trunk since 8.4.2: + + * macosx/tkMacOSXClipboard.c (TkSelGetSelection): Convert + '\r' to '\n' on the way into Tcl. (ingham) + + * macosx/tkMacOSXMenu.c (EventuallyInvokeMenu): New function, + used to invoke menu commands at idle time. + (TkMacOSXDispatchMenuEvent): Don't immediately dispatch menu + commands, wait till the idle loop to do so. This is more like + what is done on Windows, and avoids the crash from destroying + a menu in it's command. (ingham) + + * macosx/tkMacOSXHLEvents.c (ReallyKillMe): Don't force the shell + to exit. According to the OS X HI guidelines, it should be + possible to cancel an attempt to quit, and if we force the kill, + here, it would not be possible to implement this. (ingham) + + * macosx/tkMacOSXApplication.r (removed): + * macosx/tkMacOSXLibrary.r (removed): + * macosx/tkMacOSXResource.r (removed): + * macosx/Wish.pbproj/project.pbxproj: + * macosx/tkAboutDlg.r: updated copyrights, cleaned up about box, + removed obsolete unused resource files. (steffen) + 2003-05-10 Jeff Hobbs * generic/tkCanvPoly.c (PolygonToPostscript): diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index eaec7aa..e91ace9 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -328,11 +328,8 @@ children = ( F5375533016C376E01DC9062, 4C3B4CF6040B18B200C916F0, - F5375534016C376E01DC9062, F5375535016C376E01DC9062, - F5375536016C376E01DC9062, F5375538016C376E01DC9062, - F5375539016C376E01DC9062, F537553A016C376E01DC9062, ); isa = PBXGroup; @@ -345,36 +342,18 @@ path = tkAboutDlg.r; refType = 4; }; - F5375534016C376E01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - path = tkMacOSXApplication.r; - refType = 4; - }; F5375535016C376E01DC9062 = { fileEncoding = 5; isa = PBXFileReference; path = tkMacOSXCursors.r; refType = 4; }; - F5375536016C376E01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - path = tkMacOSXLibrary.r; - refType = 4; - }; F5375538016C376E01DC9062 = { fileEncoding = 5; isa = PBXFileReference; path = tkMacOSXMenu.r; refType = 4; }; - F5375539016C376E01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - path = tkMacOSXResource.r; - refType = 4; - }; F537553A016C376E01DC9062 = { fileEncoding = 5; isa = PBXFileReference; @@ -1530,7 +1509,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 8.4; - DYLIB_CURRENT_VERSION = 8.4; + DYLIB_CURRENT_VERSION = "$(FRAMEWORK_VERSION)"; DYLIB_INSTALL_PATH = /Library/Frameworks; FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\""; FRAMEWORK_VERSION = 8.4; @@ -1549,10 +1528,6 @@ SECTORDER_FLAGS = ""; TCLSH_DIR = "$(TCL_FRAMEWORK_DIR)"; TCL_FRAMEWORK_DIR = "$(SYMROOT)"; - TK_MAJOR_VERSION = 8; - TK_MINOR_VERSION = 4; - TK_PATCH_LEVEL = .1; - TK_VERSION = 8.4; USE_GCC3_PFE_SUPPORT = YES; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; WRAPPER_EXTENSION = framework; @@ -1574,7 +1549,7 @@ CFBundleExecutable Tk CFBundleGetInfoString - Tk Library 8.4, Copyright © 2002 Tcl Core Team. + Tk Library 8.4, Copyright © 2003 Tcl Core Team. MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright © 2001-2002, Apple Computer, Inc. CFBundleIconFile @@ -2953,7 +2928,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundleExecutable Wish Shell CFBundleGetInfoString - Wish Shell 8.4, Copyright © 2002 Tcl Core Team. + Wish Shell 8.4, Copyright © 2003 Tcl Core Team. MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright © 2001-2002, Apple Computer, Inc. CFBundleIconFile Wish.icns diff --git a/macosx/tkAboutDlg.r b/macosx/tkAboutDlg.r index b60f09a..aebdac7 100644 --- a/macosx/tkAboutDlg.r +++ b/macosx/tkAboutDlg.r @@ -10,19 +10,9 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkAboutDlg.r,v 1.3 2002/09/12 17:34:16 das Exp $ + * RCS: @(#) $Id: tkAboutDlg.r,v 1.3.2.1 2003/05/13 02:42:57 das Exp $ */ - - -/* - * New style DLOG templates have an extra field for the positioning - * options for the Dialog Box. We will not use this, for now, so we - * turn it off here. - */ - -#define DLOG_RezTemplateVersion 0 - /* * The folowing include and defines help construct * the version string for Tcl. @@ -33,22 +23,6 @@ #include #include "tk.h" -#if (TK_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TK_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TK_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TK_RELEASE_LEVEL == 2) -# define MINOR_VERSION (TK_MINOR_VERSION * 16) + TK_RELEASE_SERIAL -#else -# define MINOR_VERSION TK_MINOR_VERSION * 16 -#endif - -#define RELEASE_CODE 0x00 - /* * The following two resources define the default "About Box" for Mac Tk. * This dialog appears if the "About Tk..." menu item is selected from @@ -58,19 +32,29 @@ * create and manage an About Dialog box. */ -data 'DLOG' (128, "Default About Box", purgeable) { - $"0055 006B 00F3 0196 0001 0100 0100 0000" - $"0000 0081 0000 280A" +resource 'DLOG' (128, "About Box", purgeable) { + {60, 40, 300, 404}, + movableDBoxProc, + visible, + noGoAway, + 0x0, + 128, + "About Tcl & Tk", + centerMainScreen }; -resource 'DITL' (129, "About Box", purgeable) { +resource 'DITL' (128, "About Box", purgeable) { { - {128, 128, 148, 186}, Button {enabled, "Ok"}, - { 14, 108, 117, 298}, StaticText {disabled, - "Wish - Windowing Shell" "\n" "based on Tcl " - TCL_PATCH_LEVEL " & Tk " TK_PATCH_LEVEL "\n\n" "Jim Ingham & Ray Johnson" - "Scriptics Inc." "\n" "jingham@cygnus.com"}, - { 11, 24, 111, 92}, Picture {enabled, 128} + {200, 147, 220, 217}, Button {enabled, "Ok"}, + { 20, 108, 180, 344}, StaticText {disabled, + "Tcl " TCL_PATCH_LEVEL " & Tk " TK_PATCH_LEVEL "\n\n" + "© 2003 Tcl Core Team." "\n\n" + "Jim Ingham & Ian Reid" "\n" + "© 2001-2002 Apple Computer, Inc." "\n\n" + "Jim Ingham & Ray Johnson" "\n" + "© 1998-2000 Scriptics Inc." "\n" + "© 1996-1997 Sun Microsystems Inc."}, + { 20, 24, 120, 92}, Picture {enabled, 128} } }; diff --git a/macosx/tkMacOSXApplication.r b/macosx/tkMacOSXApplication.r deleted file mode 100644 index ece3891..0000000 --- a/macosx/tkMacOSXApplication.r +++ /dev/null @@ -1,276 +0,0 @@ -/* - * tkMacOSXApplication.r -- - * - * This file creates resources for use in the Wish application. - * - * Copyright (c) 1996 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tkMacOSXApplication.r,v 1.3 2002/09/12 17:34:16 das Exp $ - */ - -#include - -/* - * The folowing include and defines help construct - * the version string for Tcl. - */ - -#define RC_INVOKED -#include "tk.h" - -#if (TK_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TK_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TK_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TK_RELEASE_LEVEL == 2) -# define MINOR_VERSION (TK_MINOR_VERSION * 16) + TK_RELEASE_SERIAL -#else -# define MINOR_VERSION TK_MINOR_VERSION * 16 -#endif - -#define RELEASE_CODE 0x00 - -resource 'vers' (1) { - TK_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TK_PATCH_LEVEL, - TK_PATCH_LEVEL ", by Jim Ingham & Ian Reid" "\n" "© 2001 Apple Computer, Inc" "\n" "1998-2000 Scriptics Inc." "\n" "1996-1997 Sun Microsystems Inc." -}; - -resource 'vers' (2) { - TK_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TK_PATCH_LEVEL, - "Wish " TK_PATCH_LEVEL " © 1993-1999" -}; - -#define TK_APP_RESOURCES 128 -#define TK_APP_CREATOR 'WIsH' - -/* - * The 'BNDL' resource is the primary link between a file's - * creator/type and its icon. This resource acts for all Tcl shared - * libraries; other libraries will not need one and ought to use - * custom icons rather than new file types for a different appearance. - */ - -resource 'BNDL' (TK_APP_RESOURCES, "Tk app bundle", purgeable) -{ - TK_APP_CREATOR, - 0, - { - 'FREF', - { - 0, TK_APP_RESOURCES, - 1, TK_APP_RESOURCES+1 - }, - 'ICN#', - { - 0, TK_APP_RESOURCES, - 1, TK_APP_RESOURCES+1 - } - } -}; - -resource 'FREF' (TK_APP_RESOURCES, purgeable) -{ - 'APPL', 0, "" -}; -resource 'FREF' (TK_APP_RESOURCES+1, purgeable) -{ - 'TEXT', 1, "" -}; - -type TK_APP_CREATOR as 'STR '; -resource TK_APP_CREATOR (0, purgeable) { - "Wish " TK_PATCH_LEVEL " © 1996" -}; - -/* - * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open - * to affect the text the Finder displays in the "kind" column and - * file info dialog. This information will be applied to all files - * with the listed creator and type. - */ -resource 'kind' (TK_APP_RESOURCES, "Tcl kind", purgeable) { - TK_APP_CREATOR, - 0, /* region = USA */ - { - 'APPL', "Wish", - 'TEXT', "Tcl/Tk Script" - } -}; - -#define kIconHelpString 256 - -resource 'hfdr' (-5696, purgeable) { - HelpMgrVersion, hmDefaultOptions, 0, 0, - {HMSTRResItem {kIconHelpString}} -}; -resource 'STR ' (kIconHelpString, purgeable) { - "This is the interpreter for Tcl & Tk scripts" - " running on Macintosh computers." -}; - -/* - * The following resource define the icon used by Tcl scripts. Any - * TEXT file with the creator of WIsH will get this icon. - */ - -data 'icl4' (TK_APP_RESOURCES + 1, "Tk Doc", purgeable) { - $"000F FFFF FFFF FFFF FFFF FFF0 0000 0000" - $"000F 3333 3333 3333 3333 33FF 0000 0000" - $"000F 3333 3333 3333 3433 33F2 F000 0000" - $"000F 3333 3333 3333 7D43 33F2 2F00 0000" - $"000F 3333 3333 3335 5623 33F2 22F0 0000" - $"000F 3333 3333 3356 6343 33FF FFFF 0000" - $"000F 3333 3333 256F 5223 3333 333F 0000" - $"000F 3333 3333 D666 2433 3333 333F 0000" - $"000F 3333 3333 D5F6 6633 3333 333F 0000" - $"000F 3333 3332 5666 6733 3333 333F 0000" - $"000F 3333 3336 E56F 6633 3333 333F 0000" - $"000F 3333 3336 5656 5733 3333 333F 0000" - $"000F 3333 3336 E5B6 5233 3333 333F 0000" - $"000F 3333 3336 5ED6 3333 3333 333F 0000" - $"000F 3333 3376 6475 6233 3333 333F 0000" - $"000F 3333 333D 5D56 7333 3333 333F 0000" - $"000F 3333 3336 6C55 6333 3333 333F 0000" - $"000F 3333 3336 5C56 7333 3333 333F 0000" - $"000F 3333 3362 6CE6 D333 3333 333F 0000" - $"000F 3333 3336 5C65 6333 3333 333F 0000" - $"000F 3333 3336 EC5E 3333 3333 333F 0000" - $"000F 3333 3336 5C56 6333 3333 333F 0000" - $"000F 3333 3333 5C75 3333 3333 333F 0000" - $"000F 3333 3333 5DD6 3333 3333 333F 0000" - $"000F 3333 3333 3CDD 3333 3333 333F 0000" - $"000F 3333 3333 3303 3333 3333 333F 0000" - $"000F 3333 3333 3C33 3333 3333 333F 0000" - $"000F 3333 3333 3C33 3333 3333 333F 0000" - $"000F 3333 3333 3C33 3333 3333 333F 0000" - $"000F 3333 3333 3333 3333 3333 333F 0000" - $"000F 3333 3333 3333 3333 3333 333F 0000" - $"000F FFFF FFFF FFFF FFFF FFFF FFFF 0000" -}; - -data 'ICN#' (TK_APP_RESOURCES + 1, "Tk Doc", purgeable) { - $"1FFF FE00 1000 0300 1000 F280 1003 F240" - $"1003 E220 1007 E3F0 100F C010 100F C010" - $"100F C010 101F F010 101F F010 101F F010" - $"101F F010 101F F010 101D E010 101D E010" - $"101D E010 101D C010 101D C010 101D C010" - $"101D C010 100D 8010 100D 8010 100D 8010" - $"1005 8010 1002 0010 1002 0010 1002 0010" - $"1002 0010 1002 0010 1000 0010 1FFF FFF0" - $"1FFF FE00 1FFF FF00 1FFF FF80 1FFF FFC0" - $"1FFF FFE0 1FFF FFF0 1FFF FFF0 1FFF FFF0" - $"1FFF FFF0 1FFF FFF0 1FFF FFF0 1FFF FFF0" - $"1FFF FFF0 1FFF FFF0 1FFF FFF0 1FFF FFF0" - $"1FFF FFF0 1FFF FFF0 1FFF FFF0 1FFF FFF0" - $"1FFF FFF0 1FFF FFF0 1FFF FFF0 1FFF FFF0" - $"1FFF FFF0 1FFF FFF0 1FFF FFF0 1FFF FFF0" - $"1FFF FFF0 1FFF FFF0 1FFF FFF0 1FFF FFF0" -}; - -data 'ics#' (TK_APP_RESOURCES + 1, "Tk Doc", purgeable) { - $"7FF0 41D8 419C 4384 43C4 47C4 47C4 4784" - $"4684 4684 4284 4284 4104 4104 4104 7FFC" - $"7FE0 7FF0 7FF8 7FFC 7FFC 7FFC 7FFC 7FFC" - $"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC" -}; - -data 'ics4' (TK_APP_RESOURCES + 1, "Tk Doc", purgeable) { - $"0FFF FFFF FFFF 0000 0F33 3333 53F2 F000" - $"0F33 3335 52FF FF00 0F33 33E6 3333 3F00" - $"0F33 3256 6333 3F00 0F33 3556 6333 3F00" - $"0F33 3A5E 3333 3F00 0F33 65D6 D333 3F00" - $"0F33 3655 5333 3F00 0F33 65C6 3333 3F00" - $"0F33 3EC5 E333 3F00 0F33 36C6 3333 3F00" - $"0F33 33CD 3333 3F00 0F33 33C3 3333 3F00" - $"0F33 33C3 3333 3F00 0FFF FFFF FFFF FF00" -}; - -/* - * The following resources define the icons for the Wish - * application. - */ - -data 'icl4' (TK_APP_RESOURCES, "Tk App", purgeable) { - $"0000 0000 0000 000F 0000 0000 0000 0000" - $"0000 0000 0000 00FC F000 0000 0000 0000" - $"0000 0000 0000 0FCC CF66 0000 0000 0000" - $"0000 0000 0000 FCCC C556 0000 0000 0000" - $"0000 0000 000F CCCC 566F 0000 0000 0000" - $"0000 0000 00FC CCC5 6F5C F000 0000 0000" - $"0000 0000 0FCC CC66 66CC CF00 0000 0000" - $"0000 0000 FCCC CCD5 5666 CCF0 0000 0000" - $"0000 000F CCCC C656 5667 CCCF 0000 0000" - $"0000 00FC CCCC C6E5 5566 CCCC F000 0000" - $"0000 0FCC CCCC C656 5657 CCCC CF00 0000" - $"0000 FCCC CCCC C6E5 565C CCCC CCF0 0000" - $"000F CCCC CCCC C655 565C CCCC CCCF 0000" - $"00FC CCCC CCCC 7660 556C CCCC CCCC F000" - $"0FCC CCCC CCCC CD5D 567C CCCC CCCC CF00" - $"FCCC CCCC CCCC 6660 556C CCCC CCCC CCF0" - $"0FCC CCCC CCCC 665C 565C CCCC CCCC C0CF" - $"00FC CCCC CCCC 6660 E6DC CCCC CCCC CCF0" - $"000F CCCC CCCC C650 656C CCCC CCCC CF00" - $"0000 FCCC CCCC C6EC 5ECC CCCC CCCC F000" - $"0000 0FCC CCCC C650 566C CCCC CCCF 0000" - $"0000 00FC CCCC CC50 75CC CCCC CCF0 0000" - $"0000 000F CCCC CC50 56CC CCCC CF00 0000" - $"0000 0000 FCCC CCC0 5CCC CCCC F000 0000" - $"0000 0000 0FCC CCC0 CCCC CCCF 0000 0000" - $"0000 0000 00FC CCC0 CCCC CCF0 0000 0000" - $"0000 0000 000F CCC0 CCCC CF00 0000 0000" - $"0000 0000 0000 FCCC CCCC F000 0000 0000" - $"0000 0000 0000 0FCC CCCF 0000 0000 0000" - $"0000 0000 0000 00FC CCF0 0000 0000 0000" - $"0000 0000 0000 000F CF00 0000 0000 0000" - $"0000 0000 0000 0000 F000 0000 0000 0000" -}; - -data 'ICN#' (TK_APP_RESOURCES, "Tk App", purgeable) { - $"0001 0000 0002 8000 0004 7000 0008 7000" - $"0010 F000 0021 E800 0043 C400 0081 F200" - $"0107 F100 0207 F080 0407 F040 0807 E020" - $"1007 E010 200E E008 4002 E004 800E E002" - $"400E E001 200E C002 1006 E004 0806 C008" - $"0406 E010 0202 C020 0102 C040 0080 8080" - $"0041 0100 0021 0200 0011 0400 0009 0800" - $"0004 1000 0002 2000 0001 4000 0000 8000" - $"0001 0000 0003 8000 0007 F000 000F F000" - $"001F F000 003F F800 007F FC00 00FF FE00" - $"01FF FF00 03FF FF80 07FF FFC0 0FFF FFE0" - $"1FFF FFF0 3FFF FFF8 7FFF FFFC FFFF FFFE" - $"7FFF FFFF 3FFF FFFE 1FFF FFFC 0FFF FFF8" - $"07FF FFF0 03FF FFE0 01FF FFC0 00FF FF80" - $"007F FF00 003F FE00 001F FC00 000F F800" - $"0007 F000 0003 E000 0001 C000 0000 8000" -}; - -data 'ics#' (TK_APP_RESOURCES, "Tk App", purgeable) { - $"01C0 0260 04E0 09D0 1388 23C4 43C2 8281" - $"8282 4284 2188 1190 0920 0540 0280 0100" - $"01C0 03E0 07E0 0FF0 1FF8 3FFC 7FFE FFFF" - $"FFFE 7FFC 3FF8 1FF0 0FE0 07C0 0380 0100" -}; - -data 'ics4' (TK_APP_RESOURCES, "Tk App", purgeable) { - $"0000 000F C000 0000 0000 00FC 6600 0000" - $"0000 0FCC 6600 0000 0000 FCC6 66F0 0000" - $"000F CCD5 56CF 0000 00FC CC66 57CC F000" - $"0FCC CC65 56CC CF00 FCCC CC56 57CC CCF0" - $"0FCC CCC6 6CCC CCCF 00FC CCC6 5CCC CCF0" - $"000F CCC6 6CCC CF00 0000 FCCC 5CCC F000" - $"0000 0FCC CCCF 0000 0000 00FC CCF0 0000" - $"0000 000F CF00 0000 0000 0000 F000 0000" -}; - - diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c index 7bfa7ce..b327b90 100644 --- a/macosx/tkMacOSXClipboard.c +++ b/macosx/tkMacOSXClipboard.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.2 2002/08/31 06:12:29 das Exp $ + * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.2.2.1 2003/05/13 02:42:57 das Exp $ */ #include "tkInt.h" @@ -81,8 +81,9 @@ TkSelGetSelection( } if (length > 0) { Tcl_DString encodedText; + char *data; - buf = (char *)ckalloc(length+1); + buf = (char *) ckalloc(length + 1); buf[length] = 0; err = GetScrapFlavorData(scrapRef, 'TEXT', &length, buf); if (err != noErr) { @@ -90,7 +91,17 @@ TkSelGetSelection( " GetScrapFlavorData failed.", (char *) NULL); return TCL_ERROR; } + + /* + * Tcl expects '\n' not '\r' as the line break character. + */ + for (data = buf; *data != '\0'; data++) { + if (*data == '\r') { + *data = '\n'; + } + } + Tcl_ExternalToUtfDString(TkMacOSXCarbonEncoding, buf, length, &encodedText); result = (*proc)(clientData, interp, diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 65b0b6c..ac167f2 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.5 2003/02/25 16:11:22 das Exp $ + * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.5.2.1 2003/05/13 02:42:57 das Exp $ */ #include "tkMacOSXPort.h" @@ -404,13 +404,11 @@ ScriptHandler (const AppleEvent * event, AppleEvent * reply, long handlerRefcon) * * ReallyKillMe -- * - * This proc tries to kill the shell by running exit, and if that - * has not succeeded (e.g. because someone has renamed the exit - * command), calls Tcl_Exit to really kill the shell. Called from - * an event scheduled by the "Quit" AppleEvent handler. + * This proc tries to kill the shell by running exit, + * called from an event scheduled by the "Quit" AppleEvent handler. * * Results: - * Kills the shell. + * Runs the "exit" command which might kill the shell. * * Side effects: * None. @@ -425,7 +423,6 @@ ReallyKillMe(Tcl_Event *eventPtr, int flags) if (interp != NULL) { Tcl_GlobalEval(interp, "exit"); } - Tcl_Exit(0); return 1; } diff --git a/macosx/tkMacOSXLibrary.r b/macosx/tkMacOSXLibrary.r deleted file mode 100644 index 61f3b86..0000000 --- a/macosx/tkMacOSXLibrary.r +++ /dev/null @@ -1,510 +0,0 @@ -/* - * tkMacOSXLibrary.r -- - * - * This file creates resources for use in most Tk applications. - * This is designed to be an example of using the Tcl/Tk - * libraries in a Macintosh Application. - * - * Copyright (c) 1996 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tkMacOSXLibrary.r,v 1.3 2002/09/12 17:34:16 das Exp $ - */ - -/* - * New style DLOG templates have an extra field for the positioning - * options for the Dialog Box. We will not use this, for now, so we - * turn it off here. - */ - -#define DLOG_RezTemplateVersion 0 - -/* -#include -#include -#include -*/ - -/* - * The folowing include and defines help construct - * the version string for Tcl. - */ - -#define RC_INVOKED -#include -#include "tk.h" - -#if (TK_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TK_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TK_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TK_RELEASE_LEVEL == 2) -# define MINOR_VERSION (TK_MINOR_VERSION * 16) + TK_RELEASE_SERIAL -#else -# define MINOR_VERSION TK_MINOR_VERSION * 16 -#endif - -#define RELEASE_CODE 0x00 - -resource 'vers' (1) { - TK_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TK_PATCH_LEVEL, - TK_PATCH_LEVEL ",by Ray Johnson & Jim Ingham" "\n" "© 1993-1997 Sun Microsystems" "\n" "1998-2000 Scriptics Inc." -}; - -resource 'vers' (2) { - TK_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TK_PATCH_LEVEL, - "Tk Library " TK_PATCH_LEVEL " © 1993-1999" -}; - -#define TK_LIBRARY_RESOURCES 3000 -/* - * The -16397 string will be displayed by Finder when a user - * tries to open the shared library. The string should - * give the user a little detail about the library's capabilities - * and enough information to install the library in the correct location. - * A similar string should be placed in all shared libraries. - */ -resource 'STR ' (-16397, purgeable) { - "Tk Library\n\n" - "This is the library needed to run Tcl/Tk programs. " - "To work properly, it should be placed in the Tool Command Language folder " - "within the Extensions folder." -}; - - -/* - * We now load the Tk library into the resource fork of the library. - */ - -read 'TEXT' (TK_LIBRARY_RESOURCES+1, "tk", purgeable) - "::library:tk.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+2, "button", purgeable) - "::library:button.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+3, "dialog", purgeable) - "::library:dialog.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+4, "entry", purgeable) - "::library:entry.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+5, "focus", purgeable) - "::library:focus.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+6, "listbox", purgeable) - "::library:listbox.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+7, "menu", purgeable) - "::library:menu.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+8, "optionMenu", purgeable) - "::library:optMenu.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+9, "palette", purgeable) - "::library:palette.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+10, "scale", purgeable) - "::library:scale.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+11, "scrollbar", purgeable) - "::library:scrlbar.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+12, "tearoff", purgeable) - "::library:tearoff.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+13, "text", purgeable) - "::library:text.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+14, "tkerror", purgeable) - "::library:bgerror.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+15, "Console", purgeable) - "::library:console.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+16, "msgbox", purgeable, preload) - "::library:msgbox.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+17, "comdlg", purgeable, preload) - "::library:comdlg.tcl"; - -/* - * The following two resources define the default "About Box" for Mac Tk. - * This dialog appears if the "About Tk..." menu item is selected from - * the Apple menu. This dialog may be overridden by defining a Tcl procedure - * with the name of "tkAboutDialog". If this procedure is defined the - * default dialog will not be shown and the Tcl procedure is expected to - * create and manage an About Dialog box. - */ - -data 'DLOG' (128, "Default About Box", purgeable) { - $"0055 006B 00F3 0196 0001 0100 0100 0000" - $"0000 0081 0000 280A" -}; - -resource 'DITL' (129, "About Box", purgeable) { - { - {128, 128, 148, 186}, Button {enabled, "Ok"}, - { 14, 108, 117, 298}, StaticText {disabled, - "Wish - Windowing Shell" "\n" "based on Tcl " - TCL_PATCH_LEVEL " & Tk " TK_PATCH_LEVEL "\n\n" "Jim Ingham & Ray Johnson" - "Scriptics Inc." "\n" "jingham@cygnus.com"}, - { 11, 24, 111, 92}, Picture {enabled, 128} - } -}; - -data 'PICT' (128, purgeable) { - $"13A4 0000 0000 0064 0044 0011 02FF 0C00" - $"FFFE 0000 0048 0000 0048 0000 0000 0000" - $"0064 0044 0000 0000 0001 000A 0000 0000" - $"0064 0044 0099 8044 0000 0000 0064 0044" - $"0000 0000 0000 0000 0048 0000 0048 0000" - $"0000 0008 0001 0008 0000 0000 0108 00D8" - $"0000 0000 0001 5A5A 8000 00FF 3736 FF00" - $"FF00 FF00 3535 FF00 FF00 CC00 3434 FF00" - $"FF00 9900 3333 FF00 FF00 6600 3736 FF00" - $"FF00 3300 3535 FF00 FF00 0000 3434 FF00" - $"CC00 FF00 3333 FF00 CC00 CC00 3736 FF00" - $"CC00 9900 3535 FF00 CC00 6600 FAFA FF00" - $"CC00 3300 3333 FF00 CC00 0000 3130 FF00" - $"9900 FF00 2F2F FF00 9900 CC00 FAFA FF00" - $"9900 9900 F9F9 FF00 9900 6600 3130 FF00" - $"9900 3300 2F2F FF00 9900 0000 2E2E FF00" - $"6600 FF00 F9F9 FF00 6600 CC00 3130 FF00" - $"6600 9900 2F2F FF00 6600 6600 2E2E FF00" - $"6600 3300 2D2D FF00 6600 0000 3130 FF00" - $"3300 FF00 2F2F FF00 3300 CC00 2E2E FF00" - $"3300 9900 2D2D FF00 3300 6600 3130 FF00" - $"3300 3300 2F2F FF00 3300 0000 2E2E FF00" - $"0000 FF00 2D2D FF00 0000 CC00 3130 FF00" - $"0000 9900 2F2F FF00 0000 6600 2E2E FF00" - $"0000 3300 2DF8 FF00 0000 0000 2B2A CC00" - $"FF00 FF00 2929 CC00 FF00 CC00 2828 CC00" - $"FF00 9900 27F8 CC00 FF00 6600 2B2A CC00" - $"FF00 3300 2929 CC00 FF00 0000 2828 CC00" - $"CC00 FF00 2727 CC00 CC00 CC00 2B2A CC00" - $"CC00 9900 2929 CC00 CC00 6600 2828 CC00" - $"CC00 3300 2727 CC00 CC00 0000 2B2A CC00" - $"9900 FF00 2929 CC00 9900 CC00 2828 CC00" - $"9900 9900 2727 CC00 9900 6600 DBDB CC00" - $"9900 3300 4747 CC00 9900 0000 4646 CC00" - $"6600 FF00 4545 CC00 6600 CC00 DBDB CC00" - $"6600 9900 4747 CC00 6600 6600 4646 CC00" - $"6600 3300 4545 CC00 6600 0000 DBDB CC00" - $"3300 FF00 4747 CC00 3300 CC00 4646 CC00" - $"3300 9900 4545 CC00 3300 6600 DBDB CC00" - $"3300 3300 4141 CC00 3300 0000 4040 CC00" - $"0000 FF00 3F3F CC00 0000 CC00 4342 CC00" - $"0000 9900 4141 CC00 0000 6600 4040 CC00" - $"0000 3300 3F3F CC00 0000 0000 4342 9900" - $"FF00 FF00 4141 9900 FF00 CC00 4040 9900" - $"FF00 9900 3F3F 9900 FF00 6600 4342 9900" - $"FF00 3300 4141 9900 FF00 0000 4040 9900" - $"CC00 FF00 3F3F 9900 CC00 CC00 4342 9900" - $"CC00 9900 4141 9900 CC00 6600 4040 9900" - $"CC00 3300 3F3F 9900 CC00 0000 4342 9900" - $"9900 FF00 4141 9900 9900 CC00 4040 9900" - $"9900 9900 3F3F 9900 9900 6600 3D3C 9900" - $"9900 3300 3B3B 9900 9900 0000 3A3A 9900" - $"6600 FF00 3939 9900 6600 CC00 3D3C 9900" - $"6600 9900 3B3B 9900 6600 6600 3A3A 9900" - $"6600 3300 3939 9900 6600 0000 3D3C 9900" - $"3300 FF00 3B3B 9900 3300 CC00 3A3A 9900" - $"3300 9900 3939 9900 3300 6600 3D3C 9900" - $"3300 3300 3B3B 9900 3300 0000 3A3A 9900" - $"0000 FF00 3939 9900 0000 CC00 3D3C 9900" - $"0000 9900 3B3B 9900 0000 6600 3A3A 9900" - $"0000 3300 3939 9900 0000 0000 3D3C 6600" - $"FF00 FF00 3B3B 6600 FF00 CC00 3A3A 6600" - $"FF00 9900 3939 6600 FF00 6600 3D3C 6600" - $"FF00 3300 3B3B 6600 FF00 0000 3A3A 6600" - $"CC00 FF00 3939 6600 CC00 CC00 3736 6600" - $"CC00 9900 3535 6600 CC00 6600 3434 6600" - $"CC00 3300 3333 6600 CC00 0000 3736 6600" - $"9900 FF00 3535 6600 9900 CC00 3434 6600" - $"9900 9900 3333 6600 9900 6600 3736 6600" - $"9900 3300 3535 6600 9900 0000 3434 6600" - $"6600 FF00 3333 6600 6600 CC00 3736 6600" - $"6600 9900 3535 6600 6600 6600 3434 6600" - $"6600 3300 3333 6600 6600 0000 3736 6600" - $"3300 FF00 3535 6600 3300 CC00 3434 6600" - $"3300 9900 3333 6600 3300 6600 3736 6600" - $"3300 3300 3535 6600 3300 0000 3434 6600" - $"0000 FF00 3333 6600 0000 CC00 3130 6600" - $"0000 9900 2F2F 6600 0000 6600 2E2E 6600" - $"0000 3300 F9F9 6600 0000 0000 3130 3300" - $"FF00 FF00 2F2F 3300 FF00 CC00 2E2E 3300" - $"FF00 9900 F9F9 3300 FF00 6600 3130 3300" - $"FF00 3300 2F2F 3300 FF00 0000 2E2E 3300" - $"CC00 FF00 2D2D 3300 CC00 CC00 3130 3300" - $"CC00 9900 2F2F 3300 CC00 6600 2E2E 3300" - $"CC00 3300 2D2D 3300 CC00 0000 3130 3300" - $"9900 FF00 2F2F 3300 9900 CC00 2E2E 3300" - $"9900 9900 2D2D 3300 9900 6600 3130 3300" - $"9900 3300 2F2F 3300 9900 0000 2E2E 3300" - $"6600 FF00 2DF8 3300 6600 CC00 2B2A 3300" - $"6600 9900 2929 3300 6600 6600 2828 3300" - $"6600 3300 27F8 3300 6600 0000 2B2A 3300" - $"3300 FF00 2929 3300 3300 CC00 2828 3300" - $"3300 9900 2727 3300 3300 6600 2B2A 3300" - $"3300 3300 2929 3300 3300 0000 2828 3300" - $"0000 FF00 2727 3300 0000 CC00 2B2A 3300" - $"0000 9900 2929 3300 0000 6600 2828 3300" - $"0000 3300 2727 3300 0000 0000 4948 0000" - $"FF00 FF00 4747 0000 FF00 CC00 4646 0000" - $"FF00 9900 4545 0000 FF00 6600 4948 0000" - $"FF00 3300 4747 0000 FF00 0000 4646 0000" - $"CC00 FF00 4545 0000 CC00 CC00 4948 0000" - $"CC00 9900 4747 0000 CC00 6600 4646 0000" - $"CC00 3300 4545 0000 CC00 0000 4342 0000" - $"9900 FF00 4141 0000 9900 CC00 4040 0000" - $"9900 9900 3F3F 0000 9900 6600 4342 0000" - $"9900 3300 4141 0000 9900 0000 4040 0000" - $"6600 FF00 3F3F 0000 6600 CC00 4342 0000" - $"6600 9900 4141 0000 6600 6600 4040 0000" - $"6600 3300 3F3F 0000 6600 0000 4342 0000" - $"3300 FF00 4141 0000 3300 CC00 4040 0000" - $"3300 9900 3F3F 0000 3300 6600 4342 0000" - $"3300 3300 4141 0000 3300 0000 4040 0000" - $"0000 FF00 3F3F 0000 0000 CC00 4342 0000" - $"0000 9900 4141 0000 0000 6600 4040 0000" - $"0000 3300 3F3F EE00 0000 0000 3D3C DD00" - $"0000 0000 3B3B BB00 0000 0000 3A3A AA00" - $"0000 0000 3939 8800 0000 0000 3D3C 7700" - $"0000 0000 3B3B 5500 0000 0000 3A3A 4400" - $"0000 0000 3939 2200 0000 0000 3D3C 1100" - $"0000 0000 3B3B 0000 EE00 0000 3A3A 0000" - $"DD00 0000 3939 0000 BB00 0000 3D3C 0000" - $"AA00 0000 3B3B 0000 8800 0000 3A3A 0000" - $"7700 0000 3939 0000 5500 0000 3D3C 0000" - $"4400 0000 3B3B 0000 2200 0000 3A3A 0000" - $"1100 0000 3939 0000 0000 EE00 3D3C 0000" - $"0000 DD00 3B3B 0000 0000 BB00 3A3A 0000" - $"0000 AA00 3939 0000 0000 8800 3D3C 0000" - $"0000 7700 3B3B 0000 0000 5500 3A3A 0000" - $"0000 4400 3939 0000 0000 2200 3736 0000" - $"0000 1100 3535 EE00 EE00 EE00 3434 DD00" - $"DD00 DD00 3333 BB00 BB00 BB00 3736 AA00" - $"AA00 AA00 3535 8800 8800 8800 3434 7700" - $"7700 7700 3333 5500 5500 5500 3736 4400" - $"4400 4400 3535 2200 2200 2200 3434 1100" - $"1100 1100 3333 0000 0000 0000 0000 0000" - $"0064 0044 0000 0000 0064 0044 0000 000A" - $"0000 0000 0064 0044 02BD 0013 E800 01F5" - $"F6FE 07FE 0E02 3232 33FD 3900 0EE6 001D" - $"FC00 01F5 F5FE 0700 08FE 0E02 3232 33FE" - $"3900 3AFC 40F2 4102 4033 07E9 0017 0100" - $"0EFC 40DC 4102 390E F5F5 0002 F5F5 F6FE" - $"0702 0E07 0016 0100 32D5 4104 4039 0E32" - $"33FD 3900 3AFC 40FC 4101 3200 0801 000E" - $"C141 010E 0008 0100 0EC1 4101 0800 0801" - $"000E C141 0107 0008 0100 0EC1 4101 0700" - $"0901 0007 C241 0240 F500 0E01 0007 E841" - $"0147 47DD 4102 4000 0012 0100 07F0 4100" - $"47FA 4101 3B3B DD41 0240 0000 1901 0007" - $"F141 0C47 3B0B 3B47 4141 4711 0505 3B47" - $"DF41 023A 0000 1701 00F6 F041 010B 0BFE" - $"4105 473B 0505 113B DE41 0239 0000 1A02" - $"00F5 40F3 410C 473B 053B 4741 4741 0B0B" - $"3B47 47DE 4102 3900 0018 0200 F540 F341" - $"0247 110B FE41 0447 1105 4147 DC41 0233" - $"0000 1B02 0000 40F3 4103 4711 1147 FE41" - $"0205 3547 F741 FD47 E941 0232 0000 1E02" - $"0000 40F2 4106 113B 4741 4735 0BF7 4106" - $"4741 390E 0E40 47EA 4102 0E00 0021 0200" - $"0040 F241 0711 3B47 4141 0B35 47F9 4102" - $"4740 07FE 0002 F640 47EB 4102 0E00 0023" - $"0200 0040 F341 0847 3541 4147 3B05 4147" - $"FA41 0947 3AF6 00F5 4F55 F50E 47EB 4102" - $"0700 0022 0200 003A F341 0147 3BFE 4101" - $"0B0B F941 0547 3AF5 0055 C8FE CE01 5640" - $"EB41 0207 0000 1F02 0000 39F0 4104 4741" - $"053B 47FB 4104 4740 F5F5 A4FC CE01 C85D" - $"EB41 02F6 0000 1F02 0000 39F0 4104 473B" - $"0541 47FC 4104 4740 07F6 C8FA CE00 64EC" - $"4103 40F5 0000 1C02 0000 39F0 4102 4711" - $"0BFA 4103 4708 2AC8 FACE 0164 D8EC 4100" - $"40FE 0025 0200 0039 EF41 020B 3B47 FC41" - $"0347 0FF5 A4FB CE02 C887 D8FC 41FE 47FC" - $"4100 47F9 4100 3AFE 0028 0200 0039 EF41" - $"020B 3B47 FD41 0347 3900 A4FA CE00 ABFA" - $"4109 3B11 3B41 4147 3B0B 3B47 FA41 0039" - $"FE00 2402 0000 33F1 4102 4741 0BFA 4101" - $"0779 F9CE 0064 FA41 0235 050B FD41 010B" - $"0BF9 4100 39FE 0028 0200 0032 F141 0247" - $"3B0B FC41 0247 39F6 F9CE 0187 D8FB 4103" - $"4741 050B FE41 0247 110B F941 0039 FE00" - $"2C02 0000 32F1 4102 473B 11FB 4101 0879" - $"FACE 05AA 4041 4147 47FE 410A 4741 0511" - $"4741 4147 3511 47FA 4100 32FE 002F 0200" - $"000E F141 0347 3B11 47FE 4103 4740 F6C8" - $"FACE 0564 D841 4039 39FE 4104 473B 053B" - $"47FE 4102 3541 47FA 4100 0EFE 0027 0200" - $"000E F141 0347 3B3B 47FE 4102 470F 79FA" - $"CE0C 8741 4032 F500 003A 4741 473B 05F2" - $"4100 0EFE 0027 0200 000E F141 0347 3B3B" - $"47FD 4101 0EA4 FACE 01AB AAFE C808 7900" - $"3947 4147 110B 47F3 4100 07FE 001C 0200" - $"000E EA41 0240 2BC8 F5CE 0881 0033 4741" - $"410B 3B47 F341 0007 FE00 1A02 0000 08EB" - $"4102 473A 55F4 CE06 5D00 3947 4741 0BF1" - $"4100 F6FE 001C 0200 0007 EB41 0247 3979" - $"F4CE 0739 0039 4747 3511 47F3 4101 40F5" - $"FE00 1C02 0000 07EB 4102 4739 A4F5 CE08" - $"AB0E 0040 4741 1141 47F3 4100 40FD 001B" - $"0200 0007 EB41 0247 39A4 F5CE 0787 0707" - $"4147 4111 47F2 4100 40FD 001B 0200 0007" - $"EB41 0247 39C8 F5CE 0763 F532 4747 3B3B" - $"47F2 4100 3AFD 001A 0300 00F6 40EC 4102" - $"4739 C8F5 CE05 39F5 4047 413B F041 0039" - $"FD00 1C03 0000 F540 EB41 0140 C8FD CE01" - $"C8A4 FCCE 03AB 080E 47ED 4100 39FD 001A" - $"FE00 0040 EB41 0040 FCCE 01A4 C8FC CE03" - $"FA07 4047 ED41 0032 FD00 1AFE 0000 40EA" - $"4100 AAFE CE02 87F9 C8FC CE02 560F 47EC" - $"4100 32FD 0019 FE00 0040 EA41 00AB FECE" - $"0264 56C8 FDCE 01C8 32EA 4100 0EFD 001B" - $"FE00 0040 ED41 030E 4047 87FE CE01 4055" - $"FCCE 01FA 40EA 4100 08FD 001A FE00 003A" - $"ED41 0807 0740 FBCE CEAB 3979 FDCE 00AB" - $"E841 0007 FD00 1CFE 0000 3AED 4108 0700" - $"F6A4 CECE 8733 79FD CE02 4147 47EA 4100" - $"07FD 001E FE00 0039 ED41 0807 2AA4 C8CE" - $"CE88 0E9D FECE 0364 1C39 39EB 4101 40F5" - $"FD00 1CFE 0000 39ED 4101 074F FDCE 0264" - $"F7A4 FECE 03AB 80F6 07EB 4100 40FC 001C" - $"FE00 0039 ED41 0108 79FE CE03 AB40 2BA4" - $"FCCE 02F7 0E47 EC41 0040 FC00 1CFE 0000" - $"39ED 4101 0879 FECE 03AB 40F6 C8FC CE02" - $"F615 47EC 4100 40FC 001E FE00 003A EE41" - $"0247 0E79 FECE 03AB 40F5 C8FD CE03 A4F5" - $"3A47 EC41 0040 FC00 1EFE 0000 3AEE 4102" - $"470E 56FE CE03 FB3A F6C8 FDCE 0280 F540" - $"EB41 0140 F5FD 001E FE00 0040 EE41 0947" - $"0F56 CECE C888 39F6 C8FD CE02 5601 40EB" - $"4101 40F5 FD00 1CFE 0000 40EE 4109 4739" - $"32CE CEC8 8839 2AC8 FDCE 0156 07E9 4100" - $"F6FD 001B FE00 0040 EE41 0847 3A32 CECE" - $"C864 152A FCCE 0132 07E9 4100 07FD 001A" - $"FE00 0040 ED41 0740 32AB CEC8 6439 4EFC" - $"CE01 3A07 E941 0007 FD00 1D03 0000 F540" - $"ED41 0740 0EAB CECE 640F 4EFD CE03 AB40" - $"0840 EA41 0007 FD00 1B03 0000 F540 EC41" - $"060F 81CE CE64 334E FDCE 02AB 400E E941" - $"000E FD00 1C02 0000 F6EC 4107 4715 FACE" - $"CE64 334E FDCE 0387 0F0E 47EA 4100 0EFD" - $"001C 0200 0007 EC41 0747 16F9 CEC8 6433" - $"4EFD CE03 6308 4047 EA41 000E FD00 1A02" - $"0000 07EB 4106 40F9 CEC8 6439 4EFD CE02" - $"3940 47E9 4100 32FD 001B 0200 0007 EA41" - $"0539 CECE 8839 F6FE CE04 AB41 4139 40EA" - $"4100 32FD 001C 0200 0007 EB41 0E47 3AC8" - $"CE88 39F6 C8CE CE64 15F6 F540 EA41 0033" - $"FD00 1A02 0000 07EA 410C 40A4 CE87 392A" - $"C8CE AB41 40F8 F6E9 4100 39FD 001B 0200" - $"000E EB41 0D47 41AB C887 39F5 C8CE ABAB" - $"CEA4 07E9 4100 39FD 001C 0200 000E ED41" - $"0947 3939 4787 C8AB 40F5 C8FD CE01 A40E" - $"E941 0039 FD00 1D02 0000 0EED 4109 473A" - $"0007 80CE AB40 F5C8 FDCE 0255 0E47 EA41" - $"0039 FD00 1B02 0000 0EEB 4107 0779 C8CE" - $"CE40 F6A4 FDCE 022B 3947 EA41 003A FD00" - $"1C02 0000 0EEC 4102 4739 79FE CE02 6407" - $"A4FE CE02 A407 40E9 4100 40FD 001A 0200" - $"0032 EA41 0632 A4CE CE88 0879 FECE 02F9" - $"0F47 E941 0040 FD00 1A02 0000 32EB 4107" - $"4740 F7C8 CE87 0E79 FECE 0132 40E8 4100" - $"40FD 0019 0200 0033 EA41 0B47 40F8 C8AB" - $"0E55 CECE 8015 47E8 4100 40FD 0017 0200" - $"0033 E941 0847 40F9 A439 4FCE CE5D E641" - $"0140 F5FE 0014 0200 0039 E841 0647 64FB" - $"392B C8AB E441 00F6 FE00 1102 0000 39E5" - $"4103 40F6 8764 E441 0007 FE00 1E02 0000" - $"39EB 4102 3A0E 0EFD 4102 0740 47F6 4104" - $"400F 0839 47F4 4100 07FE 0027 0200 0039" - $"FB41 0147 47F2 4102 0800 40FE 4102 0839" - $"47FC 4101 4747 FC41 0339 0039 47F4 4100" - $"07FE 0029 0200 0039 FB41 0140 39F3 4109" - $"470E F540 4141 470E 3347 FC41 0139 3AFD" - $"4104 4739 0039 47F4 4100 08FE 0036 0200" - $"003A FC41 0347 0E00 40FC 4102 4741 40FC" - $"4109 470E F540 4141 4733 0E47 FE41 0447" - $"4000 0E47 FE41 0447 3900 3941 FE40 F741" - $"000E FE00 3A02 0000 3AFD 410E 4740 0700" - $"0E40 4741 4147 390E 390E 40FE 4108 470E" - $"F540 4141 4739 0EFC 4103 0F00 0739 FE41" - $"0747 3900 3940 080F 39F7 4100 0EFE 0035" - $"0200 0040 FB41 020E 0040 FE41 0D47 4000" - $"3941 0032 4741 4147 0EF5 40FE 4101 4008" - $"FC41 023A 000E FD41 0547 3900 3939 33F5" - $"4100 0EFE 0039 0200 0040 FC41 0347 0E00" - $"40FE 4106 4732 0040 4139 40FE 4103 470E" - $"F540 FD41 0108 40FE 4104 4740 000E 47FE" - $"4106 4739 0007 F540 47F6 4100 32FE 003A" - $"0200 0040 FC41 0C47 0E00 4047 4141 470E" - $"0040 4747 FD41 0347 0EF5 40FE 410A 470E" - $"3947 4141 4740 000E 47FE 4107 4739 000E" - $"0007 4147 F741 0032 FE00 3802 0000 40FC" - $"4102 470E 00FD 4106 4739 003A 4740 39FE" - $"4102 470E F5FD 410A 4733 3347 4141 4740" - $"000E 47FE 4106 4739 0039 3900 0EF6 4100" - $"33FE 003A 0200 F540 FC41 0447 3200 0E39" - $"FD41 0B0E 0E40 333A 4741 413A 07F5 39FE" - $"4102 473A 0EFD 410F 40F5 0733 4041 4140" - $"0E00 0E40 0700 0E40 F841 0039 FE00 2902" - $"00F5 40FA 4101 3939 FB41 023A 3A40 FD41" - $"FD40 FD41 0240 0E40 FD41 0240 3940 FD41" - $"FA40 F741 0039 FE00 2A01 00F6 F941 0147" - $"47FB 4101 4747 FB41 0147 47FB 4101 3940" - $"FD41 0147 47FB 4100 47FE 4100 47F6 4100" - $"39FE 000D 0100 07E1 4100 40E4 4100 3AFE" - $"0009 0100 07C3 4100 3AFE 0009 0100 07C3" - $"4100 40FE 0009 0100 07C3 4100 40FE 0009" - $"0100 07C3 4100 40FE 000A 0100 0EC3 4103" - $"40F5 0000 0901 000E C241 02F6 0000 0901" - $"000E C241 0207 0000 0901 000E C241 0207" - $"0000 1101 000E ED41 FE40 003A F940 E241" - $"0207 0000 2B01 0032 F941 FE40 FE39 0632" - $"0E0E 0707 F6F5 F800 02F5 F5F6 FB07 FB0E" - $"0332 3233 33FB 3901 3A3A FB40 0207 0000" - $"0E0A 000E 3939 320E 0E07 07F6 F5C8 0002" - $"BD00 00FF" -}; - -/* - * Here is the custom file open dialog. This dialog is used instead of - * the default file dialog if the -filetypes flag is specified. - */ - -#define DLOG_RezTemplateVersion 0 - -resource 'DLOG' (130, purgeable) { - {0, 0, 195, 344}, dBoxProc, invisible, noGoAway, 0, - 130, "" -}; - -resource 'DITL' (130, "File Open Box", purgeable) { - { - {135, 252, 155, 332}, Button {enabled, "Open"}, - {104, 252, 124, 332}, Button {enabled, "Cancel"}, - { 0, 0, 0, 0}, HelpItem {disabled, HMScanhdlg {130}}, - { 8, 235, 24, 337}, UserItem {enabled}, - { 32, 252, 52, 332}, Button {enabled, "Eject"}, - { 60, 252, 80, 332}, Button {enabled, "Desktop"}, - { 29, 12, 159, 230}, UserItem {enabled}, - { 6, 12, 25, 230}, UserItem {enabled}, - { 91, 251, 92, 333}, Picture {disabled, 11}, - {168, 20, 187, 300}, Control {enabled, 131} - } -}; - -resource 'CNTL' (131, "File Types menu", purgeable) { - {168, 20, 187, 300}, - popupTitleLeftJust, - visible, - 80, - 132, - popupMenuCDEFProc, - 0, - "File Type:" -}; - - -resource 'MENU' (132, preload) { - 132, - textMenuProc, - 0xFFFF, enabled, "", {} -}; diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index d92a8fb..6bf92f2 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6 2003/02/19 19:27:48 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.1 2003/05/13 02:42:57 das Exp $ */ #include "tkMacOSXInt.h" #include "tkMenuButton.h" @@ -180,10 +180,6 @@ static Tk_Window currentMenuBarOwner; static char elipsisString[TCL_UTF_MAX + 1]; /* The UTF representation of the elipsis (...) * character. */ -static int helpItemCount; /* The number of items in the help menu. - * -1 means that the help menu is - * unavailable. This does not include - * the automatically generated separator. */ static int inPostMenu; /* We cannot be re-entrant like X * windows. */ static short lastMenuID; /* To pass to NewMenu; need to figure out @@ -204,6 +200,11 @@ static struct TearoffSelect { * when we are in this menu */ } tearoffStruct; +struct MenuCommandHandlerData { /* This is the ClientData we pass to */ + TkMenu *menuPtr; /* Tcl_DoWhenIdle to move handling */ + int index; /* menu commands to the event loop. */ +}; + static RgnHandle totalMenuRgn = NULL; /* Used to update windows which have been * obscured by menus. */ @@ -261,6 +262,7 @@ static void DrawTearoffEntry _ANSI_ARGS_((TkMenu *menuPtr, TkMenuEntry *mePtr, Drawable d, GC gc, Tk_Font tkfont, CONST Tk_FontMetrics *fmPtr, int x, int y, int width, int height)); +static void EventuallyInvokeMenu (ClientData data); static void GetEntryText _ANSI_ARGS_((TkMenuEntry *mePtr, Tcl_DString *dStringPtr)); static void GetMenuAccelGeometry _ANSI_ARGS_((TkMenu *menuPtr, @@ -640,8 +642,8 @@ TkpDestroyMenu( && (helpMenuHdl != NULL)) { int i, count = CountMenuItems(helpMenuHdl); - for (i = helpItemCount; i <= count; i++) { - DeleteMenuItem(helpMenuHdl, helpItemCount); + for (i = helpIndex; i <= count; i++) { + DeleteMenuItem(helpMenuHdl, helpIndex); } } currentHelpMenuID = 0; @@ -1036,7 +1038,8 @@ ReconfigureIndividualMenu( * be the help menu. */ int base) /* The last index that we do not want * touched. 0 for normal menus; - * helpMenuItemCount for help menus. */ + * # of system help menu items + * for help menus. */ { int count; int index; @@ -1290,7 +1293,8 @@ ReconfigureMacintoshMenu( MenuItemIndex helpIndex; HMGetHelpMenu(&helpMenuHdl,&helpIndex); if (helpMenuHdl != NULL) { - ReconfigureIndividualMenu(menuPtr, helpMenuHdl, helpItemCount); + ReconfigureIndividualMenu(menuPtr, helpMenuHdl, + helpIndex - 1); } } @@ -2074,6 +2078,35 @@ TkpSetWindowMenuBar( } } +static void +/* + *---------------------------------------------------------------------- + * + * EventuallyInvokeMenu -- + * + * This IdleTime callback actually invokes the menu command + * scheduled in TkMacOSXDispatchMenuEvent. + * + * Results: + * None. + * + * Side effects: + * Commands get executed. + * + *---------------------------------------------------------------------- + */ + +EventuallyInvokeMenu (ClientData data) +{ + struct MenuCommandHandlerData *realData + = (struct MenuCommandHandlerData *) data; + + Tcl_Release(realData->menuPtr->interp); + Tcl_Release(realData->menuPtr); + TkInvokeMenu(realData->menuPtr->interp, realData->menuPtr, + realData->index); +} + /* *---------------------------------------------------------------------- * @@ -2086,7 +2119,7 @@ TkpSetWindowMenuBar( * None. * * Side effects: - * Commands get executed. + * Commands for the event are scheduled for execution at idle time. * *---------------------------------------------------------------------- */ @@ -2109,7 +2142,10 @@ TkMacOSXDispatchMenuEvent( helpMenuName); ckfree(helpMenuName); if ((helpMenuRef != NULL) && (helpMenuRef->menuPtr != NULL)) { - int newIndex = index - helpItemCount - 1; + MenuRef outHelpMenu; + MenuItemIndex itemIndex; + HMGetHelpMenu(&outHelpMenu, &itemIndex); + int newIndex = index - itemIndex; result = TkInvokeMenu(currentMenuBarInterp, helpMenuRef->menuPtr, newIndex); } @@ -2126,7 +2162,16 @@ TkMacOSXDispatchMenuEvent( GetMenuItemText(GetMenuHandle(menuID), index, itemText); result = TCL_OK; } else { - result = TkInvokeMenu(menuPtr->interp, menuPtr, index - 1); + struct MenuCommandHandlerData *data + = (struct MenuCommandHandlerData *) + ckalloc(sizeof(struct MenuCommandHandlerData)); + Tcl_Preserve(menuPtr->interp); + Tcl_Preserve(menuPtr); + data->menuPtr = menuPtr; + data->index = index - 1; + Tcl_DoWhenIdle (EventuallyInvokeMenu, + (ClientData) data); + /* result = TkInvokeMenu(menuPtr->interp, menuPtr, index - 1); */ } } else { return TCL_ERROR; @@ -2881,12 +2926,15 @@ DrawTearoffEntry( * Has to be called after the first call to InsertMenu. Sets * up the global variable for the number of items in the * unmodified help menu. + * NB. Nobody uses this any more, since you can get the number + * of system help items from HMGetHelpMenu trivially. + * But it is in the stubs table... * * Results: * None. * * Side effects: - * Sets the global helpItemCount. + * Nothing. * *---------------------------------------------------------------------- */ @@ -2894,16 +2942,6 @@ DrawTearoffEntry( void TkMacOSXSetHelpMenuItemCount() { - MenuRef helpMenuHandle; - MenuItemIndex itemIndex; - - if ((HMGetHelpMenu(&helpMenuHandle,&itemIndex) != noErr) - || (helpMenuHandle == NULL)) { - helpItemCount = -1; - } else { - helpItemCount = CountMenuItems(helpMenuHandle); - DeleteMenuItem(helpMenuHandle, helpItemCount); - } } /* diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index f3aa259..6eed023 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2 2002/08/31 06:12:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2.2.1 2003/05/13 02:42:57 das Exp $ */ #include "tk.h" @@ -209,7 +209,6 @@ TkMacOSXInitMenus( } DrawMenuBar(); - TkMacOSXSetHelpMenuItemCount(); return; } diff --git a/macosx/tkMacOSXResource.r b/macosx/tkMacOSXResource.r deleted file mode 100644 index ace7df1..0000000 --- a/macosx/tkMacOSXResource.r +++ /dev/null @@ -1,502 +0,0 @@ -/* - * tkMacOSXResources.r -- - * - * This file creates resources for use in a simple shell. - * This is designed to be an example of using the Tcl/Tk - * libraries in a Macintosh Application. - * - * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tkMacOSXResource.r,v 1.3 2002/09/12 17:34:16 das Exp $ - */ - -/* - * We define SystemSevenOrLater so that our dialogs may use the - * auto center feature. - */ -#define SystemSevenOrLater 1 - -#include -#include - -/* - * The folowing include and defines help construct - * the version string for Tcl. - */ - -#define RC_INVOKED -#include "tcl.h" -#include "tk.h" - -#if (TK_RELEASE_LEVEL == 0) -# define RELEASE_LEVEL alpha -#elif (TK_RELEASE_LEVEL == 1) -# define RELEASE_LEVEL beta -#elif (TK_RELEASE_LEVEL == 2) -# define RELEASE_LEVEL final -#endif - -#if (TK_RELEASE_LEVEL == 2) -# define MINOR_VERSION (TK_MINOR_VERSION * 16) + TK_RELEASE_SERIAL -#else -# define MINOR_VERSION TK_MINOR_VERSION * 16 -#endif - -resource 'vers' (1) { - TK_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TK_PATCH_LEVEL, - TK_PATCH_LEVEL ", by Ray Johnson & Jim Ingham " "\n" "© 1993-1997 Sun Microsystems" "\n" "© 1998-1999 Scriptics Inc." -}; - -resource 'vers' (2) { - TK_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TK_PATCH_LEVEL, - "Wish " TK_PATCH_LEVEL " © 1993-1999" -}; - - -/* - * The mechanisim below loads Tcl source into the resource fork of the - * application. The example below creates a TEXT resource named - * "Init" from the file "init.tcl". This allows applications to use - * Tcl to define the behavior of the application without having to - * require some predetermined file structure - all needed Tcl "files" - * are located within the application. To source a file for the - * resource fork the source command has been modified to support - * sourcing from resources. In the below case "source -rsrc {Init}" - * will load the TEXT resource named "Init". - */ - -#include "tclMacTclCode.r" - -read 'TEXT' (10, "tk", purgeable, preload) "::library:tk.tcl"; -read 'TEXT' (11, "button", purgeable, preload) "::library:button.tcl"; -read 'TEXT' (12, "dialog", purgeable, preload) "::library:dialog.tcl"; -read 'TEXT' (13, "entry", purgeable, preload) "::library:entry.tcl"; -read 'TEXT' (14, "focus", purgeable, preload) "::library:focus.tcl"; -read 'TEXT' (15, "listbox", purgeable, preload) "::library:listbox.tcl"; -read 'TEXT' (16, "menu", purgeable, preload) "::library:menu.tcl"; -read 'TEXT' (17, "optionMenu", purgeable, preload) "::library:optMenu.tcl"; -read 'TEXT' (18, "palette", purgeable, preload) "::library:palette.tcl"; -read 'TEXT' (19, "scale", purgeable, preload) "::library:scale.tcl"; -read 'TEXT' (20, "scrollbar", purgeable, preload) "::library:scrlbar.tcl"; -read 'TEXT' (21, "tearoff", purgeable, preload) "::library:tearoff.tcl"; -read 'TEXT' (22, "text", purgeable, preload) "::library:text.tcl"; -read 'TEXT' (23, "tkerror", purgeable, preload) "::library:bgerror.tcl"; -read 'TEXT' (24, "Console", purgeable, preload) "::library:console.tcl"; -read 'TEXT' (25, "msgbox", purgeable, preload) "::library:msgbox.tcl"; -read 'TEXT' (26, "comdlg", purgeable, preload) "::library:comdlg.tcl"; - -/* - * The following resource is used when creating the 'env' variable in - * the Macintosh environment. The creation mechanisim looks for the - * 'STR#' resource named "Tcl Environment Variables" rather than a - * specific resource number. (In other words, feel free to change the - * resource id if it conflicts with your application.) Each string in - * the resource must be of the form "KEYWORD=SOME STRING". See Tcl - * documentation for futher information about the env variable. - */ - -/* A good example of something you may want to set is: - * "TCL_LIBRARY=My disk:etc." - */ - -resource 'STR#' (128, "Tcl Environment Variables") { - { "SCHEDULE_NAME=Agent Controller Schedule", - "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler" - }; -}; - -/* - * The following two resources define the default "About Box" for Mac Tk. - * This dialog appears if the "About Tk..." menu item is selected from - * the Apple menu. This dialog may be overridden by defining a Tcl procedure - * with the name of "tkAboutDialog". If this procedure is defined the - * default dialog will not be shown and the Tcl procedure is expected to - * create and manage an About Dialog box. - */ - -resource 'DLOG' (128, "Default About Box", purgeable) { - {85, 107, 260, 412}, dBoxProc, visible, goAway, 0, - 128, "", centerMainScreen -}; - -resource 'DITL' (128, "About Box", purgeable) { - { - {143, 147, 167, 201}, Button {enabled, "Ok"}, - { 14, 108, 137, 314}, StaticText {disabled, - "Wish - Windowing Shell" "\n" "based on Tcl " - TCL_PATCH_LEVEL " & Tk " TK_PATCH_LEVEL "\n\n" - "Ray Johnson & Jim Ingham" "\n" - "Scriptics Inc." "\n" - "jim.ingham@cygnus.com"}, - { 19, 24, 119, 92}, Picture {enabled, 128} - } -}; - -data 'PICT' (128) { - $"13A4 0000 0000 0064 0044 0011 02FF 0C00" - $"FFFE 0000 0048 0000 0048 0000 0000 0000" - $"0064 0044 0000 0000 0001 000A 0000 0000" - $"0064 0044 0099 8044 0000 0000 0064 0044" - $"0000 0000 0000 0000 0048 0000 0048 0000" - $"0000 0008 0001 0008 0000 0000 0108 00D8" - $"0000 0000 0001 5A5A 8000 00FF 3736 FF00" - $"FF00 FF00 3535 FF00 FF00 CC00 3434 FF00" - $"FF00 9900 3333 FF00 FF00 6600 3736 FF00" - $"FF00 3300 3535 FF00 FF00 0000 3434 FF00" - $"CC00 FF00 3333 FF00 CC00 CC00 3736 FF00" - $"CC00 9900 3535 FF00 CC00 6600 FAFA FF00" - $"CC00 3300 3333 FF00 CC00 0000 3130 FF00" - $"9900 FF00 2F2F FF00 9900 CC00 FAFA FF00" - $"9900 9900 F9F9 FF00 9900 6600 3130 FF00" - $"9900 3300 2F2F FF00 9900 0000 2E2E FF00" - $"6600 FF00 F9F9 FF00 6600 CC00 3130 FF00" - $"6600 9900 2F2F FF00 6600 6600 2E2E FF00" - $"6600 3300 2D2D FF00 6600 0000 3130 FF00" - $"3300 FF00 2F2F FF00 3300 CC00 2E2E FF00" - $"3300 9900 2D2D FF00 3300 6600 3130 FF00" - $"3300 3300 2F2F FF00 3300 0000 2E2E FF00" - $"0000 FF00 2D2D FF00 0000 CC00 3130 FF00" - $"0000 9900 2F2F FF00 0000 6600 2E2E FF00" - $"0000 3300 2DF8 FF00 0000 0000 2B2A CC00" - $"FF00 FF00 2929 CC00 FF00 CC00 2828 CC00" - $"FF00 9900 27F8 CC00 FF00 6600 2B2A CC00" - $"FF00 3300 2929 CC00 FF00 0000 2828 CC00" - $"CC00 FF00 2727 CC00 CC00 CC00 2B2A CC00" - $"CC00 9900 2929 CC00 CC00 6600 2828 CC00" - $"CC00 3300 2727 CC00 CC00 0000 2B2A CC00" - $"9900 FF00 2929 CC00 9900 CC00 2828 CC00" - $"9900 9900 2727 CC00 9900 6600 DBDB CC00" - $"9900 3300 4747 CC00 9900 0000 4646 CC00" - $"6600 FF00 4545 CC00 6600 CC00 DBDB CC00" - $"6600 9900 4747 CC00 6600 6600 4646 CC00" - $"6600 3300 4545 CC00 6600 0000 DBDB CC00" - $"3300 FF00 4747 CC00 3300 CC00 4646 CC00" - $"3300 9900 4545 CC00 3300 6600 DBDB CC00" - $"3300 3300 4141 CC00 3300 0000 4040 CC00" - $"0000 FF00 3F3F CC00 0000 CC00 4342 CC00" - $"0000 9900 4141 CC00 0000 6600 4040 CC00" - $"0000 3300 3F3F CC00 0000 0000 4342 9900" - $"FF00 FF00 4141 9900 FF00 CC00 4040 9900" - $"FF00 9900 3F3F 9900 FF00 6600 4342 9900" - $"FF00 3300 4141 9900 FF00 0000 4040 9900" - $"CC00 FF00 3F3F 9900 CC00 CC00 4342 9900" - $"CC00 9900 4141 9900 CC00 6600 4040 9900" - $"CC00 3300 3F3F 9900 CC00 0000 4342 9900" - $"9900 FF00 4141 9900 9900 CC00 4040 9900" - $"9900 9900 3F3F 9900 9900 6600 3D3C 9900" - $"9900 3300 3B3B 9900 9900 0000 3A3A 9900" - $"6600 FF00 3939 9900 6600 CC00 3D3C 9900" - $"6600 9900 3B3B 9900 6600 6600 3A3A 9900" - $"6600 3300 3939 9900 6600 0000 3D3C 9900" - $"3300 FF00 3B3B 9900 3300 CC00 3A3A 9900" - $"3300 9900 3939 9900 3300 6600 3D3C 9900" - $"3300 3300 3B3B 9900 3300 0000 3A3A 9900" - $"0000 FF00 3939 9900 0000 CC00 3D3C 9900" - $"0000 9900 3B3B 9900 0000 6600 3A3A 9900" - $"0000 3300 3939 9900 0000 0000 3D3C 6600" - $"FF00 FF00 3B3B 6600 FF00 CC00 3A3A 6600" - $"FF00 9900 3939 6600 FF00 6600 3D3C 6600" - $"FF00 3300 3B3B 6600 FF00 0000 3A3A 6600" - $"CC00 FF00 3939 6600 CC00 CC00 3736 6600" - $"CC00 9900 3535 6600 CC00 6600 3434 6600" - $"CC00 3300 3333 6600 CC00 0000 3736 6600" - $"9900 FF00 3535 6600 9900 CC00 3434 6600" - $"9900 9900 3333 6600 9900 6600 3736 6600" - $"9900 3300 3535 6600 9900 0000 3434 6600" - $"6600 FF00 3333 6600 6600 CC00 3736 6600" - $"6600 9900 3535 6600 6600 6600 3434 6600" - $"6600 3300 3333 6600 6600 0000 3736 6600" - $"3300 FF00 3535 6600 3300 CC00 3434 6600" - $"3300 9900 3333 6600 3300 6600 3736 6600" - $"3300 3300 3535 6600 3300 0000 3434 6600" - $"0000 FF00 3333 6600 0000 CC00 3130 6600" - $"0000 9900 2F2F 6600 0000 6600 2E2E 6600" - $"0000 3300 F9F9 6600 0000 0000 3130 3300" - $"FF00 FF00 2F2F 3300 FF00 CC00 2E2E 3300" - $"FF00 9900 F9F9 3300 FF00 6600 3130 3300" - $"FF00 3300 2F2F 3300 FF00 0000 2E2E 3300" - $"CC00 FF00 2D2D 3300 CC00 CC00 3130 3300" - $"CC00 9900 2F2F 3300 CC00 6600 2E2E 3300" - $"CC00 3300 2D2D 3300 CC00 0000 3130 3300" - $"9900 FF00 2F2F 3300 9900 CC00 2E2E 3300" - $"9900 9900 2D2D 3300 9900 6600 3130 3300" - $"9900 3300 2F2F 3300 9900 0000 2E2E 3300" - $"6600 FF00 2DF8 3300 6600 CC00 2B2A 3300" - $"6600 9900 2929 3300 6600 6600 2828 3300" - $"6600 3300 27F8 3300 6600 0000 2B2A 3300" - $"3300 FF00 2929 3300 3300 CC00 2828 3300" - $"3300 9900 2727 3300 3300 6600 2B2A 3300" - $"3300 3300 2929 3300 3300 0000 2828 3300" - $"0000 FF00 2727 3300 0000 CC00 2B2A 3300" - $"0000 9900 2929 3300 0000 6600 2828 3300" - $"0000 3300 2727 3300 0000 0000 4948 0000" - $"FF00 FF00 4747 0000 FF00 CC00 4646 0000" - $"FF00 9900 4545 0000 FF00 6600 4948 0000" - $"FF00 3300 4747 0000 FF00 0000 4646 0000" - $"CC00 FF00 4545 0000 CC00 CC00 4948 0000" - $"CC00 9900 4747 0000 CC00 6600 4646 0000" - $"CC00 3300 4545 0000 CC00 0000 4342 0000" - $"9900 FF00 4141 0000 9900 CC00 4040 0000" - $"9900 9900 3F3F 0000 9900 6600 4342 0000" - $"9900 3300 4141 0000 9900 0000 4040 0000" - $"6600 FF00 3F3F 0000 6600 CC00 4342 0000" - $"6600 9900 4141 0000 6600 6600 4040 0000" - $"6600 3300 3F3F 0000 6600 0000 4342 0000" - $"3300 FF00 4141 0000 3300 CC00 4040 0000" - $"3300 9900 3F3F 0000 3300 6600 4342 0000" - $"3300 3300 4141 0000 3300 0000 4040 0000" - $"0000 FF00 3F3F 0000 0000 CC00 4342 0000" - $"0000 9900 4141 0000 0000 6600 4040 0000" - $"0000 3300 3F3F EE00 0000 0000 3D3C DD00" - $"0000 0000 3B3B BB00 0000 0000 3A3A AA00" - $"0000 0000 3939 8800 0000 0000 3D3C 7700" - $"0000 0000 3B3B 5500 0000 0000 3A3A 4400" - $"0000 0000 3939 2200 0000 0000 3D3C 1100" - $"0000 0000 3B3B 0000 EE00 0000 3A3A 0000" - $"DD00 0000 3939 0000 BB00 0000 3D3C 0000" - $"AA00 0000 3B3B 0000 8800 0000 3A3A 0000" - $"7700 0000 3939 0000 5500 0000 3D3C 0000" - $"4400 0000 3B3B 0000 2200 0000 3A3A 0000" - $"1100 0000 3939 0000 0000 EE00 3D3C 0000" - $"0000 DD00 3B3B 0000 0000 BB00 3A3A 0000" - $"0000 AA00 3939 0000 0000 8800 3D3C 0000" - $"0000 7700 3B3B 0000 0000 5500 3A3A 0000" - $"0000 4400 3939 0000 0000 2200 3736 0000" - $"0000 1100 3535 EE00 EE00 EE00 3434 DD00" - $"DD00 DD00 3333 BB00 BB00 BB00 3736 AA00" - $"AA00 AA00 3535 8800 8800 8800 3434 7700" - $"7700 7700 3333 5500 5500 5500 3736 4400" - $"4400 4400 3535 2200 2200 2200 3434 1100" - $"1100 1100 3333 0000 0000 0000 0000 0000" - $"0064 0044 0000 0000 0064 0044 0000 000A" - $"0000 0000 0064 0044 02BD 0013 E800 01F5" - $"F6FE 07FE 0E02 3232 33FD 3900 0EE6 001D" - $"FC00 01F5 F5FE 0700 08FE 0E02 3232 33FE" - $"3900 3AFC 40F2 4102 4033 07E9 0017 0100" - $"0EFC 40DC 4102 390E F5F5 0002 F5F5 F6FE" - $"0702 0E07 0016 0100 32D5 4104 4039 0E32" - $"33FD 3900 3AFC 40FC 4101 3200 0801 000E" - $"C141 010E 0008 0100 0EC1 4101 0800 0801" - $"000E C141 0107 0008 0100 0EC1 4101 0700" - $"0901 0007 C241 0240 F500 0E01 0007 E841" - $"0147 47DD 4102 4000 0012 0100 07F0 4100" - $"47FA 4101 3B3B DD41 0240 0000 1901 0007" - $"F141 0C47 3B0B 3B47 4141 4711 0505 3B47" - $"DF41 023A 0000 1701 00F6 F041 010B 0BFE" - $"4105 473B 0505 113B DE41 0239 0000 1A02" - $"00F5 40F3 410C 473B 053B 4741 4741 0B0B" - $"3B47 47DE 4102 3900 0018 0200 F540 F341" - $"0247 110B FE41 0447 1105 4147 DC41 0233" - $"0000 1B02 0000 40F3 4103 4711 1147 FE41" - $"0205 3547 F741 FD47 E941 0232 0000 1E02" - $"0000 40F2 4106 113B 4741 4735 0BF7 4106" - $"4741 390E 0E40 47EA 4102 0E00 0021 0200" - $"0040 F241 0711 3B47 4141 0B35 47F9 4102" - $"4740 07FE 0002 F640 47EB 4102 0E00 0023" - $"0200 0040 F341 0847 3541 4147 3B05 4147" - $"FA41 0947 3AF6 00F5 4F55 F50E 47EB 4102" - $"0700 0022 0200 003A F341 0147 3BFE 4101" - $"0B0B F941 0547 3AF5 0055 C8FE CE01 5640" - $"EB41 0207 0000 1F02 0000 39F0 4104 4741" - $"053B 47FB 4104 4740 F5F5 A4FC CE01 C85D" - $"EB41 02F6 0000 1F02 0000 39F0 4104 473B" - $"0541 47FC 4104 4740 07F6 C8FA CE00 64EC" - $"4103 40F5 0000 1C02 0000 39F0 4102 4711" - $"0BFA 4103 4708 2AC8 FACE 0164 D8EC 4100" - $"40FE 0025 0200 0039 EF41 020B 3B47 FC41" - $"0347 0FF5 A4FB CE02 C887 D8FC 41FE 47FC" - $"4100 47F9 4100 3AFE 0028 0200 0039 EF41" - $"020B 3B47 FD41 0347 3900 A4FA CE00 ABFA" - $"4109 3B11 3B41 4147 3B0B 3B47 FA41 0039" - $"FE00 2402 0000 33F1 4102 4741 0BFA 4101" - $"0779 F9CE 0064 FA41 0235 050B FD41 010B" - $"0BF9 4100 39FE 0028 0200 0032 F141 0247" - $"3B0B FC41 0247 39F6 F9CE 0187 D8FB 4103" - $"4741 050B FE41 0247 110B F941 0039 FE00" - $"2C02 0000 32F1 4102 473B 11FB 4101 0879" - $"FACE 05AA 4041 4147 47FE 410A 4741 0511" - $"4741 4147 3511 47FA 4100 32FE 002F 0200" - $"000E F141 0347 3B11 47FE 4103 4740 F6C8" - $"FACE 0564 D841 4039 39FE 4104 473B 053B" - $"47FE 4102 3541 47FA 4100 0EFE 0027 0200" - $"000E F141 0347 3B3B 47FE 4102 470F 79FA" - $"CE0C 8741 4032 F500 003A 4741 473B 05F2" - $"4100 0EFE 0027 0200 000E F141 0347 3B3B" - $"47FD 4101 0EA4 FACE 01AB AAFE C808 7900" - $"3947 4147 110B 47F3 4100 07FE 001C 0200" - $"000E EA41 0240 2BC8 F5CE 0881 0033 4741" - $"410B 3B47 F341 0007 FE00 1A02 0000 08EB" - $"4102 473A 55F4 CE06 5D00 3947 4741 0BF1" - $"4100 F6FE 001C 0200 0007 EB41 0247 3979" - $"F4CE 0739 0039 4747 3511 47F3 4101 40F5" - $"FE00 1C02 0000 07EB 4102 4739 A4F5 CE08" - $"AB0E 0040 4741 1141 47F3 4100 40FD 001B" - $"0200 0007 EB41 0247 39A4 F5CE 0787 0707" - $"4147 4111 47F2 4100 40FD 001B 0200 0007" - $"EB41 0247 39C8 F5CE 0763 F532 4747 3B3B" - $"47F2 4100 3AFD 001A 0300 00F6 40EC 4102" - $"4739 C8F5 CE05 39F5 4047 413B F041 0039" - $"FD00 1C03 0000 F540 EB41 0140 C8FD CE01" - $"C8A4 FCCE 03AB 080E 47ED 4100 39FD 001A" - $"FE00 0040 EB41 0040 FCCE 01A4 C8FC CE03" - $"FA07 4047 ED41 0032 FD00 1AFE 0000 40EA" - $"4100 AAFE CE02 87F9 C8FC CE02 560F 47EC" - $"4100 32FD 0019 FE00 0040 EA41 00AB FECE" - $"0264 56C8 FDCE 01C8 32EA 4100 0EFD 001B" - $"FE00 0040 ED41 030E 4047 87FE CE01 4055" - $"FCCE 01FA 40EA 4100 08FD 001A FE00 003A" - $"ED41 0807 0740 FBCE CEAB 3979 FDCE 00AB" - $"E841 0007 FD00 1CFE 0000 3AED 4108 0700" - $"F6A4 CECE 8733 79FD CE02 4147 47EA 4100" - $"07FD 001E FE00 0039 ED41 0807 2AA4 C8CE" - $"CE88 0E9D FECE 0364 1C39 39EB 4101 40F5" - $"FD00 1CFE 0000 39ED 4101 074F FDCE 0264" - $"F7A4 FECE 03AB 80F6 07EB 4100 40FC 001C" - $"FE00 0039 ED41 0108 79FE CE03 AB40 2BA4" - $"FCCE 02F7 0E47 EC41 0040 FC00 1CFE 0000" - $"39ED 4101 0879 FECE 03AB 40F6 C8FC CE02" - $"F615 47EC 4100 40FC 001E FE00 003A EE41" - $"0247 0E79 FECE 03AB 40F5 C8FD CE03 A4F5" - $"3A47 EC41 0040 FC00 1EFE 0000 3AEE 4102" - $"470E 56FE CE03 FB3A F6C8 FDCE 0280 F540" - $"EB41 0140 F5FD 001E FE00 0040 EE41 0947" - $"0F56 CECE C888 39F6 C8FD CE02 5601 40EB" - $"4101 40F5 FD00 1CFE 0000 40EE 4109 4739" - $"32CE CEC8 8839 2AC8 FDCE 0156 07E9 4100" - $"F6FD 001B FE00 0040 EE41 0847 3A32 CECE" - $"C864 152A FCCE 0132 07E9 4100 07FD 001A" - $"FE00 0040 ED41 0740 32AB CEC8 6439 4EFC" - $"CE01 3A07 E941 0007 FD00 1D03 0000 F540" - $"ED41 0740 0EAB CECE 640F 4EFD CE03 AB40" - $"0840 EA41 0007 FD00 1B03 0000 F540 EC41" - $"060F 81CE CE64 334E FDCE 02AB 400E E941" - $"000E FD00 1C02 0000 F6EC 4107 4715 FACE" - $"CE64 334E FDCE 0387 0F0E 47EA 4100 0EFD" - $"001C 0200 0007 EC41 0747 16F9 CEC8 6433" - $"4EFD CE03 6308 4047 EA41 000E FD00 1A02" - $"0000 07EB 4106 40F9 CEC8 6439 4EFD CE02" - $"3940 47E9 4100 32FD 001B 0200 0007 EA41" - $"0539 CECE 8839 F6FE CE04 AB41 4139 40EA" - $"4100 32FD 001C 0200 0007 EB41 0E47 3AC8" - $"CE88 39F6 C8CE CE64 15F6 F540 EA41 0033" - $"FD00 1A02 0000 07EA 410C 40A4 CE87 392A" - $"C8CE AB41 40F8 F6E9 4100 39FD 001B 0200" - $"000E EB41 0D47 41AB C887 39F5 C8CE ABAB" - $"CEA4 07E9 4100 39FD 001C 0200 000E ED41" - $"0947 3939 4787 C8AB 40F5 C8FD CE01 A40E" - $"E941 0039 FD00 1D02 0000 0EED 4109 473A" - $"0007 80CE AB40 F5C8 FDCE 0255 0E47 EA41" - $"0039 FD00 1B02 0000 0EEB 4107 0779 C8CE" - $"CE40 F6A4 FDCE 022B 3947 EA41 003A FD00" - $"1C02 0000 0EEC 4102 4739 79FE CE02 6407" - $"A4FE CE02 A407 40E9 4100 40FD 001A 0200" - $"0032 EA41 0632 A4CE CE88 0879 FECE 02F9" - $"0F47 E941 0040 FD00 1A02 0000 32EB 4107" - $"4740 F7C8 CE87 0E79 FECE 0132 40E8 4100" - $"40FD 0019 0200 0033 EA41 0B47 40F8 C8AB" - $"0E55 CECE 8015 47E8 4100 40FD 0017 0200" - $"0033 E941 0847 40F9 A439 4FCE CE5D E641" - $"0140 F5FE 0014 0200 0039 E841 0647 64FB" - $"392B C8AB E441 00F6 FE00 1102 0000 39E5" - $"4103 40F6 8764 E441 0007 FE00 1E02 0000" - $"39EB 4102 3A0E 0EFD 4102 0740 47F6 4104" - $"400F 0839 47F4 4100 07FE 0027 0200 0039" - $"FB41 0147 47F2 4102 0800 40FE 4102 0839" - $"47FC 4101 4747 FC41 0339 0039 47F4 4100" - $"07FE 0029 0200 0039 FB41 0140 39F3 4109" - $"470E F540 4141 470E 3347 FC41 0139 3AFD" - $"4104 4739 0039 47F4 4100 08FE 0036 0200" - $"003A FC41 0347 0E00 40FC 4102 4741 40FC" - $"4109 470E F540 4141 4733 0E47 FE41 0447" - $"4000 0E47 FE41 0447 3900 3941 FE40 F741" - $"000E FE00 3A02 0000 3AFD 410E 4740 0700" - $"0E40 4741 4147 390E 390E 40FE 4108 470E" - $"F540 4141 4739 0EFC 4103 0F00 0739 FE41" - $"0747 3900 3940 080F 39F7 4100 0EFE 0035" - $"0200 0040 FB41 020E 0040 FE41 0D47 4000" - $"3941 0032 4741 4147 0EF5 40FE 4101 4008" - $"FC41 023A 000E FD41 0547 3900 3939 33F5" - $"4100 0EFE 0039 0200 0040 FC41 0347 0E00" - $"40FE 4106 4732 0040 4139 40FE 4103 470E" - $"F540 FD41 0108 40FE 4104 4740 000E 47FE" - $"4106 4739 0007 F540 47F6 4100 32FE 003A" - $"0200 0040 FC41 0C47 0E00 4047 4141 470E" - $"0040 4747 FD41 0347 0EF5 40FE 410A 470E" - $"3947 4141 4740 000E 47FE 4107 4739 000E" - $"0007 4147 F741 0032 FE00 3802 0000 40FC" - $"4102 470E 00FD 4106 4739 003A 4740 39FE" - $"4102 470E F5FD 410A 4733 3347 4141 4740" - $"000E 47FE 4106 4739 0039 3900 0EF6 4100" - $"33FE 003A 0200 F540 FC41 0447 3200 0E39" - $"FD41 0B0E 0E40 333A 4741 413A 07F5 39FE" - $"4102 473A 0EFD 410F 40F5 0733 4041 4140" - $"0E00 0E40 0700 0E40 F841 0039 FE00 2902" - $"00F5 40FA 4101 3939 FB41 023A 3A40 FD41" - $"FD40 FD41 0240 0E40 FD41 0240 3940 FD41" - $"FA40 F741 0039 FE00 2A01 00F6 F941 0147" - $"47FB 4101 4747 FB41 0147 47FB 4101 3940" - $"FD41 0147 47FB 4100 47FE 4100 47F6 4100" - $"39FE 000D 0100 07E1 4100 40E4 4100 3AFE" - $"0009 0100 07C3 4100 3AFE 0009 0100 07C3" - $"4100 40FE 0009 0100 07C3 4100 40FE 0009" - $"0100 07C3 4100 40FE 000A 0100 0EC3 4103" - $"40F5 0000 0901 000E C241 02F6 0000 0901" - $"000E C241 0207 0000 0901 000E C241 0207" - $"0000 1101 000E ED41 FE40 003A F940 E241" - $"0207 0000 2B01 0032 F941 FE40 FE39 0632" - $"0E0E 0707 F6F5 F800 02F5 F5F6 FB07 FB0E" - $"0332 3233 33FB 3901 3A3A FB40 0207 0000" - $"0E0A 000E 3939 320E 0E07 07F6 F5C8 0002" - $"BD00 00FF" -}; - -/* - * Here is the custom file open dialog. This dialog is used instead of - * the default file dialog if the -filetypes flag is specified. - */ - -resource 'DLOG' (130, purgeable) { - {0, 0, 195, 344}, dBoxProc, invisible, noGoAway, 0, - 130, "", noAutoCenter -}; - -resource 'DITL' (130, "File Open Box", purgeable) { - { - {135, 252, 155, 332}, Button {enabled, "Open"}, - {104, 252, 124, 332}, Button {enabled, "Cancel"}, - { 0, 0, 0, 0}, HelpItem {disabled, HMScanhdlg {130}}, - { 8, 235, 24, 337}, UserItem {enabled}, - { 32, 252, 52, 332}, Button {enabled, "Eject"}, - { 60, 252, 80, 332}, Button {enabled, "Desktop"}, - { 29, 12, 159, 230}, UserItem {enabled}, - { 6, 12, 25, 230}, UserItem {enabled}, - { 91, 251, 92, 333}, Picture {disabled, 11}, - {168, 20, 187, 300}, Control {enabled, 131} - } -}; - -resource 'CNTL' (131, "File Types menu", purgeable) { - {168, 20, 187, 300}, - popupTitleLeftJust, - visible, - 80, - 132, - popupMenuCDEFProc, - 0, - "File Type:" -}; - - -resource 'MENU' (132, preload) { - 132, - textMenuProc, - 0xFFFF, enabled, "", {} -}; -- cgit v0.12 From c3c57580d0015222526486c9bc759a5ce3967034 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 13 May 2003 08:41:48 +0000 Subject: * macosx/tkMacOSXInit.c (TkpInit): use new versioned bundle resource API to get tk runtime library for TK_VERSION. [Bug 736774] --- ChangeLog | 5 +++++ macosx/tkMacOSXInit.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5214350..40575e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-05-13 Daniel Steffen + * macosx/tkMacOSXInit.c (TkpInit): use new versioned bundle + resource API to get tk runtime library for TK_VERSION. [Bug 736774] + +2003-05-13 Daniel Steffen + backport of Mac OS X specific changes on trunk since 8.4.2: * macosx/tkMacOSXClipboard.c (TkSelGetSelection): Convert diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 2180769..c8c9ef3 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXInit.c,v 1.3 2002/10/16 19:44:05 das Exp $ + * RCS: @(#) $Id: tkMacOSXInit.c,v 1.3.2.1 2003/05/13 08:41:48 das Exp $ */ #include "tkInt.h" @@ -143,8 +143,8 @@ TkpInit(interp) * FIXME: Should we come up with a more generic way of doing this? */ - result = Tcl_MacOSXOpenBundleResources(interp, "com.tcltk.tklibrary", - 1, 1024, tkLibPath); + result = Tcl_MacOSXOpenVersionedBundleResources(interp, + "com.tcltk.tklibrary", TK_VERSION, 1, 1024, tkLibPath); if (result != TCL_ERROR) { Tcl_SetVar(interp, "tk_library", tkLibPath, TCL_GLOBAL_ONLY); -- cgit v0.12 From 0f704fa75854412c44346eca435b262c33b5b5ec Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 14 May 2003 19:05:23 +0000 Subject: * library/msgs/fr.msg: updated msg catalog. [Bug #737790] (zolli) --- ChangeLog | 4 ++++ library/msgs/fr.msg | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40575e3..937d03d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-05-14 Jeff Hobbs + + * library/msgs/fr.msg: updated msg catalog. [Bug #737790] (zolli) + 2003-05-13 Daniel Steffen * macosx/tkMacOSXInit.c (TkpInit): use new versioned bundle diff --git a/library/msgs/fr.msg b/library/msgs/fr.msg index 6dba60a..b1eb7e3 100644 --- a/library/msgs/fr.msg +++ b/library/msgs/fr.msg @@ -14,10 +14,10 @@ namespace eval ::tk { ::msgcat::mcset fr "Cut" "Couper" ::msgcat::mcset fr "Delete" "Effacer" ::msgcat::mcset fr "Details >>" "D\u00e9tails >>" - ::msgcat::mcset fr "Directory \"%1\$s\" does not exist." + ::msgcat::mcset fr "Directory \"%1\$s\" does not exist." "Le r\u00e9pertoire \"%1\$s\" n'existe pas." ::msgcat::mcset fr "&Directory:" "&R\u00e9pertoire:" - ::msgcat::mcset fr "Error: %1\$s" - ::msgcat::mcset fr "Exit" + ::msgcat::mcset fr "Error: %1\$s" "Erreur: %1\$s" + ::msgcat::mcset fr "Exit" "Quitter" ::msgcat::mcset fr "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\nVoulez-vous l'\u00e9craser?" ::msgcat::mcset fr "File \"%1\$s\" already exists.\n\n" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\n\n" ::msgcat::mcset fr "File \"%1\$s\" does not exist." "Le fichier \"%1\$s\" n'existe pas." @@ -28,7 +28,7 @@ namespace eval ::tk { ::msgcat::mcset fr "&Filter" "&Filtre" ::msgcat::mcset fr "Fil&ter:" "Fil&tre:" ::msgcat::mcset fr "&Green" "&Vert" - ::msgcat::mcset fr "Hi" "All\u00f4" + ::msgcat::mcset fr "Hi" "Salut" ::msgcat::mcset fr "Hide Console" "Cacher la Console" ::msgcat::mcset fr "&Ignore" "&Ignorer" ::msgcat::mcset fr "Invalid file name \"%1\$s\"." "Nom de fichier invalide \"%1\$s\"." @@ -40,9 +40,9 @@ namespace eval ::tk { ::msgcat::mcset fr "&Open" "&Ouvrir" ::msgcat::mcset fr "Open Multiple Files" "Ouvrir plusieurs fichiers" ::msgcat::mcset fr "Paste" "Coller" - ::msgcat::mcset fr "Quit" "Abandonner" + ::msgcat::mcset fr "Quit" "Quitter" ::msgcat::mcset fr "&Red" "&Rouge" - ::msgcat::mcset fr "Replace existing file?" "Remplacer fichier existant?" + ::msgcat::mcset fr "Replace existing file?" "Remplacer le fichier existant?" ::msgcat::mcset fr "&Retry" "&R\u00e9-essayer" ::msgcat::mcset fr "&Save" "&Sauvegarder" ::msgcat::mcset fr "Save As" "Sauvegarder sous" @@ -56,7 +56,7 @@ namespace eval ::tk { ::msgcat::mcset fr "Tcl for Windows" "Tcl pour Windows" ::msgcat::mcset fr "Text Files" "Fichiers texte" ::msgcat::mcset fr "&Yes" "&Oui" - ::msgcat::mcset fr "abort" "annuler" + ::msgcat::mcset fr "abort" "abandonner" ::msgcat::mcset fr "blue" "bleu" ::msgcat::mcset fr "cancel" "annuler" ::msgcat::mcset fr "extension" @@ -65,6 +65,6 @@ namespace eval ::tk { ::msgcat::mcset fr "ignore" "ignorer" ::msgcat::mcset fr "ok" ::msgcat::mcset fr "red" "rouge" - ::msgcat::mcset fr "retry" "r\u00e9-essayer" + ::msgcat::mcset fr "retry" "r\u00e9essayer" ::msgcat::mcset fr "yes" "oui" -} +} -- cgit v0.12 From 75ba5b1bc06ee264e72e85b18eb60fa5df8d4182 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 15 May 2003 18:06:04 +0000 Subject: * unix/tkUnixFont.c: use gb2312-raw as the alias for gb2312* charset fonts. gb2312.enc was made to be euc-cn for Tcl because that is what is most often meant, but X really wants the original (-raw) gb2312 encoding. [Bug 557030] --- ChangeLog | 7 +++++++ unix/tkUnixFont.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 937d03d..798bf4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-05-15 Jeff Hobbs + + * unix/tkUnixFont.c: use gb2312-raw as the alias for gb2312* + charset fonts. gb2312.enc was made to be euc-cn for Tcl because + that is what is most often meant, but X really wants the original + (-raw) gb2312 encoding. [Bug 557030] + 2003-05-14 Jeff Hobbs * library/msgs/fr.msg: updated msg catalog. [Bug #737790] (zolli) diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 01677af..82c85bc 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFont.c,v 1.18 2003/02/25 02:59:27 hobbs Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.18.2.1 2003/05/15 18:06:04 hobbs Exp $ */ #include "tkUnixInt.h" @@ -176,7 +176,7 @@ static Tcl_ThreadDataKey dataKey; */ static EncodingAlias encodingAliases[] = { - {"gb2312", "gb2312*"}, + {"gb2312-raw", "gb2312*"}, {"big5", "big5*"}, {"cns11643-1", "cns11643*-1"}, {"cns11643-1", "cns11643*.1-0"}, -- cgit v0.12 From d41a217d6491e0d886abad956604d23a220596d9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 15 May 2003 19:04:52 +0000 Subject: Bumped version to 8.4.3 --- ChangeLog | 9 +++++++++ README | 4 ++-- generic/tk.h | 6 +++--- macosx/Wish.pbproj/project.pbxproj | 8 ++++---- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tk.spec | 6 +++--- win/configure | 2 +- win/configure.in | 4 ++-- 9 files changed, 27 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 798bf4a..f2ee9e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2003-05-15 Jeff Hobbs + * README: Bumped version to 8.4.3 + * generic/tk.h: + * macosx/Wish.pbproj/project.pbxproj: + * unix/configure: + * unix/configure.in: + * unix/tk.spec: + * win/configure: + * win/configure.in: + * unix/tkUnixFont.c: use gb2312-raw as the alias for gb2312* charset fonts. gb2312.enc was made to be euc-cn for Tcl because that is what is most often meant, but X really wants the original diff --git a/README b/README index ecbcbc9..8e34d1f 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.4.2 source distribution. + This is the Tk 8.4.3 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.39 2003/02/15 02:20:59 hobbs Exp $ +RCS: @(#) $Id: README,v 1.39.2.1 2003/05/15 19:04:53 hobbs Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index dc42c36..fb45eb1 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74 2003/02/15 02:20:59 hobbs Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.1 2003/05/15 19:04:53 hobbs Exp $ */ #ifndef _TK @@ -50,10 +50,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 4 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 2 +#define TK_RELEASE_SERIAL 3 #define TK_VERSION "8.4" -#define TK_PATCH_LEVEL "8.4.2" +#define TK_PATCH_LEVEL "8.4.3" /* * The following definitions set up the proper options for Macintosh diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index e91ace9..7e596c2 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1562,11 +1562,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType FMWK CFBundleShortVersionString - 8.4.2 + 8.4.3 CFBundleSignature WiSH CFBundleVersion - 8.4.2 + 8.4.3 "; @@ -2941,11 +2941,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType APPL CFBundleShortVersionString - 8.4.2 + 8.4.3 CFBundleSignature WiSH CFBundleVersion - 8.4.2 + 8.4.3 "; diff --git a/unix/configure b/unix/configure index 1d5026d..8248dfc 100755 --- a/unix/configure +++ b/unix/configure @@ -547,7 +547,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".2" +TK_PATCH_LEVEL=".3" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/configure.in b/unix/configure.in index 32e695f..e3571d2 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83 2003/02/15 02:21:00 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.1 2003/05/15 19:04:54 hobbs Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".2" +TK_PATCH_LEVEL=".3" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/tk.spec b/unix/tk.spec index d6f0480..b53aca9 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.15 2003/02/15 02:21:00 hobbs Exp $ +# $Id: tk.spec,v 1.15.2.1 2003/05/15 19:04:54 hobbs Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.4.2 +%define version 8.4.3 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: http://www.tcl.tk/ Packager: Carina Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.2 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.3 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure b/win/configure index 2559522..cd1bb85 100755 --- a/win/configure +++ b/win/configure @@ -536,7 +536,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".2" +TK_PATCH_LEVEL=".3" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index 9b89e2d..620a042 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.2 2003/04/03 10:12:07 mdejong Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.3 2003/05/15 19:04:55 hobbs Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".2" +TK_PATCH_LEVEL=".3" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From 495d9c77cebbefe038cc08c480645f35666ce276 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 19 May 2003 05:05:09 +0000 Subject: * macosx/Wish.pbproj/project.pbxproj: changed tkConfig.sh location in versioned framework subdirectories to be identical to location in framework toplevel; fixed stub library symbolic links to be tk version specific. --- ChangeLog | 7 +++++++ macosx/Wish.pbproj/project.pbxproj | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2ee9e9..0199a6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-05-19 Daniel Steffen + + * macosx/Wish.pbproj/project.pbxproj: changed tkConfig.sh location + in versioned framework subdirectories to be identical to location + in framework toplevel; fixed stub library symbolic links to be + tk version specific. + 2003-05-15 Jeff Hobbs * README: Bumped version to 8.4.3 diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 7e596c2..4646ee1 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -134,7 +134,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# keep copy of debug library around, so that\n\t# Deployment build can be installed on top\n\t# of Development build without overwriting it\n\tcd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\n\tcp -fp \"${PRODUCT_NAME}\" \"${PRODUCT_NAME}_debug\"\n\tln -fs \"Versions/Current/${PRODUCT_NAME}_debug\" ../..\n\tcp -fp \"libtkstub${FRAMEWORK_VERSION}.a\" \"libtkstub${FRAMEWORK_VERSION}g.a\"\n\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi\n\n# fixup Framework structure\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\nln -fs `ls libtkstub* | sed -e 's|.*|Versions/Current/&|'` ../..\nln -fs \"Resources/tkConfig.sh\" ../..\nranlib libtkstub${FRAMEWORK_VERSION}*.a"; + shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# keep copy of debug library around, so that\n\t# Deployment build can be installed on top\n\t# of Development build without overwriting it\n\tcd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\n\tcp -fp \"${PRODUCT_NAME}\" \"${PRODUCT_NAME}_debug\"\n\tln -fs \"Versions/Current/${PRODUCT_NAME}_debug\" ../..\n\tcp -fp \"libtkstub${FRAMEWORK_VERSION}.a\" \"libtkstub${FRAMEWORK_VERSION}g.a\"\n\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi\n\n# fixup Framework structure\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}\"\nln -fs `ls libtkstub* | sed -e \"s|.*|Versions/${FRAMEWORK_VERSION}/&|\"` ../..\nln -fs \"Versions/Current/tkConfig.sh\" ../..\nranlib libtkstub${FRAMEWORK_VERSION}*.a"; }; F537552A016C352C01DC9062 = { buildStyles = ( @@ -1513,7 +1513,7 @@ DYLIB_INSTALL_PATH = /Library/Frameworks; FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\""; FRAMEWORK_VERSION = 8.4; - GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; + GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../bitmaps ../generic ../xlib"; INSTALL_PATH = "${DYLIB_INSTALL_PATH}"; LIBRARY_SEARCH_PATHS = ""; @@ -2879,7 +2879,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright buildSettings = { FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\" \"$(SYMROOT)\""; FRAMEWORK_VERSION = 8.4; - GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; + GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; INSTALL_PATH = /Applications/Utilities; LIBRARY_SEARCH_PATHS = ""; @@ -3083,7 +3083,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright F59D847903390D7E016F146B, ); buildSettings = { - GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/Resources/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; + GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; LIBRARY_STYLE = STATIC; OPTIMIZATION_CFLAGS = "-O0"; @@ -3522,7 +3522,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# synthesize tkConfig.sh via buildTkConfig.tcl script\nexport DYLD_FRAMEWORK_PATH=\"${TCL_FRAMEWORK_DIR}\"\nTCLSH=\"${TCLSH_DIR}/tclsh${FRAMEWORK_VERSION}\"\nif [ ! -e \"${TCLSH}\" ]; then TCLSH=\"/bin/sh\"; fi\n\"${TCLSH}\" \"${SRCROOT}/buildTkConfig.tcl\" \"${TCL_FRAMEWORK_DIR}/Tcl.${WRAPPER_EXTENSION}/Resources/tclConfig.sh\" \"${SRCROOT}/../unix/tkConfig.sh.in\" \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Resources/tkConfig.sh\""; + shellScript = "# synthesize tkConfig.sh via buildTkConfig.tcl script\nexport DYLD_FRAMEWORK_PATH=\"${TCL_FRAMEWORK_DIR}\"\nTCLSH=\"${TCLSH_DIR}/tclsh${FRAMEWORK_VERSION}\"\nif [ ! -e \"${TCLSH}\" ]; then TCLSH=\"/bin/sh\"; fi\n\"${TCLSH}\" \"${SRCROOT}/buildTkConfig.tcl\" \"${TCL_FRAMEWORK_DIR}/Tcl.${WRAPPER_EXTENSION}/tclConfig.sh\" \"${SRCROOT}/../unix/tkConfig.sh.in\" \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/tkConfig.sh\""; }; F5C2EA33034D71B2016F146B = { isa = PBXFileReference; -- cgit v0.12 From 2e49522f6ab14d531ac0f2865de2a89475473fce Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 20 May 2003 17:32:19 +0000 Subject: * unix/Makefile.in: do not run autoconf during 'make dist' as the configure is now a CVS-maintained file and should be up-to-date. --- ChangeLog | 5 +++++ unix/Makefile.in | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0199a6e..30704ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-05-20 Jeff Hobbs + + * unix/Makefile.in: do not run autoconf during 'make dist' as the + configure is now a CVS-maintained file and should be up-to-date. + 2003-05-19 Daniel Steffen * macosx/Wish.pbproj/project.pbxproj: changed tkConfig.sh location diff --git a/unix/Makefile.in b/unix/Makefile.in index a20a3e3..d19eef8 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.87 2002/11/19 02:20:35 hobbs Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.87.2.1 2003/05/20 17:32:19 hobbs Exp $ # Current Tk version; used in various names. @@ -1065,10 +1065,8 @@ DISTNAME = tk${VERSION}${PATCH_LEVEL} ZIPNAME = tk${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip DISTDIR = $(DISTROOT)/$(DISTNAME) TCLDIR = @TCL_SRC_DIR@ -$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in - autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure -dist: $(UNIX_DIR)/configure mklinks +dist: mklinks rm -rf $(DISTDIR) mkdir -p $(DISTDIR) mkdir $(DISTDIR)/unix -- cgit v0.12 From 2d4916cbdac6261f8321457b3a8efdf8446d0cd3 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 20 May 2003 19:34:57 +0000 Subject: updated changes for 8.4.3 --- ChangeLog | 4 ++++ changes | 25 ++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 30704ad..15cfedd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2003-05-20 Jeff Hobbs + *** 8.4.3 TAGGED FOR RELEASE *** + + * changes: updated for 8.4.3 + * unix/Makefile.in: do not run autoconf during 'make dist' as the configure is now a CVS-maintained file and should be up-to-date. diff --git a/changes b/changes index 1a98220..43b9c62 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64 2003/03/03 20:01:55 hobbs Exp $ +RCS: @(#) $Id: changes,v 1.64.2.1 2003/05/20 19:34:57 hobbs Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5480,3 +5480,26 @@ of the event structure when that field is valid for that event type. (fellows) *** POTENTIAL INCOMPATIBILITY *** --- Released 8.4.2, March 3, 2002 --- See ChangeLog for details --- + +2003-03-14 (bug fix)[701812] Stop buttons from being very wide when a +tk_messageBox has a lot of content on Unix + +2003-03-18 (bug fix) Fixed crash in [winfo server] on Mac OS X + +2003-04-25 (bug fix)[477740] Correct compound button display in the +disabled state + +2003-05-10 (bug fix)[734498] Correct crash when generating postscript for a +single-line polygon (point) with no color. + +2003-05-13 (feature enhancement)[736774] Use new versioned bundle resource +API to get tk runtime library for TK_VERSION on Mac OS X + +2003-05-14 (bug fix)[737790] Updated French message catalog + +2003-05-15 (bug fix)[557030] Use gb2312-raw as the alias for gb2312* +charset fonts. gb2312.enc was made to be euc-cn for Tcl because that is +what is most often meant, but X really wants the original (-raw) gb2312 +encoding. + +--- Released 8.4.3, May 20, 2002 --- See ChangeLog for details --- -- cgit v0.12 From f948d9736a903c2647eb18c8b152e962811dd601 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 7 Jul 2003 09:43:01 +0000 Subject: Backported fix for [Bug 749353] --- ChangeLog | 6 ++++++ generic/tkImage.c | 27 ++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15cfedd..bdc4ab8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-07 Donal K. Fellows + + * generic/tkImage.c (TkDeleteAllImages,etc.): Stopped the deleting + of hash entries from a table that has just been deleted by this + function when some images are Tcl_Preserve()d... [Bug 749353] + 2003-05-20 Jeff Hobbs *** 8.4.3 TAGGED FOR RELEASE *** diff --git a/generic/tkImage.c b/generic/tkImage.c index feb65ab..78e2a56 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkImage.c,v 1.19 2003/01/22 14:32:59 dkf Exp $ + * RCS: @(#) $Id: tkImage.c,v 1.19.2.1 2003/07/07 09:43:01 dkf Exp $ */ #include "tkInt.h" @@ -87,7 +87,8 @@ static Tcl_ThreadDataKey dataKey; */ static void DeleteImage _ANSI_ARGS_((ImageMaster *masterPtr)); -static void EventuallyDeleteImage _ANSI_ARGS_((ImageMaster *masterPtr)); +static void EventuallyDeleteImage _ANSI_ARGS_((ImageMaster *masterPtr, + int forgetHashEntryNow)); /* *---------------------------------------------------------------------- @@ -316,7 +317,7 @@ Tk_ImageObjCmd(clientData, interp, objc, objv) if ((*typePtr->createProc)(interp, name, objc, args, typePtr, (Tk_ImageMaster) masterPtr, &masterPtr->masterData) != TCL_OK) { - EventuallyDeleteImage(masterPtr); + EventuallyDeleteImage(masterPtr, 0); Tcl_Release((ClientData) masterPtr); if (oldimage) { ckfree((char *) args); @@ -527,6 +528,9 @@ Tk_NameOfImage(imageMaster) { ImageMaster *masterPtr = (ImageMaster *) imageMaster; + if (masterPtr->hPtr == NULL) { + return NULL; + } return Tcl_GetHashKey(masterPtr->tablePtr, masterPtr->hPtr); } @@ -648,7 +652,10 @@ Tk_FreeImage(image) */ if ((masterPtr->typePtr == NULL) && (masterPtr->instancePtr == NULL)) { - Tcl_DeleteHashEntry(masterPtr->hPtr); + if (masterPtr->hPtr != NULL) { + Tcl_DeleteHashEntry(masterPtr->hPtr); + } + Tcl_Release(masterPtr->winPtr); ckfree((char *) masterPtr); } } @@ -923,7 +930,9 @@ DeleteImage(masterPtr) (*typePtr->deleteProc)(masterPtr->masterData); } if (masterPtr->instancePtr == NULL) { - Tcl_DeleteHashEntry(masterPtr->hPtr); + if (masterPtr->hPtr != NULL) { + Tcl_DeleteHashEntry(masterPtr->hPtr); + } Tcl_Release((ClientData) masterPtr->winPtr); ckfree((char *) masterPtr); } @@ -948,9 +957,13 @@ DeleteImage(masterPtr) */ static void -EventuallyDeleteImage(masterPtr) +EventuallyDeleteImage(masterPtr, forgetHashEntryNow) ImageMaster *masterPtr; /* Pointer to main data structure for image. */ + int forgetHashEntryNow; { + if (forgetHashEntryNow) { + masterPtr->hPtr = NULL; + } if (!masterPtr->deleted) { masterPtr->deleted = 1; Tcl_EventuallyFree((ClientData) masterPtr, @@ -987,7 +1000,7 @@ TkDeleteAllImages(mainPtr) for (hPtr = Tcl_FirstHashEntry(&mainPtr->imageTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { - EventuallyDeleteImage((ImageMaster *) Tcl_GetHashValue(hPtr)); + EventuallyDeleteImage((ImageMaster *) Tcl_GetHashValue(hPtr), 1); } Tcl_DeleteHashTable(&mainPtr->imageTable); } -- cgit v0.12 From 1d274c11dc49bdebacb5e762bcb106fad8f9537d Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 9 Jul 2003 21:12:52 +0000 Subject: Stop xhost smash by the test suite; that can render a machine unusable. --- ChangeLog | 6 ++++++ tests/send.test | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdc4ab8..4377027 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-09 Donal K. Fellows + + * tests/send.test: Strengthened constraints to stop accidental + smashing of Xserver access; some systems (*ahem* mine *ahem*) + require xhost-style security for all use... :^/ + 2003-07-07 Donal K. Fellows * generic/tkImage.c (TkDeleteAllImages,etc.): Stopped the deleting diff --git a/tests/send.test b/tests/send.test index a40eb98..6a10323 100644 --- a/tests/send.test +++ b/tests/send.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: send.test,v 1.8 2002/07/14 05:48:46 dgp Exp $ +# RCS: @(#) $Id: send.test,v 1.8.2.1 2003/07/09 21:12:52 dkf Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -156,7 +156,7 @@ test send-5.4 {ValidateName procedure} {secureserver testsend} { winfo interps } {test} -if {[testConstraint xhost]} { +if {[testConstraint nonPortable] && [testConstraint xhost]} { winfo interps tk appname tktest update @@ -171,12 +171,12 @@ test send-6.1 {ServerSecure procedure} {nonPortable secureserver} { set a 44 list [dobg [list send [tk appname] set a 55]] $a } {55 55} -test send-6.2 {ServerSecure procedure} {nonPortable secureserver} { +test send-6.2 {ServerSecure procedure} {nonPortable secureserver xhost} { set a 22 exec xhost [exec hostname] list [catch {dobg [list send [tk appname] set a 33]} msg] $a $msg } {0 22 {X server insecure (must use xauth-style authorization); command ignored}} -test send-6.3 {ServerSecure procedure} {nonPortable secureserver} { +test send-6.3 {ServerSecure procedure} {nonPortable secureserver xhost} { set a abc exec xhost - [exec hostname] list [dobg [list send [tk appname] set a new]] $a -- cgit v0.12 From c23f527d3060e379f4dc461df50d4181fadea10a Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 14 Jul 2003 22:59:34 +0000 Subject: Added missing .TP --- doc/photo.n | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/photo.n b/doc/photo.n index 7acf3fa..b8a0673 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -'\" RCS: @(#) $Id: photo.n,v 1.14 2003/01/19 07:50:58 hobbs Exp $ +'\" RCS: @(#) $Id: photo.n,v 1.14.2.1 2003/07/14 22:59:34 dkf Exp $ '\" .so man.macros .TH photo n 4.0 Tk "Tk Built-In Commands" @@ -320,6 +320,7 @@ the photo image. Several subcommands are available: \fIimageName \fBtransparency get \fIx y\fR Returns a boolean indicating if the pixel at (\fIx\fR,\fIy\fR) is transparent. +.TP \fIimageName \fBtransparency set \fIx y boolean\fR Makes the pixel at (\fIx\fR,\fIy\fR) transparent if \fIboolean\fR is true, and makes that pixel opaque otherwise. -- cgit v0.12 From 809c5a269834bf1dc30edbba8d1d813dfd56f08d Mon Sep 17 00:00:00 2001 From: vincentdarley Date: Tue, 15 Jul 2003 13:59:05 +0000 Subject: menu clone cleanup bug fix --- ChangeLog | 9 +++ generic/tkMenu.c | 198 +++++++++++++++++++++++++++++++++++---------------- generic/tkMenu.h | 22 +++--- generic/tkMenuDraw.c | 15 +++- tests/menu.test | 4 +- 5 files changed, 175 insertions(+), 73 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4377027..4c05741 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-07-15 Vince Darley + + * generic/tkMenu.c + * generic/tkMenu.h + * generic/tkMenuDraw.c: + * tests/menu.test: fixed complex bug in menu clone cleanup + [Bug#465324] and removed 'knownBug' from a test. + (This was applied to cvs head on 2003-05-03). + 2003-07-09 Donal K. Fellows * tests/send.test: Strengthened constraints to stop accidental diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 152e57f..3e4c54a 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenu.c,v 1.20 2003/02/26 02:32:56 hobbs Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.20.2.1 2003/07/15 13:59:06 vincentdarley Exp $ */ /* @@ -496,7 +496,9 @@ MenuCmd(clientData, interp, objc, objv) } /* - * Initialize the data structure for the menu. + * Initialize the data structure for the menu. Note that the + * menuPtr is eventually freed in 'TkMenuEventProc' in tkMenuDraw.c, + * when Tcl_EventuallyFree is called. */ menuPtr = (TkMenu *) ckalloc(sizeof(TkMenu)); @@ -1186,7 +1188,9 @@ DestroyMenuInstance(menuPtr) TkpDestroyMenu(menuPtr); cascadePtr = menuPtr->menuRefPtr->parentEntryPtr; menuPtr->menuRefPtr->menuPtr = NULL; - TkFreeMenuReferences(menuPtr->menuRefPtr); + if (TkFreeMenuReferences(menuPtr->menuRefPtr)) { + menuPtr->menuRefPtr = NULL; + } for (; cascadePtr != NULL; cascadePtr = nextCascadePtr) { nextCascadePtr = cascadePtr->nextCascadePtr; @@ -1252,6 +1256,11 @@ DestroyMenuInstance(menuPtr) TkMenuFreeDrawOptions(menuPtr); Tk_FreeConfigOptions((char *) menuPtr, menuPtr->optionTablesPtr->menuOptionTable, menuPtr->tkwin); + if (menuPtr->tkwin != NULL) { + Tk_Window tkwin = menuPtr->tkwin; + menuPtr->tkwin = NULL; + Tk_DestroyWindow(tkwin); + } } /* @@ -1285,6 +1294,8 @@ TkDestroyMenu(menuPtr) return; } + Tcl_Preserve(menuPtr); + /* * Now destroy all non-tearoff instances of this menu if this is a * parent menu. Is this loop safe enough? Are there going to be @@ -1292,30 +1303,38 @@ TkDestroyMenu(menuPtr) * we have to do a slightly more complex scheme. */ + menuPtr->menuFlags |= MENU_DELETION_PENDING; + if (menuPtr->menuRefPtr != NULL) { + /* + * If any toplevel widgets have this menu as their menubar, + * the geometry of the window may have to be recalculated. + */ + topLevelListPtr = menuPtr->menuRefPtr->topLevelListPtr; + while (topLevelListPtr != NULL) { + nextTopLevelPtr = topLevelListPtr->nextPtr; + TkpSetWindowMenuBar(topLevelListPtr->tkwin, NULL); + topLevelListPtr = nextTopLevelPtr; + } + } if (menuPtr->masterMenuPtr == menuPtr) { - menuPtr->menuFlags |= MENU_DELETION_PENDING; while (menuPtr->nextInstancePtr != NULL) { menuInstancePtr = menuPtr->nextInstancePtr; menuPtr->nextInstancePtr = menuInstancePtr->nextInstancePtr; if (menuInstancePtr->tkwin != NULL) { - Tk_DestroyWindow(menuInstancePtr->tkwin); + Tk_Window tkwin = menuInstancePtr->tkwin; + /* + * Note: it may be desirable to NULL out the tkwin + * field of menuInstancePtr here: + * menuInstancePtr->tkwin = NULL; + */ + Tk_DestroyWindow(tkwin); } } - menuPtr->menuFlags &= ~MENU_DELETION_PENDING; } - /* - * If any toplevel widgets have this menu as their menubar, - * the geometry of the window may have to be recalculated. - */ - - topLevelListPtr = menuPtr->menuRefPtr->topLevelListPtr; - while (topLevelListPtr != NULL) { - nextTopLevelPtr = topLevelListPtr->nextPtr; - TkpSetWindowMenuBar(topLevelListPtr->tkwin, NULL); - topLevelListPtr = nextTopLevelPtr; - } DestroyMenuInstance(menuPtr); + + Tcl_Release(menuPtr); } /* @@ -1326,6 +1345,10 @@ TkDestroyMenu(menuPtr) * This entry is removed from the list of entries that point to the * cascade menu. This is done in preparation for changing the menu * that this entry points to. + * + * At the end of this function, the menu entry no longer contains + * a reference to a 'TkMenuReferences' structure, and therefore + * no such structure contains a reference to this menu entry either. * * Results: * None @@ -1352,6 +1375,8 @@ UnhookCascadeEntry(mePtr) cascadeEntryPtr = menuRefPtr->parentEntryPtr; if (cascadeEntryPtr == NULL) { + TkFreeMenuReferences(menuRefPtr); + mePtr->childMenuRefPtr = NULL; return; } @@ -1370,6 +1395,10 @@ UnhookCascadeEntry(mePtr) */ menuRefPtr->parentEntryPtr = NULL; + /* + * The original field is set to zero below, after it is + * freed. + */ TkFreeMenuReferences(menuRefPtr); } else { menuRefPtr->parentEntryPtr = cascadeEntryPtr->nextCascadePtr; @@ -1388,6 +1417,7 @@ UnhookCascadeEntry(mePtr) break; } } + mePtr->nextCascadePtr = NULL; } mePtr->childMenuRefPtr = NULL; } @@ -1435,7 +1465,40 @@ DestroyMenuEntry(memPtr) */ if (mePtr->type == CASCADE_ENTRY) { - UnhookCascadeEntry(mePtr); + if (menuPtr->masterMenuPtr != menuPtr) { + TkMenu *destroyThis = NULL; + /* + * The menu as a whole is a clone. We must delete the clone + * of the cascaded menu for the particular entry we are + * destroying. + */ + TkMenuReferences *menuRefPtr = mePtr->childMenuRefPtr; + if (menuRefPtr != NULL) { + destroyThis = menuRefPtr->menuPtr; + /* + * But only if it is a clone. What can happen is that + * we are in the middle of deleting a menu and this + * menu pointer has already been reset to point to the + * original menu. In that case we have nothing special + * to do. + */ + if ((destroyThis != NULL) + && (destroyThis->masterMenuPtr == destroyThis)) { + destroyThis = NULL; + } + } + UnhookCascadeEntry(mePtr); + if (menuRefPtr != NULL) { + if (menuRefPtr->menuPtr == destroyThis) { + menuRefPtr->menuPtr = NULL; + } + if (destroyThis != NULL) { + TkDestroyMenu(destroyThis); + } + } + } else { + UnhookCascadeEntry(mePtr); + } } if (mePtr->image != NULL) { Tk_FreeImage(mePtr->image); @@ -2198,6 +2261,11 @@ MenuCmdDeletedProc(clientData) */ if (tkwin != NULL) { + /* + * Note: it may be desirable to NULL out the tkwin + * field of menuPtr here: + * menuPtr->tkwin = NULL; + */ Tk_DestroyWindow(tkwin); } } @@ -2935,6 +3003,13 @@ RecursivelyDeleteMenu(menuPtr) int i; TkMenuEntry *mePtr; + /* + * It is not 100% clear that this preserve/release pair is + * required, but we have added them for safety in this + * very complex code. + */ + Tcl_Preserve(menuPtr); + for (i = 0; i < menuPtr->numEntries; i++) { mePtr = menuPtr->entries[i]; if ((mePtr->type == CASCADE_ENTRY) @@ -2943,7 +3018,11 @@ RecursivelyDeleteMenu(menuPtr) RecursivelyDeleteMenu(mePtr->childMenuRefPtr->menuPtr); } } - Tk_DestroyWindow(menuPtr->tkwin); + if (menuPtr->tkwin != NULL) { + Tk_DestroyWindow(menuPtr->tkwin); + } + + Tcl_Release(menuPtr); } /* @@ -3095,18 +3174,14 @@ TkSetWindowMenuBar(interp, tkwin, oldMenuName, menuName) * that reference this menu. */ - for (topLevelListPtr = menuRefPtr->topLevelListPtr, - prevTopLevelPtr = NULL; - (topLevelListPtr != NULL) - && (topLevelListPtr->tkwin != tkwin); - prevTopLevelPtr = topLevelListPtr, - topLevelListPtr = topLevelListPtr->nextPtr) { - - /* - * Empty loop body. - */ - - } + topLevelListPtr = menuRefPtr->topLevelListPtr; + prevTopLevelPtr = NULL; + + while ((topLevelListPtr != NULL) + && (topLevelListPtr->tkwin != tkwin)) { + prevTopLevelPtr = topLevelListPtr; + topLevelListPtr = topLevelListPtr->nextPtr; + } /* * Now we have found the toplevel reference that matches the @@ -3377,7 +3452,8 @@ TkFindMenuReferencesObj(interp, objPtr) * is cleared. It cleans up the ref if it is now empty. * * Results: - * None. + * Returns 1 if the references structure was freed, and 0 + * otherwise. * * Side effects: * If this is the last field to be cleared, the menu ref is @@ -3386,7 +3462,7 @@ TkFindMenuReferencesObj(interp, objPtr) *---------------------------------------------------------------------- */ -void +int TkFreeMenuReferences(menuRefPtr) TkMenuReferences *menuRefPtr; /* The menu reference to * free */ @@ -3396,7 +3472,9 @@ TkFreeMenuReferences(menuRefPtr) && (menuRefPtr->topLevelListPtr == NULL)) { Tcl_DeleteHashEntry(menuRefPtr->hashEntryPtr); ckfree((char *) menuRefPtr); + return 1; } + return 0; } /* @@ -3453,28 +3531,28 @@ DeleteMenuCloneEntries(menuPtr, first, last) } } -/* - *---------------------------------------------------------------------- - * - * TkMenuCleanup -- - * - * Resets menusInitialized to allow Tk to be finalized and reused - * without the DLL being unloaded. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static void -TkMenuCleanup(ClientData unused) -{ - menusInitialized = 0; -} +/* + *---------------------------------------------------------------------- + * + * TkMenuCleanup -- + * + * Resets menusInitialized to allow Tk to be finalized and reused + * without the DLL being unloaded. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +TkMenuCleanup(ClientData unused) +{ + menusInitialized = 0; +} /* *---------------------------------------------------------------------- @@ -3498,17 +3576,17 @@ TkMenuInit() { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - + if (!menusInitialized) { Tcl_MutexLock(&menuMutex); if (!menusInitialized) { TkpMenuInit(); menusInitialized = 1; } - /* - * Make sure we cleanup on finalize. - */ - Tcl_CreateExitHandler((Tcl_ExitProc *) TkMenuCleanup, NULL); + /* + * Make sure we cleanup on finalize. + */ + Tcl_CreateExitHandler((Tcl_ExitProc *) TkMenuCleanup, NULL); Tcl_MutexUnlock(&menuMutex); } if (!tsdPtr->menusInitialized) { diff --git a/generic/tkMenu.h b/generic/tkMenu.h index 9553bc0..f007bce 100644 --- a/generic/tkMenu.h +++ b/generic/tkMenu.h @@ -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: tkMenu.h,v 1.6 2001/10/12 13:30:31 tmh Exp $ + * RCS: @(#) $Id: tkMenu.h,v 1.6.4.1 2003/07/15 13:59:06 vincentdarley Exp $ */ #ifndef _TKMENU @@ -451,17 +451,21 @@ typedef struct TkMenuOptionTables { * RESIZE_PENDING: Non-zero means a call to ComputeMenuGeometry * has already been scheduled. * MENU_DELETION_PENDING Non-zero means that we are currently destroying - * this menu. This is useful when we are in the - * middle of cleaning this master menu's chain of - * menus up when TkDestroyMenu was called again on - * this menu (via a destroy binding or somesuch). + * this menu's internal structures. This is useful + * when we are in the middle of cleaning + * this master menu's chain of menus up when + * TkDestroyMenu was called again on this + * menu (via a destroy binding or somesuch). + * MENU_WIN_DESTRUCTION_PENDING Non-zero means we are in the middle of + * destroying this menu's Tk_Window. * MENU_PLATFORM_FLAG1... Reserved for use by the platform-specific menu * code. */ -#define REDRAW_PENDING 1 -#define RESIZE_PENDING 2 -#define MENU_DELETION_PENDING 4 +#define REDRAW_PENDING 1 +#define RESIZE_PENDING 2 +#define MENU_DELETION_PENDING 4 +#define MENU_WIN_DESTRUCTION_PENDING 8 #define MENU_PLATFORM_FLAG1 (1 << 30) #define MENU_PLATFORM_FLAG2 (1 << 29) #define MENU_PLATFORM_FLAG3 (1 << 28) @@ -511,7 +515,7 @@ EXTERN TkMenuReferences * EXTERN TkMenuReferences * TkFindMenuReferencesObj _ANSI_ARGS_(( Tcl_Interp *interp, Tcl_Obj *namePtr)); -EXTERN void TkFreeMenuReferences _ANSI_ARGS_(( +EXTERN int TkFreeMenuReferences _ANSI_ARGS_(( TkMenuReferences *menuRefPtr)); EXTERN Tcl_HashTable * TkGetMenuHashTable _ANSI_ARGS_((Tcl_Interp *interp)); EXTERN int TkGetMenuIndex _ANSI_ARGS_((Tcl_Interp *interp, diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 42cdf43..ee1e89e 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenuDraw.c,v 1.3 1999/04/16 01:51:19 stanton Exp $ + * RCS: @(#) $Id: tkMenuDraw.c,v 1.3.20.1 2003/07/15 13:59:06 vincentdarley Exp $ */ #include "tkMenu.h" @@ -769,15 +769,26 @@ TkMenuEventProc(clientData, eventPtr) } } else if (eventPtr->type == DestroyNotify) { if (menuPtr->tkwin != NULL) { - TkDestroyMenu(menuPtr); + if (!(menuPtr->menuFlags & MENU_DELETION_PENDING)) { + TkDestroyMenu(menuPtr); + } menuPtr->tkwin = NULL; + } + if (menuPtr->menuFlags & MENU_WIN_DESTRUCTION_PENDING) { + return; + } + menuPtr->menuFlags |= MENU_WIN_DESTRUCTION_PENDING; + if (menuPtr->widgetCmd != NULL) { Tcl_DeleteCommandFromToken(menuPtr->interp, menuPtr->widgetCmd); + menuPtr->widgetCmd = NULL; } if (menuPtr->menuFlags & REDRAW_PENDING) { Tcl_CancelIdleCall(DisplayMenu, (ClientData) menuPtr); + menuPtr->menuFlags &= ~REDRAW_PENDING; } if (menuPtr->menuFlags & RESIZE_PENDING) { Tcl_CancelIdleCall(ComputeMenuGeometry, (ClientData) menuPtr); + menuPtr->menuFlags &= ~RESIZE_PENDING; } Tcl_EventuallyFree((ClientData) menuPtr, TCL_DYNAMIC); } diff --git a/tests/menu.test b/tests/menu.test index a9652bf..ed60a38 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: menu.test,v 1.13 2002/07/14 05:48:46 dgp Exp $ +# RCS: @(#) $Id: menu.test,v 1.13.2.1 2003/07/15 13:59:06 vincentdarley Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -2423,7 +2423,7 @@ test menu-32.7 {DeleteMenuCloneEntries - one entry} { .m1 add command -label Hello list [catch {.m1 delete Hello} msg] $msg [destroy .m1] } {0 {} {}} -test menu-32.8 {Ensure all menu clone commands are deleted} {knownBug} { +test menu-32.8 {Ensure all menu clone commands are deleted} { # SF bug #465324 catch {destroy .menubar} catch {destroy .menubar.test} -- cgit v0.12 From 490ac12f3b7835925c08b27a647984be84ecfee2 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 15 Jul 2003 22:46:34 +0000 Subject: * README: Bumped patchlevel to 8.4.4 in preparation * generic/tk.h: for the Tk 8.4.4 release. * macosx/Wish.pbproj/project.pbxproj: * unix/configure.in: * unix/tk.spec: * win/configure.in: * unix/configure: autoconf (2.13) * win/configure: --- ChangeLog | 12 ++++++++++++ README | 4 ++-- generic/tk.h | 6 +++--- macosx/Wish.pbproj/project.pbxproj | 8 ++++---- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tk.spec | 6 +++--- win/configure | 2 +- win/configure.in | 4 ++-- 9 files changed, 30 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c05741..f4cee02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2003-07-15 Don Porter + + * README: Bumped patchlevel to 8.4.4 in preparation + * generic/tk.h: for the Tk 8.4.4 release. + * macosx/Wish.pbproj/project.pbxproj: + * unix/configure.in: + * unix/tk.spec: + * win/configure.in: + + * unix/configure: autoconf (2.13) + * win/configure: + 2003-07-15 Vince Darley * generic/tkMenu.c diff --git a/README b/README index 8e34d1f..e4b71de 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.4.3 source distribution. + This is the Tk 8.4.4 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.39.2.1 2003/05/15 19:04:53 hobbs Exp $ +RCS: @(#) $Id: README,v 1.39.2.2 2003/07/15 22:46:34 dgp Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index fb45eb1..907fbeb 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74.2.1 2003/05/15 19:04:53 hobbs Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.2 2003/07/15 22:46:35 dgp Exp $ */ #ifndef _TK @@ -50,10 +50,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 4 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 3 +#define TK_RELEASE_SERIAL 4 #define TK_VERSION "8.4" -#define TK_PATCH_LEVEL "8.4.3" +#define TK_PATCH_LEVEL "8.4.4" /* * The following definitions set up the proper options for Macintosh diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 4646ee1..6520d0f 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1562,11 +1562,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType FMWK CFBundleShortVersionString - 8.4.3 + 8.4.4 CFBundleSignature WiSH CFBundleVersion - 8.4.3 + 8.4.4 "; @@ -2941,11 +2941,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType APPL CFBundleShortVersionString - 8.4.3 + 8.4.4 CFBundleSignature WiSH CFBundleVersion - 8.4.3 + 8.4.4 "; diff --git a/unix/configure b/unix/configure index 8248dfc..c88e410 100755 --- a/unix/configure +++ b/unix/configure @@ -547,7 +547,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".3" +TK_PATCH_LEVEL=".4" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/configure.in b/unix/configure.in index e3571d2..c189fba 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.1 2003/05/15 19:04:54 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.2 2003/07/15 22:46:35 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".3" +TK_PATCH_LEVEL=".4" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/tk.spec b/unix/tk.spec index b53aca9..f2736e5 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.15.2.1 2003/05/15 19:04:54 hobbs Exp $ +# $Id: tk.spec,v 1.15.2.2 2003/07/15 22:46:35 dgp Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.4.3 +%define version 8.4.4 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: http://www.tcl.tk/ Packager: Carina Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.3 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.4 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure b/win/configure index cd1bb85..a96f760 100755 --- a/win/configure +++ b/win/configure @@ -536,7 +536,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".3" +TK_PATCH_LEVEL=".4" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index 620a042..f18717b 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.3 2003/05/15 19:04:55 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.4 2003/07/15 22:46:35 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".3" +TK_PATCH_LEVEL=".4" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From a3adb9336dab770f2641c314cd159bf23aee6882 Mon Sep 17 00:00:00 2001 From: mdejong Date: Wed, 16 Jul 2003 01:20:12 +0000 Subject: * unix/tkUnixEvent.c (TkpCloseDisplay): Don't test for XCloseIM bug when the XFree86 version is newer than 4.0 since the layout of the XIM structure has changed. The check is not needed for newer XFree86 releases since the bug we are checking for was fixed in the 4.2.99.2 release. [Bug 755530] --- ChangeLog | 10 ++++++++++ unix/tkUnixEvent.c | 50 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4cee02..c177340 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-07-15 Mo DeJong + + * unix/tkUnixEvent.c (TkpCloseDisplay): Don't + test for XCloseIM bug when the XFree86 version + is newer than 4.0 since the layout of the + XIM structure has changed. The check is not + needed for newer XFree86 releases since + the bug we are checking for was fixed in + the 4.2.99.2 release. [Bug 755530] + 2003-07-15 Don Porter * README: Bumped patchlevel to 8.4.4 in preparation diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index eeaa481..8fa56d1 100644 --- a/unix/tkUnixEvent.c +++ b/unix/tkUnixEvent.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixEvent.c,v 1.11 2003/01/10 20:23:17 jenglish Exp $ + * RCS: @(#) $Id: tkUnixEvent.c,v 1.11.2.1 2003/07/16 01:20:13 mdejong Exp $ */ #include "tkInt.h" @@ -29,7 +29,7 @@ static Tcl_ThreadDataKey dataKey; #if defined(TK_USE_INPUT_METHODS) && defined(PEEK_XCLOSEIM) /* * Structure used to peek into internal XIM data structure. - * Enabled only on systems where we are sure it works. + * This is only known to work with XFree86. */ struct XIMPeek { void *junk1, *junk2; @@ -185,17 +185,47 @@ TkpCloseDisplay(dispPtr) #endif if (dispPtr->inputMethod) { /* - * This caused core dumps on some systems (Solaris 2.3 1/6/95). - * The most likely cause of this is a bug in X that accesses - * memory that was already deallocated inside XCloseIM(). - * One can work around this issue by making sure a XDestroyIC() - * gets invoked for each XCreateIC(). + * Calling XCloseIM with an input context that has not + * been freed can cause a crash. This crash has been + * reproduced under Linux systems with XFree86 3.3 + * and may have also been seen under Solaris 2.3. + * The crash is caused by a double free of memory + * inside the X library. Memory that was already + * deallocated may be accessed again inside XCloseIM. + * This bug can be avoided by making sure that a + * call to XDestroyIC is made for each XCreateIC call. + * This bug has been fixed in XFree86 4.2.99.2. + * The internal layout of the XIM structure changed + * in the XFree86 4.2 release so the test should + * not be run for with these new releases. */ #if defined(TK_USE_INPUT_METHODS) && defined(PEEK_XCLOSEIM) - struct XIMPeek *peek = (struct XIMPeek *) dispPtr->inputMethod; - if (peek->ic_chain != NULL) - panic("input contexts not freed before XCloseIM"); + int do_peek = 0; + struct XIMPeek *peek; + + if (strstr(ServerVendor(dispPtr->display), "XFree86")) { + int vendrel = VendorRelease(dispPtr->display); + if (vendrel < 336) { + /* 3.3.4 and 3.3.5 */ + do_peek = 1; + } else if (vendrel < 3900) { + /* Other 3.3.x versions */ + do_peek = 1; + } else if (vendrel < 40000000) { + /* 4.0.x versions */ + do_peek = 1; + } else { + /* Newer than 4.0 */ + do_peek = 0; + } + } + + if (do_peek) { + peek = (struct XIMPeek *) dispPtr->inputMethod; + if (peek->ic_chain != NULL) + panic("input contexts not freed before XCloseIM"); + } #endif XCloseIM(dispPtr->inputMethod); } -- cgit v0.12 From aa5738dd765124fc5c414ef6e0a7cded389065f6 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 16 Jul 2003 22:54:26 +0000 Subject: * generic/tkWindow.c (Initialize): do not free uninit'ed dstring. [Bug 755906] (mistachkin) --- ChangeLog | 5 +++++ generic/tkWindow.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c177340..20c07a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-16 Jeff Hobbs + + * generic/tkWindow.c (Initialize): do not free uninit'ed dstring. + [Bug 755906] (mistachkin) + 2003-07-15 Mo DeJong * unix/tkUnixEvent.c (TkpCloseDisplay): Don't diff --git a/generic/tkWindow.c b/generic/tkWindow.c index c1e6499..4fc47fd 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.56 2003/01/28 20:39:17 jenglish Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.56.2.1 2003/07/16 22:54:26 hobbs Exp $ */ #include "tkPort.h" @@ -2953,7 +2953,6 @@ Initialize(interp) while (1) { master = Tcl_GetMaster(master); if (master == NULL) { - Tcl_DStringFree(&ds); Tcl_AppendResult(interp, "NULL master", (char *) NULL); Tcl_MutexUnlock(&windowMutex); return TCL_ERROR; -- cgit v0.12 From ba154f21db39f6326e1369e93778cad9c1d02385 Mon Sep 17 00:00:00 2001 From: pspjuth Date: Wed, 16 Jul 2003 23:17:36 +0000 Subject: Make sure all options can be set to their default value. [Bug #697652] --- ChangeLog | 6 ++++++ generic/tkFrame.c | 7 +++++-- tests/frame.test | 33 +++++++++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20c07a4..9844410 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-17 Peter Spjuth + + * tests/frame.test: + * generic/tkFrame.c (CreateFrame): Make sure all options can be set + to their default value. [Bug #697652] + 2003-07-16 Jeff Hobbs * generic/tkWindow.c (Initialize): do not free uninit'ed dstring. diff --git a/generic/tkFrame.c b/generic/tkFrame.c index f4f0a53..6be4c48 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFrame.c,v 1.15 2003/01/22 14:32:59 dkf Exp $ + * RCS: @(#) $Id: tkFrame.c,v 1.15.2.1 2003/07/16 23:17:38 pspjuth Exp $ */ #include "default.h" @@ -594,7 +594,7 @@ CreateFrame(clientData, interp, objc, objv, type, appName) if (useOption == NULL) { useOption = Tk_GetOption(new, "use", "Use"); } - if (useOption != NULL) { + if ((useOption != NULL) && (*useOption != 0)) { if (TkpUseWindow(interp, new, useOption) != TCL_OK) { goto error; } @@ -605,6 +605,9 @@ CreateFrame(clientData, interp, objc, objv, type, appName) if (colormapName == NULL) { colormapName = Tk_GetOption(new, "colormap", "Colormap"); } + if ((colormapName != NULL) && (*colormapName == 0)) { + colormapName = NULL; + } if (visualName != NULL) { visual = Tk_GetVisual(interp, new, visualName, &depth, (colormapName == NULL) ? &colormap : (Colormap *) NULL); diff --git a/tests/frame.test b/tests/frame.test index 4acd84b..e1e1e85 100644 --- a/tests/frame.test +++ b/tests/frame.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: frame.test,v 1.7 2002/07/14 05:48:46 dgp Exp $ +# RCS: @(#) $Id: frame.test,v 1.7.2.1 2003/07/16 23:17:39 pspjuth Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -89,8 +89,21 @@ test frame-1.7 {frame configuration options} { destroy .f set result } {1 {can't modify -container option after widget is created}} +test frame-1.8 {frame configuration options} { + # Make sure all options can be set to the default value + frame .f + set opts {} + foreach opt [.f configure] { + if {[llength $opt] == 5} { + lappend opts [lindex $opt 0] [lindex $opt 4] + } + } + eval frame .g $opts + destroy .f .g +} {} + frame .f -set i 8 +set i 9 foreach test { {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} @@ -141,7 +154,7 @@ test frame-2.2 {toplevel configuration options} { } {{-colormap colormap Colormap {} new} 1 {can't modify -colormap option after widget is created}} test frame-2.3 {toplevel configuration options} { catch {destroy .t} - toplevel .t -width 200 -height 100 + toplevel .t -width 200 -height 100 -colormap {} -use {} wm geometry .t +0+0 list [catch {.t configure -container 1} msg] $msg [.t configure -container] } {1 {can't modify -container option after widget is created} {-container container Container 0 0}} @@ -189,12 +202,24 @@ test frame-2.10 {toplevel configuration options} { destroy .t .x set result } {1 {A window cannot have both the -use and the -container option set.}} +test frame-2.11 {toplevel configuration options} { + # Make sure all options can be set to the default value + toplevel .f + set opts {} + foreach opt [.f configure] { + if {[llength $opt] == 5} { + lappend opts [lindex $opt 0] [lindex $opt 4] + } + } + eval toplevel .g $opts + destroy .f .g +} {} catch {destroy .t} toplevel .t -width 300 -height 150 wm geometry .t +0+0 update -set i 11 +set i 12 foreach test { {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} -- cgit v0.12 From f3065b5641a236c48af7dcdcf8e138b72356de98 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 17 Jul 2003 00:37:03 +0000 Subject: * generic/tkPanedWindow.c (ArrangePanes): Ensure that the last pane * tests/panedwindow.test: shrinks instead of being clipped when resized below the reqsize. [Bug 748277] (spjuth) --- ChangeLog | 4 ++++ generic/tkPanedWindow.c | 12 +++++++++--- tests/panedwindow.test | 25 +++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9844410..de64aff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ 2003-07-16 Jeff Hobbs + * generic/tkPanedWindow.c (ArrangePanes): Ensure that the last pane + * tests/panedwindow.test: shrinks instead of being clipped when + resized below the reqsize. [Bug 748277] (spjuth) + * generic/tkWindow.c (Initialize): do not free uninit'ed dstring. [Bug 755906] (mistachkin) diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index a096c75..60b938a 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.13 2003/02/21 11:48:54 dkf Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.1 2003/07/17 00:37:03 hobbs Exp $ */ #include "tkPort.h" @@ -1636,9 +1636,12 @@ ArrangePanes(clientData) if (pwPtr->orient == ORIENT_HORIZONTAL) { paneWidth = slavePtr->paneWidth; if (i == pwPtr->numSlaves - 1 && Tk_IsMapped(pwPtr->tkwin)) { - if (Tk_Width(pwPtr->tkwin) > Tk_ReqWidth(pwPtr->tkwin)) { + if (Tk_Width(pwPtr->tkwin) != Tk_ReqWidth(pwPtr->tkwin)) { paneWidth += Tk_Width(pwPtr->tkwin) - Tk_ReqWidth(pwPtr->tkwin); + if (paneWidth < 0) { + paneWidth = 0; + } } } paneHeight = Tk_Height(pwPtr->tkwin) - (2 * slavePtr->pady) - @@ -1646,9 +1649,12 @@ ArrangePanes(clientData) } else { paneHeight = slavePtr->paneHeight; if (i == pwPtr->numSlaves - 1 && Tk_IsMapped(pwPtr->tkwin)) { - if (Tk_Height(pwPtr->tkwin) > Tk_ReqHeight(pwPtr->tkwin)) { + if (Tk_Height(pwPtr->tkwin) != Tk_ReqHeight(pwPtr->tkwin)) { paneHeight += Tk_Height(pwPtr->tkwin) - Tk_ReqHeight(pwPtr->tkwin); + if (paneHeight < 0) { + paneHeight = 0; + } } } paneWidth = Tk_Width(pwPtr->tkwin) - (2 * slavePtr->padx) - diff --git a/tests/panedwindow.test b/tests/panedwindow.test index e073d4a..67a695d 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: panedwindow.test,v 1.8 2003/02/21 11:48:56 dkf Exp $ +# RCS: @(#) $Id: panedwindow.test,v 1.8.2.1 2003/07/17 00:37:03 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -1874,7 +1874,28 @@ test panedwindow-22.11 {ArrangePanes, panes with width <= 0 are unmapped} { destroy .p .p.f1 .p.f2 set result } {1 0} - +test panedwindow-22.12 {ArrangePanes, last pane shrinks} { + panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 + .p add [frame .f1 -width 20 -height 20 -bg blue] \ + [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + place .p -width 40 -x 0 -y 0 + update + set result [winfo width .f2] + destroy .p .f1 .f2 + set result +} 18 +test panedwindow-22.13 {ArrangePanes, last pane shrinks} { + panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ + -orient vertical + .p add [frame .f1 -width 20 -height 20 -bg blue] \ + [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + place .p -height 40 -x 0 -y 0 + update + set result [winfo height .f2] + destroy .p .f1 .f2 + set result +} 18 + test panedwindow-23.1 {PanedWindowReqProc, react to slave geometry changes} { # Basically just want to make sure that the PanedWindowReqProc is called panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 2 -- cgit v0.12 From 3590129389e4d87590157122693d4ad89cdadc41 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 17 Jul 2003 01:02:47 +0000 Subject: * win/tkWinImage.c (XGetImage): correct init of biSizeImage in bitmap header. [Bug 703697] (cap) --- ChangeLog | 5 +++++ win/tkWinImage.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index de64aff..b2976e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-16 Jeff Hobbs + + * win/tkWinImage.c (XGetImage): correct init of biSizeImage in + bitmap header. [Bug 703697] (cap) + 2003-07-17 Peter Spjuth * tests/frame.test: diff --git a/win/tkWinImage.c b/win/tkWinImage.c index 7ba9329..bb20a88 100644 --- a/win/tkWinImage.c +++ b/win/tkWinImage.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: tkWinImage.c,v 1.6 2002/10/10 21:01:18 hobbs Exp $ + * RCS: @(#) $Id: tkWinImage.c,v 1.6.2.1 2003/07/17 01:02:47 hobbs Exp $ */ #include "tkWinInt.h" @@ -621,7 +621,7 @@ XGetImage(display, d, x, y, width, height, plane_mask, format) infoPtr->bmiHeader.biPlanes = 1; infoPtr->bmiHeader.biBitCount = 1; infoPtr->bmiHeader.biCompression = BI_RGB; - infoPtr->bmiHeader.biCompression = 0; + infoPtr->bmiHeader.biSizeImage = 0; infoPtr->bmiHeader.biXPelsPerMeter = 0; infoPtr->bmiHeader.biYPelsPerMeter = 0; infoPtr->bmiHeader.biClrUsed = 0; -- cgit v0.12 From 1e153f3dbf586557f291abfb9068871b58c67382 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 17 Jul 2003 03:17:07 +0000 Subject: * generic/tkPack.c (ConfigureSlaves): silence compiler warning [Bug 771982] --- ChangeLog | 5 +++++ generic/tkPack.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2976e7..33b9848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-16 Don Porter + + * generic/tkPack.c (ConfigureSlaves): silence compiler warning + [Bug 771982] + 2003-07-16 Jeff Hobbs * win/tkWinImage.c (XGetImage): correct init of biSizeImage in diff --git a/generic/tkPack.c b/generic/tkPack.c index 607af25..5ea54cc 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPack.c,v 1.16 2002/06/14 22:25:12 jenglish Exp $ + * RCS: @(#) $Id: tkPack.c,v 1.16.2.1 2003/07/17 03:17:08 dgp Exp $ */ #include "tkPort.h" @@ -1743,7 +1743,7 @@ ConfigureSlaves(interp, tkwin, objc, objv) TCL_EXACT, &side) != TCL_OK) { return TCL_ERROR; } - slavePtr->side = side; + slavePtr->side = (Side) side; } } -- cgit v0.12 From e4f1f83a7bade235b9bf9b51ef349ce33ccf2b5c Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2003 09:58:13 +0000 Subject: I prefer direct return from switch processing; simpler to understand. Also resolves [Bug 771988] since the breaks are "wrong" in that style. --- ChangeLog | 7 +++++++ generic/tkImgPhoto.c | 35 ++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33b9848..4baff2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-07-17 Donal K. Fellows + + * generic/tkImgPhoto.c (ImgPhotoCmd): Rewrote subcommand processing + to never jump to the end of the switch. I find that confusing as + I can't see whether there's processing still to be done from a + quick glance at the code, unlike with a direct return. [Bug 771988] + 2003-07-16 Don Porter * generic/tkPack.c (ConfigureSlaves): silence compiler warning diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 8379f1d..4153648 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -16,7 +16,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.36 2002/10/18 00:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.1 2003/07/17 09:58:14 dkf Exp $ */ #include "tkInt.h" @@ -686,11 +686,11 @@ ImgPhotoCmd(clientData, interp, objc, objv) if (objc == 2) { Tk_PhotoBlank(masterPtr); + return TCL_OK; } else { Tcl_WrongNumArgs(interp, 2, objv, (char *) NULL); return TCL_ERROR; } - break; case PHOTO_CGET: { char *arg; @@ -704,17 +704,15 @@ ImgPhotoCmd(clientData, interp, objc, objv) if (masterPtr->dataString) { Tcl_SetObjResult(interp, masterPtr->dataString); } - return TCL_OK; - } - if (strncmp(arg,"-format", length) == 0) { + } else if (strncmp(arg,"-format", length) == 0) { if (masterPtr->format) { Tcl_SetObjResult(interp, masterPtr->format); } - return TCL_OK; + } else { + Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs, + (char *) masterPtr, Tcl_GetString(objv[2]), 0); } - Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs, - (char *) masterPtr, Tcl_GetString(objv[2]), 0); - break; + return TCL_OK; } case PHOTO_CONFIGURE: @@ -882,8 +880,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) options.toY2 - options.toY, options.zoomX, options.zoomY, options.subsampleX, options.subsampleY, options.compositingRule); - - break; + return TCL_OK; case PHOTO_DATA: { char *data; @@ -968,7 +965,6 @@ ImgPhotoCmd(clientData, interp, objc, objv) ckfree(data); } return result; - break; } case PHOTO_GET: { @@ -1001,7 +997,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) sprintf(string, "%d %d %d", pixelPtr[0], pixelPtr[1], pixelPtr[2]); Tcl_AppendResult(interp, string, (char *) NULL); - break; + return TCL_OK; } case PHOTO_PUT: @@ -1129,7 +1125,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) options.toX, options.toY, options.toX2 - options.toX, options.toY2 - options.toY, TK_PHOTO_COMPOSITE_SET); ckfree((char *) block.pixelPtr); - break; + return TCL_OK; case PHOTO_READ: { Tcl_Obj *format; @@ -1240,7 +1236,6 @@ ImgPhotoCmd(clientData, interp, objc, objv) Tcl_Close(NULL, chan); } return result; - break; } case PHOTO_REDITHER: @@ -1276,7 +1271,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) (masterPtr->width - x), (masterPtr->height - y), masterPtr->width, masterPtr->height); } - break; + return TCL_OK; case PHOTO_TRANS: { static CONST char *photoTransOptions[] = { @@ -1391,10 +1386,11 @@ ImgPhotoCmd(clientData, interp, objc, objv) Tk_ImageChanged(masterPtr->tkMaster, x, y, 1, 1, masterPtr->width, masterPtr->height); masterPtr->flags &= ~IMAGE_CHANGED; + return TCL_OK; } - } - return TCL_OK; + + panic("unexpected fallthrough"); } case PHOTO_WRITE: { @@ -1516,7 +1512,8 @@ ImgPhotoCmd(clientData, interp, objc, objv) } } - return TCL_OK; + panic("unexpected fallthrough"); + return TCL_ERROR; /* NOT REACHED */ } /* -- cgit v0.12 From 6975412d3b85ae353784b46da6204b629cd07b5d Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2003 13:05:52 +0000 Subject: Try harder to avoid zero-length mallocs()... [Bug 404421] --- ChangeLog | 2 ++ generic/tkImgPhoto.c | 63 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4baff2a..2d31bc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ to never jump to the end of the switch. I find that confusing as I can't see whether there's processing still to be done from a quick glance at the code, unlike with a direct return. [Bug 771988] + (ImgPhotoCmd, ImgPhotoSetSize, ImgPhotoInstanceSetSize): Try harder + to avoid zero-length mallocs()... [Bug 404421] 2003-07-16 Don Porter diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 4153648..b0ea9d8 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -16,7 +16,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.1 2003/07/17 09:58:14 dkf Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.2 2003/07/17 13:05:53 dkf Exp $ */ #include "tkInt.h" @@ -1067,6 +1067,12 @@ ImgPhotoCmd(clientData, interp, objc, objv) break; } if (y == 0) { + if (listArgc == 0) { + /* + * Lines must be non-empty... + */ + break; + } dataWidth = listArgc; pixelPtr = (unsigned char *) ckalloc((unsigned) dataWidth * dataHeight * 3); @@ -2663,13 +2669,16 @@ ImgPhotoSetSize(masterPtr, width, height) */ unsigned /*long*/ newPixSize = (unsigned /*long*/) (height * pitch); - newPix32 = (unsigned char *) attemptckalloc(newPixSize); /* - * The result could validly be NULL if the number of bytes - * requested was 0. [Bug 619544] + * Some mallocs() really hate allocating zero bytes. [Bug 619544] */ - if (newPix32 == NULL && newPixSize != 0) { - return TCL_ERROR; + if (newPixSize == 0) { + newPix32 = NULL; + } else { + newPix32 = (unsigned char *) attemptckalloc(newPixSize); + if (newPix32 == NULL) { + return TCL_ERROR; + } } } @@ -2867,30 +2876,34 @@ ImgPhotoInstanceSetSize(instancePtr) || (instancePtr->height != masterPtr->height) || (instancePtr->error == NULL)) { - newError = (schar *) ckalloc((unsigned) - (masterPtr->height * masterPtr->width * 3 * sizeof(schar))); + if (masterPtr->height > 0 && masterPtr->width > 0) { + newError = (schar *) ckalloc((unsigned) + masterPtr->height * masterPtr->width * 3 * sizeof(schar)); - /* - * Zero the new array so that we don't get bogus error values - * propagating into areas we dither later. - */ + /* + * Zero the new array so that we don't get bogus error + * values propagating into areas we dither later. + */ - if ((instancePtr->error != NULL) - && ((instancePtr->width == masterPtr->width) - || (validBox.width == masterPtr->width))) { - if (validBox.y > 0) { + if ((instancePtr->error != NULL) + && ((instancePtr->width == masterPtr->width) + || (validBox.width == masterPtr->width))) { + if (validBox.y > 0) { + memset((VOID *) newError, 0, (size_t) + validBox.y * masterPtr->width * 3 * sizeof(schar)); + } + h = validBox.y + validBox.height; + if (h < masterPtr->height) { + memset((VOID *) (newError + h * masterPtr->width * 3), 0, + (size_t) (masterPtr->height - h) + * masterPtr->width * 3 * sizeof(schar)); + } + } else { memset((VOID *) newError, 0, (size_t) - (validBox.y * masterPtr->width * 3 * sizeof(schar))); - } - h = validBox.y + validBox.height; - if (h < masterPtr->height) { - memset((VOID *) (newError + h * masterPtr->width * 3), 0, - (size_t) ((masterPtr->height - h) - * masterPtr->width * 3 * sizeof(schar))); + masterPtr->height * masterPtr->width * 3 * sizeof(schar)); } } else { - memset((VOID *) newError, 0, (size_t) - (masterPtr->height * masterPtr->width * 3 * sizeof(schar))); + newError = NULL; } if (instancePtr->error != NULL) { -- cgit v0.12 From 6eb4883088184b907621ae022deee1bc9f6bbb14 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2003 20:48:59 +0000 Subject: Panedwindow fixes that make things behave right in complex geometry cases. [Bugs 738143+747814] --- ChangeLog | 7 +++++++ doc/panedwindow.n | 8 ++------ generic/tkPanedWindow.c | 13 ++++++++++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d31bc2..d630555 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2003-07-17 Donal K. Fellows + * generic/tkPanedWindow.c (PanedWindowReqProc): Fix from Eric + Boudaillier so panedwindows get their geometry right even when + their children don't know their size initially. [Bug 738143] + * doc/panedwindow.n: Removed sentences about the use of [update + idletasks] with this command, as that is no longer necessary with + the fix from Bug 738143. [Bug 747814] + * generic/tkImgPhoto.c (ImgPhotoCmd): Rewrote subcommand processing to never jump to the end of the switch. I find that confusing as I can't see whether there's processing still to be done from a diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 5f2399c..20e43cf 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: panedwindow.n,v 1.2 2003/02/25 01:39:01 hobbs Exp $ +'\" RCS: @(#) $Id: panedwindow.n,v 1.2.2.1 2003/07/17 20:49:00 dkf Exp $ '\" .so man.macros .TH panedwindow n 8.4 Tk "Tk Built-In Commands" @@ -83,11 +83,7 @@ Add one or more windows to the panedwindow, each in a separate pane. The arguments consist of the names of one or more windows followed by pairs of arguments that specify how to manage the windows. \fIOption\fR may have any of the values accepted by the -\fBconfigure\fR subcommand. When adding a new window that has not yet -been mapped, and \fBupdate idletasks\fR call is required for that window -to report its default requested geometry correctly to the panedwindow -widget. This is not necessary if you are specifying \fI\-width\fR and -\fI\-height\fR. +\fBconfigure\fR subcommand. .TP \fIpathName \fBcget \fIoption\fR Returns the current value of the configuration option given by diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 60b938a..9763487 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.1 2003/07/17 00:37:03 hobbs Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.2 2003/07/17 20:49:00 dkf Exp $ */ #include "tkPort.h" @@ -1518,14 +1518,21 @@ PanedWindowReqProc(clientData, tkwin) Tk_Window tkwin; /* Other Tk-related information * about the window. */ { - Slave *panePtr = (Slave *) clientData; - PanedWindow *pwPtr = (PanedWindow *) (panePtr->masterPtr); + Slave *slavePtr = (Slave *) clientData; + PanedWindow *pwPtr = (PanedWindow *) (slavePtr->masterPtr); if (Tk_IsMapped(pwPtr->tkwin)) { if (!(pwPtr->flags & RESIZE_PENDING)) { pwPtr->flags |= RESIZE_PENDING; Tcl_DoWhenIdle(ArrangePanes, (ClientData) pwPtr); } } else { + int doubleBw = 2 * Tk_Changes(slavePtr->tkwin)->border_width; + if (slavePtr->width <= 0) { + slavePtr->paneWidth = Tk_ReqWidth(slavePtr->tkwin) + doubleBw; + } + if (slavePtr->height <= 0) { + slavePtr->paneHeight = Tk_ReqHeight(slavePtr->tkwin) + doubleBw; + } ComputeGeometry(pwPtr); } } -- cgit v0.12 From 32d31762b7a1cb4fc118e3f0a437f307672285d0 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2003 22:53:09 +0000 Subject: Better docs of [$photo put]. [Bug 728952] --- ChangeLog | 4 ++++ doc/photo.n | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d630555..b458af4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2003-07-17 Donal K. Fellows + * doc/photo.n: [$photo put] has been able to take rectangles of + pixel colours, specified as lists of lists, for years. Now this + is a documented feature. [Bug 728952] + * generic/tkPanedWindow.c (PanedWindowReqProc): Fix from Eric Boudaillier so panedwindows get their geometry right even when their children don't know their size initially. [Bug 738143] diff --git a/doc/photo.n b/doc/photo.n index b8a0673..ef04d7a 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -'\" RCS: @(#) $Id: photo.n,v 1.14.2.1 2003/07/14 22:59:34 dkf Exp $ +'\" RCS: @(#) $Id: photo.n,v 1.14.2.2 2003/07/17 22:53:09 dkf Exp $ '\" .so man.macros .TH photo n 4.0 Tk "Tk Built-In Commands" @@ -245,9 +245,13 @@ Sets pixels in \fI imageName\fR to the data specified in \fIdata\fR. This command first searches the list of image file format handlers for a handler that can interpret the data in \fIdata\fR, and then reads the image encoded within into \fIimageName\fR (the destination image). -Note that \fIdata\fR may also be a single color name if you wish to -fill a rectangular region with that color. The following options may -be specified: +If \fIdata\fR does not match any known format, an attempt to interpret +it as a (top-to-bottom) list of scan-lines is made, with each +scan-line being a (left-to-right) list of pixel colors (see +\fBTk_GetColor\fR for a description of valid colors.) Every scan-line +must be of the same length. Note that when \fIdata\fR is a single +color name, you are instructing Tk to fill a rectangular region with +that color. The following options may be specified: .RS .TP \fB\-format \fIformat-name\fR @@ -257,11 +261,14 @@ Specifically, only image file format handlers whose names begin with format handler to read the data. .TP \fB\-to \fIx1 y1\fR ?\fIx2 y2\fR? -Specifies the coordinates of the top-left corner (\fIx1\fR,\fIy1\fR) of the -region of \fIimageName\fR into which data from \fIfilename\fR are to be -read. The default is (0,0). If \fIx2\fR,\fIy2\fR is given and \fIdata\fR -is one color value, then a region extending to the bottom-right corner -represented by (\fIx2\fR,\fIy2\fR) will be filled with that color. +Specifies the coordinates of the top-left corner (\fIx1\fR,\fIy1\fR) +of the region of \fIimageName\fR into which data from \fIfilename\fR +are to be read. The default is (0,0). If \fIx2\fR,\fIy2\fR is given +and \fIdata\fR is not large enough to cover the rectangle specified by +this option, the image data extracted will be tiled so it covers the +entire destination. Note that if \fIdata\fR specifies a single color +value, then a region extending to the bottom-right corner represented +by (\fIx2\fR,\fIy2\fR) will be filled with that color. .RE .TP \fIimageName \fBread\fR \fIfilename\fR ?\fIoption value(s) ...\fR? -- cgit v0.12 From 588654ef58fffd1caa981c8e65c72852f4189322 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2003 22:55:27 +0000 Subject: D'oh! Important word missing... --- doc/photo.n | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/photo.n b/doc/photo.n index ef04d7a..bd49def 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -'\" RCS: @(#) $Id: photo.n,v 1.14.2.2 2003/07/17 22:53:09 dkf Exp $ +'\" RCS: @(#) $Id: photo.n,v 1.14.2.3 2003/07/17 22:55:27 dkf Exp $ '\" .so man.macros .TH photo n 4.0 Tk "Tk Built-In Commands" @@ -266,9 +266,9 @@ of the region of \fIimageName\fR into which data from \fIfilename\fR are to be read. The default is (0,0). If \fIx2\fR,\fIy2\fR is given and \fIdata\fR is not large enough to cover the rectangle specified by this option, the image data extracted will be tiled so it covers the -entire destination. Note that if \fIdata\fR specifies a single color -value, then a region extending to the bottom-right corner represented -by (\fIx2\fR,\fIy2\fR) will be filled with that color. +entire destination rectangle. Note that if \fIdata\fR specifies a +single color value, then a region extending to the bottom-right corner +represented by (\fIx2\fR,\fIy2\fR) will be filled with that color. .RE .TP \fIimageName \fBread\fR \fIfilename\fR ?\fIoption value(s) ...\fR? -- cgit v0.12 From 8f79fbdb5aa24f576d0631abbbf463e06ac48707 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 18 Jul 2003 01:06:33 +0000 Subject: * macosx/Makefile: Changes for new tcl buildsystem. * macosx/Wish.pbproj/jingham.pbxuser: * macosx/Wish.pbproj/project.pbxproj: Changes for new tcl buildsystem. Changed build to include tk specific html help in Tk.framework instead of Tcl.framework. Set default SYMROOT in target options to simplify setting up PB (manually setting common build folder for tcl & tk no longer needed). * macosx/README: Updated info for changes to buildsystem, html help location and PB setup. --- ChangeLog | 15 + macosx/Makefile | 18 +- macosx/README | 46 +- macosx/Wish.pbproj/jingham.pbxuser | 1415 +----------------------------------- macosx/Wish.pbproj/project.pbxproj | 31 +- 5 files changed, 79 insertions(+), 1446 deletions(-) diff --git a/ChangeLog b/ChangeLog index b458af4..aaeb10f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2003-07-17 Daniel Steffen + + * macosx/Makefile: Changes for new tcl buildsystem. + + * macosx/Wish.pbproj/jingham.pbxuser: + * macosx/Wish.pbproj/project.pbxproj: + Changes for new tcl buildsystem. + Changed build to include tk specific html help in Tk.framework + instead of Tcl.framework. + Set default SYMROOT in target options to simplify setting up PB + (manually setting common build folder for tcl & tk no longer needed). + + * macosx/README: Updated info for changes to buildsystem, + html help location and PB setup. + 2003-07-17 Donal K. Fellows * doc/photo.n: [$photo put] has been able to take rectangles of diff --git a/macosx/Makefile b/macosx/Makefile index 3945438..bb5adf6 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -3,17 +3,19 @@ # Simple makefile for building on Mac OS X with the # Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7.2.1 2003/03/18 13:55:50 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.2 2003/07/18 01:06:33 das Exp $ # ################################################################################ INSTALL_ROOT ?= BUILD_DIR ?= ${CURDIR}/../../build +SYMROOT ?= ${BUILD_DIR}/${PROJECT} -TCL_FRAMEWORK_DIR ?= ${BUILD_DIR} +TCL_FRAMEWORK_DIR ?= ${BUILD_DIR}/tcl TCLSH_DIR ?= ${TCL_FRAMEWORK_DIR} +PROJECT = tk TARGET = Wish DEVBUILDSTYLE = Development @@ -21,8 +23,9 @@ DEPBUILDSTYLE = Deployment PBXBUILD = /usr/bin/pbxbuild -BUILD = ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}" \ - TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" TCLSH_DIR="${TCLSH_DIR}" +BUILD = ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \ + TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \ + TCLSH_DIR="${TCLSH_DIR}" DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" @@ -77,10 +80,6 @@ clean-deploy: ################################################################################ -forceRelink: - @-cd ${BUILD_DIR}; \ - rm -rf Tk.framework Wish\ Shell.app libtkstub8.4.a - cleanup-embedded: @-cd ${INSTALL_ROOT}; \ chmod -RH u+w Library/Frameworks/Tcl.framework; \ @@ -93,7 +92,6 @@ cleanup-embedded: .PHONY: all install embedded clean develop deploy install-develop install-deploy \ embedded-develop embedded-deploy install-embedded-develop install-embedded-deploy \ -clean-develop clean-deploy forceRelink \ -cleanup-embedded +clean-develop clean-deploy cleanup-embedded ################################################################################ diff --git a/macosx/README b/macosx/README index 9cde39c..65380e1 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ TclTkAqua README ---------------- -RCS: @(#) $Id: README,v 1.6.2.1 2003/03/18 13:55:51 das Exp $ +RCS: @(#) $Id: README,v 1.6.2.2 2003/07/18 01:06:33 das Exp $ This is the README file for the Mac OS X native versions of Tcl & Tk. @@ -19,7 +19,7 @@ before asking on the list, many questions have already been answered). but also check the Tcl'ers Wiki for a wealth of information: http://wiki.tcl.tk/ -- The wiki has a page listing known bugs in Mac OS X Tk (and other tips) +- The wiki has a page listing known bugs in Mac OS X Tcl/Tk (and other tips) http://wiki.tcl.tk/MacOS%20X as well as a page with info on building Tcl/Tk on Mac OS X http://wiki.tcl.tk/Steps%20to%20build%20Tcl/Tk%208.4.0%20on%20MacOS%20X @@ -58,11 +58,11 @@ $pkg/Resources/Scripts/pkgIndex.tcl as well as the usual $pkg/pkgIndex.tcl. This allows building extensions as frameworks with all script files contained in the Resources/Scripts directory of the framework. -- Tcl.framework contains the Tcl and Tk documentation in html format in the +- The Tcl and Tk frameworks contain documentation in html format in the standard location for frameworks: Tcl.framework/Resources/English.lproj/Documentation/Reference/Tcl -Tk.framework contains no documentation. No manpages are installed by -default for either tcl or tk. + Tk.framework/Resources/English.lproj/Documentation/Reference/Tk +No manpages are installed by default for either tcl or tk. - the frameworks Tcl.framework and Tk.framework can be placed in any of the system's standard framework directories: @@ -124,10 +124,14 @@ retail or should be present as a disk image on new macs that came with OSX preinstalled. It can also be downloaded from http://connect.apple.com (after you register for free ADC membership). -- Tcl and TkAqua are built as Mac OS X frameworks using Apple's ProjectBuilder -IDE, but you do not have to deal with the IDE if you don't want to: there are -Makefiles available in tcl/macosx and tk/macosx that take care of calling the -ProjectBuilder command line tool with all the details taken care of. +- Tcl is built as a Mac OS X framework via the Makefile in tcl/macosx, but can +also be built from Apple's ProjectBuilder IDE using the Tcl.pbproj project (which +calls through to the Makefile). + +- TkAqua is built as a Mac OS X frameworks using Apple's ProjectBuilder +IDE, but you do not have to deal with the IDE if you don't want to, the +Makefile in tk/macosx takes care of calling the ProjectBuilder command line tool +with all the details taken care of. - Unpack the tcl and tk source release archives and place the tcl and tk source trees in a common parent directory. @@ -198,23 +202,10 @@ Notes: auto_path. Thus you can place tcl extensions in this directory (i.e. embed them in the app package) and load them with [package require]. -- To build from the IDE using the projects directly without going through the -Makefiles you need so setup a common build folder for the projects. A simple way -to achieve this is to make symbolic links - ln -fs ../../build tcl/macosx/build - ln -fs ../../build tk/macosx/build -(this location of the build folder is compatible with the Makefiles). - -Another way is to set the build folder location directly in -tcl/macosx/Tcl.pbproj and tk/macosx/Wish/pbproj using ProjectBuilder's -"Project->Show Info" on the topmost icon in the filelist. Switch to "Place build -products in a separate location" with a setting of "$SRCROOT/../../build" -(this gets stored in Tcl.pbproj/${USER}.pbxuser & Wish.pbproj/${USER}.pbxuser). - -- It is possible to build Tk without a common build folder with Tcl, or even -without the tcl sourcetree itself; but in that case you need to tell the Tk -Makefile where the copies of 'Tcl.framework' and 'tclsh8.4' are located that -you want to build & link against (their default location is the ${BUILD_DIR}). +- It is possible to build Tk without without the tcl sourcetree; but in that +case you need to tell the Tk Makefile where the copies of 'Tcl.framework' and +'tclsh8.4' are located that you want to build & link against +(their default location is ${BUILD_DIR}/tcl). For instance to use their default systemwide install locations: make -C tk${ver}/macosx \ @@ -233,3 +224,6 @@ or to use an earlier install of Tcl into INSTALL_ROOT="${TCLTK}/" : The Makefile variables TCL_FRAMEWORK_DIR and TCLSH_DIR were added in Tk 8.4.3. +Note that html help in Tk.framework is only built if TCL_FRAMEWORK_DIR contains +the tcl Makefile (as is the case for the default value of TCL_FRAMEWORK_DIR). + diff --git a/macosx/Wish.pbproj/jingham.pbxuser b/macosx/Wish.pbproj/jingham.pbxuser index 085c8be..7deb7ad 100644 --- a/macosx/Wish.pbproj/jingham.pbxuser +++ b/macosx/Wish.pbproj/jingham.pbxuser @@ -1,1407 +1,20 @@ // !$*UTF8*$! { - 4C177118040AF24400C916F0 = { - fileReference = F5375555016C376E01DC9062; - isa = PBXFileBreakpoint; - lineNumber = 298; - state = 1; - }; - 4C177121040AF3B400C916F0 = { - fRef = F5375550016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXDialog.c: NavServicesGetFile"; - rLen = 0; - rLoc = 27371; - rType = 0; - vrLen = 1821; - vrLoc = 1768; - }; - 4C177124040AF3B400C916F0 = { - fRef = F5375550016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXDialog.c: NavServicesGetFile"; - rLen = 0; - rLoc = 27371; - rType = 0; - vrLen = 1821; - vrLoc = 1768; - }; - 4C177125040AF3B400C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: 126"; - rLen = 17; - rLoc = 4212; - rType = 0; - vrLen = 1722; - vrLoc = 4; - }; - 4C3B4CF3040B041900C916F0 = { - fileReference = F5375555016C376E01DC9062; - isa = PBXFileBreakpoint; - lineNumber = 298; - state = 1; - }; - 4C3B4CF8040BEBFA00C916F0 = { - fRef = F5375553016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXEvent.c: eventStatus"; - rLen = 0; - rLoc = 6179; - rType = 0; - vrLen = 1402; - vrLoc = 5964; - }; - 4C3B4CF9040BEBFA00C916F0 = { - isa = PBXTargetBookmark; - trg = F53756A0016C4DD401DC9062; - uiCtxt = { - TOCViewDetailVisibleRect = "{{0, 0}, {580, 811}}"; - TOCViewExpandedItems = ( - "com.apple.target-editor-pane.settings", - "com.apple.target-editor-pane.settings.simple", - "com.apple.target-editor-pane.info-plist", - "com.apple.target-editor-pane.info-plist.simple", - "com.apple.target-editor-pane.buildphases", - ); - TOCViewMasterVisibleRect = "{{0, 0}, {229, 811}}"; - TOCViewSelectedItems = ( - "com.apple.target-editor-pane.info-plist.simple", - ); - }; - }; - 4C3B4CFA040BEBFA00C916F0 = { - fRef = F5375539016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXResource.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1172; - vrLoc = 18934; - }; - 4C3B4CFB040BEBFA00C916F0 = { - fRef = F5375534016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXApplication.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1088; - vrLoc = 0; - }; - 4C3B4CFC040BEBFA00C916F0 = { - fRef = F5375533016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkAboutDlg.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1821; - vrLoc = 14127; - }; - 4C3B4CFD040BEBFA00C916F0 = { - fRef = F5375536016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXLibrary.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1005; - vrLoc = 0; - }; - 4C3B4CFE040BEBFA00C916F0 = { - fRef = F537553A016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXXCursors.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1453; - vrLoc = 0; - }; - 4C3B4CFF040BEBFA00C916F0 = { - fRef = F5375535016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXCursors.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1285; - vrLoc = 0; - }; - 4C3B4D00040BEBFA00C916F0 = { - fRef = F5375538016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMenu.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1049; - vrLoc = 0; - }; - 4C3B4D01040BEBFA00C916F0 = { - fRef = 4C3B4CF6040B18B200C916F0; - isa = PBXTextBookmark; - name = "tkMacOSXAETE.r: 21"; - rLen = 0; - rLoc = 568; - rType = 0; - vrLen = 974; - vrLoc = 492; - }; - 4C3B4D02040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: TkMacOSXInitAppleEvents"; - rLen = 0; - rLoc = 3804; - rType = 0; - vrLen = 1539; - vrLoc = 2499; - }; - 4C3B4D03040BEBFA00C916F0 = { - fRef = F5375553016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXEvent.c: eventStatus"; - rLen = 0; - rLoc = 6179; - rType = 0; - vrLen = 1402; - vrLoc = 5964; - }; - 4C3B4D04040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: 126"; - rLen = 17; - rLoc = 4212; - rType = 0; - vrLen = 1722; - vrLoc = 4; - }; - 4C3B4D05040BEBFA00C916F0 = { - isa = PBXTargetBookmark; - trg = F53756A0016C4DD401DC9062; - uiCtxt = { - TOCViewDetailVisibleRect = "{{0, 0}, {580, 811}}"; - TOCViewExpandedItems = ( - "com.apple.target-editor-pane.settings", - "com.apple.target-editor-pane.settings.simple", - "com.apple.target-editor-pane.info-plist", - "com.apple.target-editor-pane.info-plist.simple", - "com.apple.target-editor-pane.buildphases", - ); - TOCViewMasterVisibleRect = "{{0, 0}, {229, 811}}"; - TOCViewSelectedItems = ( - "com.apple.target-editor-pane.info-plist.simple", - ); - }; - }; - 4C3B4D06040BEBFA00C916F0 = { - fRef = F5375534016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXApplication.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1543; - vrLoc = 7169; - }; - 4C3B4D07040BEBFA00C916F0 = { - fRef = F5375536016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXLibrary.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1189; - vrLoc = 18502; - }; - 4C3B4D08040BEBFA00C916F0 = { - fRef = F5375539016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXResource.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1172; - vrLoc = 18934; - }; - 4C3B4D09040BEBFA00C916F0 = { - fRef = F537553A016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXXCursors.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1453; - vrLoc = 0; - }; - 4C3B4D0A040BEBFA00C916F0 = { - fRef = F5375538016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMenu.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1049; - vrLoc = 0; - }; - 4C3B4D0B040BEBFA00C916F0 = { - fRef = F5375536016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXLibrary.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1192; - vrLoc = 18499; - }; - 4C3B4D0C040BEBFA00C916F0 = { - fRef = F5375534016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXApplication.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1088; - vrLoc = 0; - }; - 4C3B4D0D040BEBFA00C916F0 = { - fRef = F5375533016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkAboutDlg.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1821; - vrLoc = 14127; - }; - 4C3B4D0E040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: ScriptHandler"; - rLen = 0; - rLoc = 10553; - rType = 0; - vrLen = 1863; - vrLoc = 9972; - }; - 4C3B4D0F040BEBFA00C916F0 = { - fRef = 4C3B4CF6040B18B200C916F0; - isa = PBXTextBookmark; - name = "tkMacOSXAETE.r: 42"; - rLen = 0; - rLoc = 979; - rType = 0; - vrLen = 1021; - vrLoc = 495; - }; - 4C3B4D10040BEBFA00C916F0 = { - fRef = F5375536016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXLibrary.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1005; - vrLoc = 0; - }; - 4C3B4D11040BEBFA00C916F0 = { - fRef = F537553A016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXXCursors.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1453; - vrLoc = 0; - }; - 4C3B4D12040BEBFA00C916F0 = { - fRef = F5375535016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXCursors.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1285; - vrLoc = 0; - }; - 4C3B4D13040BEBFA00C916F0 = { - fRef = F5375538016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMenu.r: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1049; - vrLoc = 0; - }; - 4C3B4D14040BEBFA00C916F0 = { - fRef = 4C3B4CF6040B18B200C916F0; - isa = PBXTextBookmark; - name = "tkMacOSXAETE.r: 21"; - rLen = 0; - rLoc = 568; - rType = 0; - vrLen = 974; - vrLoc = 492; - }; - 4C3B4D15040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: 201"; - rLen = 11; - rLoc = 6300; - rType = 0; - vrLen = 553; - vrLoc = 7239; - }; - 4C3B4D16040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: 287"; - rLen = 13; - rLoc = 8314; - rType = 0; - vrLen = 721; - vrLoc = 8314; - }; - 4C3B4D17040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: theFSRef"; - rLen = 0; - rLoc = 10328; - rType = 0; - vrLen = 886; - vrLoc = 10063; - }; - 4C3B4D18040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - rLen = 0; - rLoc = 297; - rType = 1; - }; - 4C3B4D19040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: ScriptHandler"; - rLen = 0; - rLoc = 8588; - rType = 0; - vrLen = 602; - vrLoc = 8397; - }; - 4C3B4D1A040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - rLen = 0; - rLoc = 347; - rType = 1; - }; - 4C3B4D1B040BEBFA00C916F0 = { - fRef = F5375555016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXHLEvents.c: aliasHandle"; - rLen = 11; - rLoc = 10378; - rType = 0; - vrLen = 1308; - vrLoc = 9662; - }; - 4C864644040AD22700C916F0 = { - fRef = F5375567016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXWm.c: 4468"; - rLen = 17; - rLoc = 135745; - rType = 0; - vrLen = 2539; - vrLoc = 140040; - }; - 4C864645040AD22700C916F0 = { - fRef = F5375558016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXKeyEvent.c: __GXX_ABI_VERSION"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 2261; - vrLoc = 0; - }; - 4C864646040AD22700C916F0 = { - fRef = F537555C016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMouseEvent.c: 471"; - rLen = 21; - rLoc = 15543; - rType = 0; - vrLen = 1543; - vrLoc = 15543; - }; - 4C864648040AD22700C916F0 = { - fRef = F537555C016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMouseEvent.c: GeneratePollingEvents"; - rLen = 0; - rLoc = 16956; - rType = 0; - vrLen = 1500; - vrLoc = 15684; - }; - 4C864649040AD22700C916F0 = { - fRef = F5375567016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXWm.c: 4468"; - rLen = 17; - rLoc = 135745; - rType = 0; - vrLen = 2539; - vrLoc = 140040; - }; - 4C86464A040AD22700C916F0 = { - fRef = F5375558016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXKeyEvent.c: __GXX_ABI_VERSION"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 2261; - vrLoc = 0; - }; - 4C86464B040AD22700C916F0 = { - fRef = F537555C016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMouseEvent.c: GeneratePollingEvents"; - rLen = 0; - rLoc = 16956; - rType = 0; - vrLen = 1503; - vrLoc = 15268; - }; - 4C86464C040AD22700C916F0 = { - fRef = F5375558016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXKeyEvent.c: __GXX_ABI_VERSION"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 2261; - vrLoc = 0; - }; - 4C86464D040AD22700C916F0 = { - fRef = F537555C016C376E01DC9062; - isa = PBXTextBookmark; - name = "tkMacOSXMouseEvent.c: 471"; - rLen = 21; - rLoc = 15543; - rType = 0; - vrLen = 1543; - vrLoc = 15543; - }; F537552A016C352C01DC9062 = { activeBuildStyle = F537552C016C352C01DC9062; - activeExecutable = F53756AB016C4DD401DC9062; + activeExecutable = F9B92F14047876F1006F146B; activeTarget = F53756A0016C4DD401DC9062; - addToTargets = ( - F53756A0016C4DD401DC9062, - ); breakpoints = ( - F5979A0A033DA68401DC9062, - 4C177118040AF24400C916F0, - 4C3B4CF3040B041900C916F0, ); executables = ( - F53756AB016C4DD401DC9062, + F9B92F14047876F1006F146B, ); perUserDictionary = { - PBXPerProjectTemplateStateSaveDate = 67827278; - "PBXTemplateGeometry-F5CA7EC9015C08ED0DCA290F" = { - ContentSize = "{1105, 833}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 0}, {1105, 833}}"; - Split0 = { - ActiveTab = 3; - ActiveTabName = PBXProjectFindModule; - Collapsed = NO; - Frame = "{{0, 0}, {1105, 833}}"; - Split0 = { - Frame = "{{0, 301}, {1105, 532}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {484, 208}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {664, 208}}"; - Split0 = { - Frame = "{{0, 24}, {664, 184}}"; - Split0 = { - Frame = "{{0, 0}, {325, 184}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 96.123, - ); - Frame = "{{334, 0}, {330, 184}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {664, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {667, 265}}"; - BuildTranscriptFrame = "{{0, 274}, {667, 2}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {665, 298}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {1105, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = NO; - Template = F5CA7EC9015C08ED0DCA290F; - ToolbarVisible = YES; - WindowLocation = "{69, 93}"; - }; - "PBXTemplateGeometry-F5CA7ECC015C09990DCA290F" = { - ContentSize = "{980, 839}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 23}, {980, 816}}"; - Split0 = { - ActiveTab = 0; - ActiveTabName = PBXDebugSessionModule; - Collapsed = NO; - Frame = "{{0, 0}, {980, 816}}"; - Split0 = { - Frame = "{{0, 214}, {980, 602}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {773, 267}}"; - }; - Tab1 = { - Debugger = { - ActiveTab = 0; - ActiveTabName = PBXDebugCLIModule; - Collapsed = NO; - Frame = "{{0, 0}, {980, 208}}"; - Split0 = { - Frame = "{{0, 208}, {980, 0}}"; - Split0 = { - Frame = "{{0, 0}, {467, 0}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 270.123, - ); - Frame = "{{476, 0}, {504, 0}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {980, 184}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {980, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {614, 262}}"; - BuildTranscriptFrame = "{{0, 271}, {614, 2}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {612, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = YES; - Template = F5CA7ECC015C09990DCA290F; - ToolbarVisible = YES; - WindowLocation = "{186, 101}"; - }; - PBXWorkspaceContents = ( - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = 4C3B4D15040BEBFA00C916F0; - history = ( - 4C864644040AD22700C916F0, - 4C864645040AD22700C916F0, - 4C864646040AD22700C916F0, - 4C177121040AF3B400C916F0, - 4C3B4CF8040BEBFA00C916F0, - 4C3B4CF9040BEBFA00C916F0, - 4C3B4CFA040BEBFA00C916F0, - 4C3B4CFB040BEBFA00C916F0, - 4C3B4CFC040BEBFA00C916F0, - 4C3B4CFD040BEBFA00C916F0, - 4C3B4CFE040BEBFA00C916F0, - 4C3B4CFF040BEBFA00C916F0, - 4C3B4D00040BEBFA00C916F0, - 4C3B4D01040BEBFA00C916F0, - 4C3B4D02040BEBFA00C916F0, - ); - prevStack = ( - 4C864648040AD22700C916F0, - 4C864649040AD22700C916F0, - 4C86464A040AD22700C916F0, - 4C86464B040AD22700C916F0, - 4C86464C040AD22700C916F0, - 4C86464D040AD22700C916F0, - 4C177124040AF3B400C916F0, - 4C177125040AF3B400C916F0, - 4C3B4D03040BEBFA00C916F0, - 4C3B4D04040BEBFA00C916F0, - 4C3B4D05040BEBFA00C916F0, - 4C3B4D06040BEBFA00C916F0, - 4C3B4D07040BEBFA00C916F0, - 4C3B4D08040BEBFA00C916F0, - 4C3B4D09040BEBFA00C916F0, - 4C3B4D0A040BEBFA00C916F0, - 4C3B4D0B040BEBFA00C916F0, - 4C3B4D0C040BEBFA00C916F0, - 4C3B4D0D040BEBFA00C916F0, - 4C3B4D0E040BEBFA00C916F0, - 4C3B4D0F040BEBFA00C916F0, - 4C3B4D10040BEBFA00C916F0, - 4C3B4D11040BEBFA00C916F0, - 4C3B4D12040BEBFA00C916F0, - 4C3B4D13040BEBFA00C916F0, - 4C3B4D14040BEBFA00C916F0, - ); - }; - NavContent1 = { - bookmark = 4C3B4D17040BEBFA00C916F0; - history = ( - 4C3B4D16040BEBFA00C916F0, - ); - }; - NavCount = 2; - NavGeometry0 = { - Frame = "{{0, 0}, {848, 428}}"; - NavBarVisible = YES; - }; - NavGeometry1 = { - Frame = "{{0, 437}, {848, 428}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Default Options"; - }; - TabCount = 5; - }; - }, - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = 4C3B4D19040BEBFA00C916F0; - history = ( - 4C3B4D18040BEBFA00C916F0, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {967, 365}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Default Options"; - }; - TabCount = 5; - }; - }, - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = 4C3B4D1B040BEBFA00C916F0; - history = ( - 4C3B4D1A040BEBFA00C916F0, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {980, 602}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Default Options"; - }; - TabCount = 5; - }; - }, - ); - PBXWorkspaceGeometries = ( - { - ContentSize = "{1132, 888}"; - LeftSlideOut = { - ActiveTab = 0; - ActiveTabName = PBXGroupTreeModule; - Collapsed = NO; - Frame = "{{0, 23}, {1132, 865}}"; - Split0 = { - Collapsed = NO; - Frame = "{{284, 0}, {848, 865}}"; - Split0 = { - Frame = "{{0, 0}, {848, 865}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {681, 289}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {681, 150}}"; - Split0 = { - Frame = "{{0, 24}, {681, 126}}"; - Split0 = { - Frame = "{{0, 0}, {333, 126}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 105.123, - ); - Frame = "{{342, 0}, {339, 126}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {681, 120}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {681, 234}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {681, 234}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {683, 205}}"; - BuildTranscriptFrame = "{{0, 214}, {683, 2}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {681, 238}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {260, 865}}"; - GroupTreeTableConfiguration = ( - SCMStatusColumn, - 22, - TargetStatusColumn, - 18, - MainColumn, - 205, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {250, 333}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 207, - ); - Frame = "{{0, 0}, {248, 554}}"; - MembersFrame = "{{0, 342}, {250, 212}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 206, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {217, 554}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {239, 865}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 206.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 810}}"; - }; - TabCount = 5; - TabsVisible = YES; - }; - NavBarShownByDefault = YES; - StatusViewVisible = YES; - Template = 64ABBB4501FA494900185B06; - ToolbarVisible = YES; - WindowLocation = "{28, 60}"; - }, - { - ContentSize = "{967, 689}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 23}, {967, 666}}"; - Split0 = { - ActiveTab = 2; - ActiveTabName = PBXBuildResultsModule; - Collapsed = NO; - Frame = "{{0, 0}, {967, 666}}"; - Split0 = { - Frame = "{{0, 301}, {967, 365}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {952, 321}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {781, 452}}"; - Split0 = { - Frame = "{{0, 24}, {781, 428}}"; - Split0 = { - Frame = "{{0, 0}, {383, 428}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 155.123, - ); - Frame = "{{392, 0}, {389, 428}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {781, 452}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {685, 198}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {685, 198}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {969, 128}}"; - BuildTranscriptFrame = "{{0, 137}, {969, 136}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {967, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {300, 533}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 267, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 100}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = YES; - Template = F5314676015831810DCA290F; - ToolbarVisible = YES; - WindowLocation = "{7, 247}"; - }, - { - ContentSize = "{980, 839}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 23}, {980, 816}}"; - Split0 = { - ActiveTab = 0; - ActiveTabName = PBXDebugSessionModule; - Collapsed = NO; - Frame = "{{0, 0}, {980, 816}}"; - Split0 = { - Frame = "{{0, 214}, {980, 602}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {773, 267}}"; - }; - Tab1 = { - Debugger = { - ActiveTab = 0; - ActiveTabName = PBXDebugCLIModule; - Collapsed = NO; - Frame = "{{0, 0}, {980, 208}}"; - Split0 = { - Frame = "{{0, 208}, {980, 0}}"; - Split0 = { - Frame = "{{0, 0}, {466, 0}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 271.123, - ); - Frame = "{{475, 0}, {505, 0}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {980, 184}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {980, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {614, 262}}"; - BuildTranscriptFrame = "{{0, 271}, {614, 2}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {612, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = YES; - Template = F5CA7ECC015C09990DCA290F; - ToolbarVisible = YES; - WindowLocation = "{186, 101}"; - }, - ); - PBXWorkspaceStateSaveDate = 67827278; - }; - perUserProjectItems = { - 4C177121040AF3B400C916F0 = 4C177121040AF3B400C916F0; - 4C177124040AF3B400C916F0 = 4C177124040AF3B400C916F0; - 4C177125040AF3B400C916F0 = 4C177125040AF3B400C916F0; - 4C3B4CF8040BEBFA00C916F0 = 4C3B4CF8040BEBFA00C916F0; - 4C3B4CF9040BEBFA00C916F0 = 4C3B4CF9040BEBFA00C916F0; - 4C3B4CFA040BEBFA00C916F0 = 4C3B4CFA040BEBFA00C916F0; - 4C3B4CFB040BEBFA00C916F0 = 4C3B4CFB040BEBFA00C916F0; - 4C3B4CFC040BEBFA00C916F0 = 4C3B4CFC040BEBFA00C916F0; - 4C3B4CFD040BEBFA00C916F0 = 4C3B4CFD040BEBFA00C916F0; - 4C3B4CFE040BEBFA00C916F0 = 4C3B4CFE040BEBFA00C916F0; - 4C3B4CFF040BEBFA00C916F0 = 4C3B4CFF040BEBFA00C916F0; - 4C3B4D00040BEBFA00C916F0 = 4C3B4D00040BEBFA00C916F0; - 4C3B4D01040BEBFA00C916F0 = 4C3B4D01040BEBFA00C916F0; - 4C3B4D02040BEBFA00C916F0 = 4C3B4D02040BEBFA00C916F0; - 4C3B4D03040BEBFA00C916F0 = 4C3B4D03040BEBFA00C916F0; - 4C3B4D04040BEBFA00C916F0 = 4C3B4D04040BEBFA00C916F0; - 4C3B4D05040BEBFA00C916F0 = 4C3B4D05040BEBFA00C916F0; - 4C3B4D06040BEBFA00C916F0 = 4C3B4D06040BEBFA00C916F0; - 4C3B4D07040BEBFA00C916F0 = 4C3B4D07040BEBFA00C916F0; - 4C3B4D08040BEBFA00C916F0 = 4C3B4D08040BEBFA00C916F0; - 4C3B4D09040BEBFA00C916F0 = 4C3B4D09040BEBFA00C916F0; - 4C3B4D0A040BEBFA00C916F0 = 4C3B4D0A040BEBFA00C916F0; - 4C3B4D0B040BEBFA00C916F0 = 4C3B4D0B040BEBFA00C916F0; - 4C3B4D0C040BEBFA00C916F0 = 4C3B4D0C040BEBFA00C916F0; - 4C3B4D0D040BEBFA00C916F0 = 4C3B4D0D040BEBFA00C916F0; - 4C3B4D0E040BEBFA00C916F0 = 4C3B4D0E040BEBFA00C916F0; - 4C3B4D0F040BEBFA00C916F0 = 4C3B4D0F040BEBFA00C916F0; - 4C3B4D10040BEBFA00C916F0 = 4C3B4D10040BEBFA00C916F0; - 4C3B4D11040BEBFA00C916F0 = 4C3B4D11040BEBFA00C916F0; - 4C3B4D12040BEBFA00C916F0 = 4C3B4D12040BEBFA00C916F0; - 4C3B4D13040BEBFA00C916F0 = 4C3B4D13040BEBFA00C916F0; - 4C3B4D14040BEBFA00C916F0 = 4C3B4D14040BEBFA00C916F0; - 4C3B4D15040BEBFA00C916F0 = 4C3B4D15040BEBFA00C916F0; - 4C3B4D16040BEBFA00C916F0 = 4C3B4D16040BEBFA00C916F0; - 4C3B4D17040BEBFA00C916F0 = 4C3B4D17040BEBFA00C916F0; - 4C3B4D18040BEBFA00C916F0 = 4C3B4D18040BEBFA00C916F0; - 4C3B4D19040BEBFA00C916F0 = 4C3B4D19040BEBFA00C916F0; - 4C3B4D1A040BEBFA00C916F0 = 4C3B4D1A040BEBFA00C916F0; - 4C3B4D1B040BEBFA00C916F0 = 4C3B4D1B040BEBFA00C916F0; - 4C864644040AD22700C916F0 = 4C864644040AD22700C916F0; - 4C864645040AD22700C916F0 = 4C864645040AD22700C916F0; - 4C864646040AD22700C916F0 = 4C864646040AD22700C916F0; - 4C864648040AD22700C916F0 = 4C864648040AD22700C916F0; - 4C864649040AD22700C916F0 = 4C864649040AD22700C916F0; - 4C86464A040AD22700C916F0 = 4C86464A040AD22700C916F0; - 4C86464B040AD22700C916F0 = 4C86464B040AD22700C916F0; - 4C86464C040AD22700C916F0 = 4C86464C040AD22700C916F0; - 4C86464D040AD22700C916F0 = 4C86464D040AD22700C916F0; + PBXPerProjectTemplateStateSaveDate = 79872368; + PBXWorkspaceStateSaveDate = 79872368; }; projectwideBuildSettings = { - OBJROOT = "/Volumes/TheCloset/jingham/tcl-tk/Objects"; - SYMROOT = "/Volumes/TheCloset/jingham/tcl-tk/Products"; + SYMROOT = "${SRCROOT}/../../build/tk"; }; wantsIndex = 1; wantsSCM = -1; @@ -1412,10 +25,13 @@ F53756A0016C4DD401DC9062 = { activeExec = 0; executables = ( - F53756AB016C4DD401DC9062, + F9B92F14047876F1006F146B, ); }; - F53756AB016C4DD401DC9062 = { + F548F8CE0313CEF0016F146B = { + activeExec = 0; + }; + F9B92F14047876F1006F146B = { activeArgIndex = 2147483647; activeArgIndices = ( ); @@ -1429,19 +45,10 @@ environmentEntries = ( ); isa = PBXExecutable; - name = "Wish Shell"; + name = Wish; shlibInfoDictList = ( ); sourceDirectories = ( ); }; - F548F8CE0313CEF0016F146B = { - activeExec = 0; - }; - F5979A0A033DA68401DC9062 = { - fileReference = F5375560016C376E01DC9062; - isa = PBXFileBreakpoint; - lineNumber = 1082; - state = 2; - }; } diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 6520d0f..8b1daed 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1506,8 +1506,10 @@ F5C1D51901B88F9A01DC9062, F52D38C5031F4259016F146B, F5877FBC031FA968016F146B, + F9A61D2F04C2C861006F5A0B, ); buildSettings = { + DOCDIR = "${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/Resources/English.lproj/Documentation/Reference"; DYLIB_COMPATIBILITY_VERSION = 8.4; DYLIB_CURRENT_VERSION = "$(FRAMEWORK_VERSION)"; DYLIB_INSTALL_PATH = /Library/Frameworks; @@ -1526,8 +1528,9 @@ PRINCIPAL_CLASS = ""; PRODUCT_NAME = Tk; SECTORDER_FLAGS = ""; + SYMROOT = "${SRCROOT}/../../build/tk"; TCLSH_DIR = "$(TCL_FRAMEWORK_DIR)"; - TCL_FRAMEWORK_DIR = "$(SYMROOT)"; + TCL_FRAMEWORK_DIR = "$(SYMROOT)/../tcl"; USE_GCC3_PFE_SUPPORT = YES; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; WRAPPER_EXTENSION = framework; @@ -2889,7 +2892,8 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright OTHER_REZFLAGS = "-i \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" -i \"../generic\""; PRODUCT_NAME = "Wish Shell"; SECTORDER_FLAGS = ""; - TCL_FRAMEWORK_DIR = "$(SYMROOT)"; + SYMROOT = "${SRCROOT}/../../build/tk"; + TCL_FRAMEWORK_DIR = "$(SYMROOT)/../tcl"; USE_GCC3_PFE_SUPPORT = NO; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; WRAPPER_EXTENSION = app; @@ -3093,7 +3097,8 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright PRODUCT_NAME = libtkstub8.4.a; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; - TCL_FRAMEWORK_DIR = "$(SYMROOT)"; + SYMROOT = "${SRCROOT}/../../build/tk"; + TCL_FRAMEWORK_DIR = "$(SYMROOT)/../tcl"; WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; }; dependencies = ( @@ -3136,7 +3141,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents\"\n\n# if we are embedding frameworks, copy them into the app\nrm -rf \"Frameworks\"\nmkdir -p \"Frameworks\"\nif [ \"${DEPLOYMENT_LOCATION:-}\" = \"YES\" -o \"${ACTION}\" = \"install\" ]; then\n FWKDIR=\"${INSTALL_ROOT}/Library/Frameworks\"\nelse\n FWKDIR=\"${TARGET_BUILD_DIR}\"\nfi\ncp -fRP \"${FWKDIR}/Tcl.framework\" \"Frameworks\"\ncp -fRP \"${FWKDIR}/Tk.framework\" \"Frameworks\"\n\n# fix install names when embedding\nfix_install_id ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -id $(otool -L \"$1\" | awk \"/$(basename \"$1\")\\.framework.*[^:]\\$/ {sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_name ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -change $(otool -L \"$1\" | awk \"/$2\\.framework.*[^:]\\$/ {print \\$1; sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_id Frameworks/Tcl.framework/Tcl\nfix_install_id Frameworks/Tk.framework/Tk\nfix_install_name Frameworks/Tk.framework/Tk Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tk\n\nfi"; + shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents\"\n\n# if we are embedding frameworks, copy them into the app\nrm -rf \"Frameworks\"\nmkdir -p \"Frameworks\"\nif [ \"${DEPLOYMENT_LOCATION:-}\" = \"YES\" -o \"${ACTION}\" = \"install\" ]; then\n FWKDIR=\"${INSTALL_ROOT}/Library/Frameworks\"\nelse\n FWKDIR=\"${TARGET_BUILD_DIR}\"\nfi\ncp -fRPH \"${FWKDIR}/Tcl.framework\" \"Frameworks\"\ncp -fRPH \"${FWKDIR}/Tk.framework\" \"Frameworks\"\n\n# fix install names when embedding\nfix_install_id ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -id $(otool -L \"$1\" | awk \"/$(basename \"$1\")\\.framework.*[^:]\\$/ {sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_name ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -change $(otool -L \"$1\" | awk \"/$2\\.framework.*[^:]\\$/ {print \\$1; sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_id Frameworks/Tcl.framework/Tcl\nfix_install_id Frameworks/Tk.framework/Tk\nfix_install_name Frameworks/Tk.framework/Tk Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tk\n\nfi"; }; F55BC46802B2D38B01DC9062 = { fileEncoding = 5; @@ -3165,7 +3170,8 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright }; F5875C7B016FEF1D01DC9062 = { isa = PBXFrameworkReference; - path = Tcl.framework; + name = Tcl.framework; + path = ../tcl/Tcl.framework; refType = 3; }; F5875C7D016FEF1D01DC9062 = { @@ -3797,7 +3803,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi"; + shellScript = "if [ \"${BUILD_STYLE}\" = \"Development\" ]; then\n\t# force Deployment build to be relinked next time\n\tif [ -f \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Deployment.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nelse\n\t# force Development build to be relinked next time\n\tif [ -f \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\" ]; then\n\t touch -t `date -r \\`expr \\\\\\`date +\"%s\"\\\\\\` + 30\\` +\"%Y%m%d%H%M.%S\"` \"${OBJROOT}/Development.build/${PROJECT_NAME}.build/${TARGET_NAME}.build/Objects-normal/LinkFileList\"\n\tfi\nfi\n# create symbolic link to Tcl.framework if necessary\ncd \"${SYMROOT}\"\nif [ ! -e Tcl.framework -o -L Tcl.framework ]; then\n\trm -f Tcl.framework && ln -s \"${TCL_FRAMEWORK_DIR}/Tcl.framework\" .\nfi"; }; //F50 //F51 @@ -3816,6 +3822,19 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright path = ../ChangeLog; refType = 2; }; + F9A61D2F04C2C861006F5A0B = { + buildActionMask = 8; + files = ( + ); + generatedFileNames = ( + ); + isa = PBXShellScriptBuildPhase; + neededFileNames = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "if [ -z \"${EMBEDDED_BUILD:-}\" ]; then\n# build html documentation\nif [ \"${BUILD_STYLE}\" = \"Deployment\" ]; then\n\texport DYLD_FRAMEWORK_PATH=\"${TCL_FRAMEWORK_DIR}\"\n\tif [ -e \"${TCL_FRAMEWORK_DIR}/Deployment/Makefile\" ]; then\n\t\tcd \"${TCL_FRAMEWORK_DIR}/Deployment\"\n\t\texport DYLD_FRAMEWORK_PATH=\"${TCL_FRAMEWORK_DIR}\"\n\t\tgnumake html-tk DISTDIR=\"${INSTALL_ROOT}${DOCDIR}\" TCL_EXE=\"${TCLSH_DIR}/tclsh${FRAMEWORK_VERSION}\"\n\t\tcd \"${INSTALL_ROOT}${DOCDIR}\"\n\t\tln -fs contents.htm html/${PRODUCT_NAME}TOC.html\n\t\trm -fr \"${PRODUCT_NAME}\"; mv -f html \"${PRODUCT_NAME}\"\n\telse\n\t\techo \"Couldn't build html documentation!\"\n\tfi\nfi\nfi"; + }; }; rootObject = F537552A016C352C01DC9062; } -- cgit v0.12 From bcca5d01bf3e6dfef93906fd178b90085a216365 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 18 Jul 2003 09:53:16 +0000 Subject: Fix for [Bug 702230], and what an evil bug that is! --- ChangeLog | 7 +++++++ generic/tkPanedWindow.c | 10 +++++++++- tests/panedwindow.test | 19 ++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index aaeb10f..ccceb62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-07-18 Donal K. Fellows + + * tests/panedwindow.test (panedwindow-30.2): + * generic/tkPanedWindow.c (Tk_PanedWindowObjCmd): Ensure that we + can share GCs between a panedwindow and its sash proxy, even if + the panedwindow is in a toplevel with a different visual. [Bug 702230] + 2003-07-17 Daniel Steffen * macosx/Makefile: Changes for new tcl buildsystem. diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 9763487..c0385af 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.2 2003/07/17 20:49:00 dkf Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.3 2003/07/18 09:53:16 dkf Exp $ */ #include "tkPort.h" @@ -424,6 +424,14 @@ Tk_PanedWindowObjCmd(clientData, interp, objc, objv) } pwPtr->proxywin = Tk_CreateAnonymousWindow(interp, parent, (char *) NULL); + /* + * The proxy window has to be able to share GCs with the main + * panedwindow despite being children of windows with potentially + * different characteristics, and it looks better that way too. + * [Bug 702230] + */ + Tk_SetWindowVisual(pwPtr->proxywin, + Tk_Visual(tkwin), Tk_Depth(tkwin), Tk_Colormap(tkwin)); Tk_CreateEventHandler(pwPtr->proxywin, ExposureMask, ProxyWindowEventProc, (ClientData) pwPtr); diff --git a/tests/panedwindow.test b/tests/panedwindow.test index 67a695d..f2af591 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: panedwindow.test,v 1.8.2.1 2003/07/17 00:37:03 hobbs Exp $ +# RCS: @(#) $Id: panedwindow.test,v 1.8.2.2 2003/07/18 09:53:16 dkf Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -2495,6 +2495,23 @@ test panedwindow-30.1 {display on depths other than the default one} { -cleanup {destroy .t} -result {} } +test panedwindow-30.2 {display on depths other than the default one} { + -constraints {pseudocolor8 haveTruecolor24} + -body { + toplevel .t -visual {pseudocolor 8} + pack [frame .t.f -visual {truecolor 24}] + pack [panedwindow .t.f.p] + .t.f.p add [frame .t.f.p.f1 -width 5] [frame .t.f.p.f2 -width 5] + update + .t.f.p proxy place 1 1 + update + .t.f.p proxy forget + update + # If we got here, we didn't crash and that's good + } + -cleanup {destroy .t} + -result {} +} # cleanup ::tcltest::cleanupTests -- cgit v0.12 From 2f5d313e543bab3894f4059267dfa29d9ce7cad9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 18 Jul 2003 19:51:35 +0000 Subject: * win/tkWinDialog.c: doubled the TK_MULTI_MAX_PATH value to ~10K. This is a short-term solution until the -multiple option is extended. [Bug 641261] --- ChangeLog | 6 ++++++ win/tkWinDialog.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ccceb62..68aa954 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-18 Jeff Hobbs + + * win/tkWinDialog.c: doubled the TK_MULTI_MAX_PATH value to ~10K. + This is a short-term solution until the -multiple option is + extended. [Bug 641261] + 2003-07-18 Donal K. Fellows * tests/panedwindow.test (panedwindow-30.2): diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 327d0ad..7d6c443 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.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: tkWinDialog.c,v 1.30 2003/01/14 01:20:55 mdejong Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.30.2.1 2003/07/18 19:51:35 hobbs Exp $ * */ @@ -119,10 +119,10 @@ static const struct {int type; int btnIds[3];} allowedTypes[] = { * be retrieved with tk_get*File -multiple 1. It must be allocated * on the stack, so make it large enough but not too large. -- hobbs * The data is stored as \0\0\0...\0\0. - * MAX_PATH == 260 on Win2K/NT. + * MAX_PATH == 260 on Win2K/NT, so *40 is ~10K. */ -#define TK_MULTI_MAX_PATH (MAX_PATH*20) +#define TK_MULTI_MAX_PATH (MAX_PATH*40) /* * The following structure is used to pass information between the directory -- cgit v0.12 From fd4e8857c1e474bd6b7012be844f05cc3043a13e Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 19 Jul 2003 01:02:51 +0000 Subject: * win/tkWinCursor.c (TkGetCursorByName): Fix bug 420510 to provide consistency between unix and windows -cursor option. (thoyts) --- win/tkWinCursor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c index 23a7618..742bed9 100644 --- a/win/tkWinCursor.c +++ b/win/tkWinCursor.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: tkWinCursor.c,v 1.10 2002/08/05 04:30:41 dgp Exp $ + * RCS: @(#) $Id: tkWinCursor.c,v 1.10.2.1 2003/07/19 01:02:51 hobbs Exp $ */ #include "tkWinInt.h" @@ -98,7 +98,7 @@ TkGetCursorByName(interp, tkwin, string) if (Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) { return NULL; } - if (argc != 1) { + if (argc == 0) { goto badCursorSpec; } -- cgit v0.12 From 11d740995f0af971a2b7a42c3a30cb29fd3e1255 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 19 Jul 2003 01:03:25 +0000 Subject: * generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for TK_XIM_SPOT usage. [Bug 742660] (takahashi) --- ChangeLog | 6 ++++++ generic/tkEvent.c | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68aa954..b999e1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-07-18 Jeff Hobbs + * generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for + TK_XIM_SPOT usage. [Bug 742660] (takahashi) + + * win/tkWinCursor.c (TkGetCursorByName): Fix bug 420510 to provide + consistency between unix and windows -cursor option. (thoyts) + * win/tkWinDialog.c: doubled the TK_MULTI_MAX_PATH value to ~10K. This is a short-term solution until the -multiple option is extended. [Bug 641261] diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 954f24c..f3b61d6 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.17 2003/02/18 06:22:44 mdejong Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.17.2.1 2003/07/19 01:03:25 hobbs Exp $ */ #include "tkPort.h" @@ -912,8 +912,7 @@ Tk_HandleEvent(eventPtr) XNPreeditAttributes, preedit_attr, NULL); XFree(preedit_attr); - } else -#endif + } else { if (winPtr->inputContext != NULL) panic("inputContext not NULL"); winPtr->inputContext = XCreateIC(dispPtr->inputMethod, @@ -921,6 +920,16 @@ Tk_HandleEvent(eventPtr) XNClientWindow, winPtr->window, XNFocusWindow, winPtr->window, NULL); + } +#else + if (winPtr->inputContext != NULL) + panic("inputContext not NULL"); + winPtr->inputContext = XCreateIC(dispPtr->inputMethod, + XNInputStyle, XIMPreeditNothing|XIMStatusNothing, + XNClientWindow, winPtr->window, + XNFocusWindow, winPtr->window, + NULL); +#endif } } if (XFilterEvent(eventPtr, None)) { -- cgit v0.12 From ca922fad9db6330c595a1bbd3f9dddb4087e8719 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 19 Jul 2003 01:15:31 +0000 Subject: * win/tkWinCursor.c (TkGetCursorByName): Fix bug 420510 to provide consistency between unix and windows -cursor option. --- ChangeLog | 5 +++++ library/scale.tcl | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b999e1a..57681b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-19 Pat Thoyts + + * library/scale.tcl: Fix for bug 706765 to correctly handle the + -sliderrelief option while moving the thumb. + 2003-07-18 Jeff Hobbs * generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for diff --git a/library/scale.tcl b/library/scale.tcl index 76c8cb2..894358e 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scale widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scale.tcl,v 1.9 2002/02/26 01:07:08 hobbs Exp $ +# RCS: @(#) $Id: scale.tcl,v 1.9.2.1 2003/07/19 01:15:32 patthoyts Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -139,6 +139,10 @@ proc ::tk::ScaleButtonDown {w x y} { variable ::tk::Priv set Priv(dragging) 0 set el [$w identify $x $y] + + # save the relief + set Priv($w,relief) [$w cget -sliderrelief] + if {[string equal $el "trough1"]} { ScaleIncrement $w up little initial } elseif {[string equal $el "trough2"]} { @@ -149,7 +153,10 @@ proc ::tk::ScaleButtonDown {w x y} { set coords [$w coords] set Priv(deltaX) [expr {$x - [lindex $coords 0]}] set Priv(deltaY) [expr {$y - [lindex $coords 1]}] - $w configure -sliderrelief sunken + switch -exact -- $Priv($w,relief) { + "raised" { $w configure -sliderrelief sunken } + "ridge" { $w configure -sliderrelief groove } + } } } @@ -181,7 +188,8 @@ proc ::tk::ScaleDrag {w x y} { proc ::tk::ScaleEndDrag {w} { variable ::tk::Priv set Priv(dragging) 0 - $w configure -sliderrelief raised + $w configure -sliderrelief $Priv($w,relief) + unset Priv($w,relief) } # ::tk::ScaleIncrement -- -- cgit v0.12 From 0a8e7328a8ae8606660f497e79afacab3b3456da Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 19 Jul 2003 01:22:14 +0000 Subject: * library/panedwindow.tcl: use widget-specific Priv slots for pwAfterId and panecursor items to correctly handle cursor changes with adjacant panedwindows. --- ChangeLog | 4 ++++ library/panedwindow.tcl | 41 +++++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57681b9..705f211 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ 2003-07-18 Jeff Hobbs + * library/panedwindow.tcl: use widget-specific Priv slots for + pwAfterId and panecursor items to correctly handle cursor changes + with adjacant panedwindows. + * generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for TK_XIM_SPOT usage. [Bug 742660] (takahashi) diff --git a/library/panedwindow.tcl b/library/panedwindow.tcl index fd454be..3298aba 100644 --- a/library/panedwindow.tcl +++ b/library/panedwindow.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk panedwindow widgets and # provides procedures that help in implementing those bindings. # -# RCS: @(#) $Id: panedwindow.tcl,v 1.6 2002/08/08 01:43:31 hobbs Exp $ +# RCS: @(#) $Id: panedwindow.tcl,v 1.6.2.1 2003/07/19 01:22:15 hobbs Exp $ # bind Panedwindow { ::tk::panedwindow::MarkSash %W %x %y 1 } @@ -111,8 +111,8 @@ proc ::tk::panedwindow::Motion {w x y} { set id [$w identify $x $y] if {([llength $id] == 2) && \ (!$::tk_strictMotif || [string equal [lindex $id 1] "handle"])} { - if { ![info exists Priv(panecursor)] } { - set Priv(panecursor) [$w cget -cursor] + if { ![info exists Priv($w,panecursor)] } { + set Priv($w,panecursor) [$w cget -cursor] if { [string equal [$w cget -sashcursor] ""] } { if { [string equal [$w cget -orient] "horizontal"] } { $w configure -cursor sb_h_double_arrow @@ -122,17 +122,17 @@ proc ::tk::panedwindow::Motion {w x y} { } else { $w configure -cursor [$w cget -sashcursor] } - if {[info exists Priv(pwAfterId)]} { - after cancel $Priv(pwAfterId) + if {[info exists Priv($w,pwAfterId)]} { + after cancel $Priv($w,pwAfterId) } - set Priv(pwAfterId) [after 150 \ + set Priv($w,pwAfterId) [after 150 \ [list ::tk::panedwindow::Cursor $w]] } return } - if { [info exists Priv(panecursor)] } { - $w configure -cursor $Priv(panecursor) - unset Priv(panecursor) + if { [info exists Priv($w,panecursor)] } { + $w configure -cursor $Priv($w,panecursor) + unset Priv($w,panecursor) } } @@ -150,15 +150,16 @@ proc ::tk::panedwindow::Motion {w x y} { # proc ::tk::panedwindow::Cursor {w} { variable ::tk::Priv - if {[info exists Priv(panecursor)]} { - if {[winfo containing [winfo pointerx $w] [winfo pointery $w]] == $w} { - set Priv(pwAfterId) [after 150 [list ::tk::panedwindow::Cursor $w]] + if {[info exists Priv($w,panecursor)]} { + if {[winfo containing [winfo pointerx $w] [winfo pointery $w]] eq $w} { + set Priv($w,pwAfterId) [after 150 \ + [list ::tk::panedwindow::Cursor $w]] } else { - $w configure -cursor $Priv(panecursor) - unset Priv(panecursor) - if {[info exists Priv(pwAfterId)]} { - after cancel $Priv(pwAfterId) - unset Priv(pwAfterId) + $w configure -cursor $Priv($w,panecursor) + unset Priv($w,panecursor) + if {[info exists Priv($w,pwAfterId)]} { + after cancel $Priv($w,pwAfterId) + unset Priv($w,pwAfterId) } } } @@ -174,8 +175,8 @@ proc ::tk::panedwindow::Cursor {w} { # Restores the default cursor # proc ::tk::panedwindow::Leave {w} { - if {[info exists ::tk::Priv(panecursor)]} { - $w configure -cursor $::tk::Priv(panecursor) - unset ::tk::Priv(panecursor) + if {[info exists ::tk::Priv($w,panecursor)]} { + $w configure -cursor $::tk::Priv($w,panecursor) + unset ::tk::Priv($w,panecursor) } } -- cgit v0.12 From decaef6f53952951464aa852d46a0ecadf00ca0d Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 19 Jul 2003 01:45:41 +0000 Subject: * unix/tkUnixFont.c (Tk_DrawChars): do not make XGetGeometry call that prevents overwidth lines as it requires a roundtrip call to the X server for every string drawn. Hard-code max width to 32768 until a beter solution to get max width is made. --- ChangeLog | 5 +++++ unix/tkUnixFont.c | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 705f211..0155ac3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ 2003-07-18 Jeff Hobbs + * unix/tkUnixFont.c (Tk_DrawChars): do not make XGetGeometry call + that prevents overwidth lines as it requires a roundtrip call to + the X server for every string drawn. Hard-code max width to 32768 + until a beter solution to get max width is made. + * library/panedwindow.tcl: use widget-specific Priv slots for pwAfterId and panecursor items to correctly handle cursor changes with adjacant panedwindows. diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 82c85bc..d29fd9f 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFont.c,v 1.18.2.1 2003/05/15 18:06:04 hobbs Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.18.2.2 2003/07/19 01:45:42 hobbs Exp $ */ #include "tkUnixInt.h" @@ -1158,19 +1158,21 @@ Tk_DrawChars(display, drawable, gc, tkfont, source, numBytes, x, y) SubFont *thisSubFontPtr, *lastSubFontPtr; Tcl_DString runString; CONST char *p, *end, *next; - int xStart, needWidth, window_width; + int xStart, needWidth, window_width, do_width; Tcl_UniChar ch; FontFamily *familyPtr; +#ifdef TK_DRAW_CHAR_XWINDOW_CHECK int rx, ry; unsigned int width, height, border_width, depth; - int do_width; Drawable root; +#endif fontPtr = (UnixFont *) tkfont; lastSubFontPtr = &fontPtr->subFontArray[0]; xStart = x; +#ifdef TK_DRAW_CHAR_XWINDOW_CHECK /* * Get the window width so we can abort drawing outside of the window */ @@ -1180,6 +1182,13 @@ Tk_DrawChars(display, drawable, gc, tkfont, source, numBytes, x, y) } else { window_width = width; } +#else + /* + * This is used by default until we find a solution that doesn't + * round-trip to the X server (need to get Tk cached window width). + */ + window_width = 32768; +#endif end = source + numBytes; needWidth = fontPtr->font.fa.underline + fontPtr->font.fa.overstrike; -- cgit v0.12 From 27d492af0f1c2bbebe2079b3ff2add4c7908c0b9 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 21 Jul 2003 12:37:08 +0000 Subject: * macosx/buildTkConfig.tcl: fix to TK_BUILD_* ref generation broken by changes to tcl buildsystem. --- ChangeLog | 5 +++++ macosx/buildTkConfig.tcl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0155ac3..3b570cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-20 Daniel Steffen + + * macosx/buildTkConfig.tcl: fix to TK_BUILD_* ref generation + broken by changes to tcl buildsystem. + 2003-07-19 Pat Thoyts * library/scale.tcl: Fix for bug 706765 to correctly handle the diff --git a/macosx/buildTkConfig.tcl b/macosx/buildTkConfig.tcl index 7f1350a..dba0c51 100755 --- a/macosx/buildTkConfig.tcl +++ b/macosx/buildTkConfig.tcl @@ -3,7 +3,7 @@ # Synthesize tkConfig.sh for Mac OS X based # on tclConfig.sh and tkConfig.sh.in # -# RCS: @(#) $Id: buildTkConfig.tcl,v 1.1 2002/09/26 17:07:33 das Exp $ +# RCS: @(#) $Id: buildTkConfig.tcl,v 1.1.2.1 2003/07/21 12:37:08 das Exp $ # # the next line restarts using tclsh \ exec tclsh8.4 "$0" "$@" @@ -27,7 +27,7 @@ proc main {tclConfigFile tkConfigFileIn tkConfigFile} { regsub -line -- "^TK_$var=.*\$" $tkConfig "TK_$var=$val" tkConfig } regsub -line -all -- {@[^@]+@} $tkConfig {} tkConfig - regsub -line -all -- {/[^/]+\.build/Tk.build} $tkConfig {} tkConfig + regsub -line -all -- {(/tk)/(?:Development|Deployment)} $tkConfig {\1} tkConfig regsub -line {^(TK_DEFS=')} $tkConfig {\1 -DMAC_OSX_TK} tkConfig set out [open $tkConfigFile w] -- cgit v0.12 From d7f435293a92864f820af706f86ce8b0f60ccaa9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 21 Jul 2003 22:37:32 +0000 Subject: note 8.4.4 changes and tag date --- ChangeLog | 6 ++++++ changes | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b570cc..025a152 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-21 Jeff Hobbs + + *** 8.4.4 TAGGED FOR RELEASE *** + + * changes: updated for 8.4.4 release + 2003-07-20 Daniel Steffen * macosx/buildTkConfig.tcl: fix to TK_BUILD_* ref generation diff --git a/changes b/changes index 43b9c62..94e1bf2 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.1 2003/05/20 19:34:57 hobbs Exp $ +RCS: @(#) $Id: changes,v 1.64.2.2 2003/07/21 22:37:32 hobbs Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5503,3 +5503,44 @@ what is most often meant, but X really wants the original (-raw) gb2312 encoding. --- Released 8.4.3, May 20, 2002 --- See ChangeLog for details --- + +2003-07-07 (bug fix)[749353] Improve deletion of images on exit. + +2003-07-15 (bug fix)[465324] Fixed complex bug in menu clone cleanup. + +2003-07-15 (bug fix)[755530] Don't test for XCloseIM bug when the XFree86 +version is newer than 4.0 since the layout of the XIM structure has +changed. + +2003-07-16 (bug fix)[748277, 702230, 738143] Numerous panedwindow fixes. +Ensure that the last pane shrinks instead of being clipped when resized +below the reqsize. Ensure that we can share GCs between a panedwindow and +its sash proxy, even if the panedwindow is in a toplevel with a different +visual. Ensure that panedwindows get their geometry right even when their +children don't know their initial size. Use widget-specific Priv slots for +pwAfterId and panecursor items to correctly handle cursor changes with +adjacant panedwindows. + +2003-07-17 (bug fix)[697652] Make sure all options of a frame can be set to +their default value. + +2003-07-17 (bug fix)[404421] Try harder to avoid zero-length mallocs() when +creating images. + +2003-07-17 (feature enhancement) MacOSX build system rewrite. + +2003-07-18 (bug fix) Do not make XGetGeometry call that prevents overwidth +lines drawing on unix as it requires a roundtrip call to the X server for +every string drawn. Hard-code max width to 32768 until a beter solution to +get max width is made. + +2003-07-18 (bug fix)[742660] correct XCreateIC call for TK_XIM_SPOT usage +on unix. + +2003-07-18 (bug fix)[420510] Provide consistency between unix and windows +-cursor option. + +2003-07-19 (bug fix)[706765] Correctly handle the -sliderrelief option +while moving the thumb. + +--- Released 8.4.4, July 22, 2003 --- See ChangeLog for details --- -- cgit v0.12 From 325d3bf1d60abe5c222b729356c0e6424718ad59 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 12 Aug 2003 08:49:39 +0000 Subject: * macosx/tkMacOSXMenu.c: fixed C99'ism that breaks gcc 2.95. --- ChangeLog | 4 ++++ macosx/tkMacOSXMenu.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 025a152..bfa27c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-08-12 Daniel Steffen + + * macosx/tkMacOSXMenu.c: fixed C99'ism that breaks gcc 2.95. + 2003-07-21 Jeff Hobbs *** 8.4.4 TAGGED FOR RELEASE *** diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 6bf92f2..2180bf9 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.1 2003/05/13 02:42:57 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.2 2003/08/12 08:49:39 das Exp $ */ #include "tkMacOSXInt.h" #include "tkMenuButton.h" @@ -2144,8 +2144,9 @@ TkMacOSXDispatchMenuEvent( if ((helpMenuRef != NULL) && (helpMenuRef->menuPtr != NULL)) { MenuRef outHelpMenu; MenuItemIndex itemIndex; + int newIndex; HMGetHelpMenu(&outHelpMenu, &itemIndex); - int newIndex = index - itemIndex; + newIndex = index - itemIndex; result = TkInvokeMenu(currentMenuBarInterp, helpMenuRef->menuPtr, newIndex); } -- cgit v0.12 From 3b3c9c1c3c7745de0f2de35cd4a3a1f4fc109c78 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 13 Aug 2003 10:59:33 +0000 Subject: * library/scale.tcl: Fix for bug #787065 for Button-2 press. * tests/scale.test: Added test for this bug. --- ChangeLog | 5 +++++ library/scale.tcl | 3 ++- tests/scale.test | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bfa27c8..a9f58f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-08-13 Pat Thoyts + + * library/scale.tcl: Fix for bug #787065 for Button-2 press. + * tests/scale.test: Added test for this bug. + 2003-08-12 Daniel Steffen * macosx/tkMacOSXMenu.c: fixed C99'ism that breaks gcc 2.95. diff --git a/library/scale.tcl b/library/scale.tcl index 894358e..cdae3c9 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scale widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scale.tcl,v 1.9.2.1 2003/07/19 01:15:32 patthoyts Exp $ +# RCS: @(#) $Id: scale.tcl,v 1.9.2.2 2003/08/13 10:59:33 patthoyts Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -276,6 +276,7 @@ proc ::tk::ScaleButton2Down {w x y} { $w set [$w get $x $y] set Priv(dragging) 1 set Priv(initValue) [$w get] + set Priv($w,relief) [$w cget -sliderrelief] set coords "$x $y" set Priv(deltaX) 0 set Priv(deltaY) 0 diff --git a/tests/scale.test b/tests/scale.test index fb9ba5d..396ed76 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: scale.test,v 1.12 2002/07/13 20:28:35 dgp Exp $ +# RCS: @(#) $Id: scale.test,v 1.12.2.1 2003/08/13 10:59:33 patthoyts Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -817,6 +817,56 @@ test scale-18.1 {DestroyScale, -cursor option [Bug: 3897]} { destroy .s } {} +test scale-18.2 {Scale button 1 events [Bug 787065]} \ + -setup { + catch {destroy .s} + set y 5 + scale .s -from 0 -to 10 -variable y -orient horizontal -length 150 + pack .s + tkwait visibility .s + set ::error {} + proc bgerror {args} {set ::error $args} + } \ + -body { + list [catch { + event generate .s <1> -x 0 -y 0 + event generate .s -x 0 -y 0 + update + set ::error + } msg] $msg + } \ + -cleanup { + unset ::error + rename bgerror {} + catch {destroy .s} + } \ + -result {0 {}} + +test scale-18.3 {Scale button 2 events [Bug 787065]} \ + -setup { + catch {destroy .s} + set y 5 + scale .s -from 0 -to 10 -variable y -orient horizontal -length 150 + pack .s + tkwait visibility .s + set ::error {} + proc bgerror {args} {set ::error $args} + } \ + -body { + list [catch { + event generate .s <2> -x 0 -y 0 + event generate .s -x 0 -y 0 + update + set ::error + } msg] $msg + } \ + -cleanup { + unset ::error + rename bgerror {} + catch {destroy .s} + } \ + -result {0 {}} + catch {destroy .s} option clear -- cgit v0.12 From 0ddd7518115e5c1fd63e8b56a674493a4d89a065 Mon Sep 17 00:00:00 2001 From: jenglish Date: Tue, 19 Aug 2003 21:00:11 +0000 Subject: * generic/tkPanedWindow.c(PanedWindowWorldChanged): Set window background from the -background resource. Fixes [BUG #791500 "PanedWindow refresh glitches on X"] --- ChangeLog | 5 +++++ generic/tkPanedWindow.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9f58f9..1536d67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-08-19 Joe English + * generic/tkPanedWindow.c(PanedWindowWorldChanged): + Set window background from the -background resource. + Fixes [BUG #791500 "PanedWindow refresh glitches on X"] + 2003-08-13 Pat Thoyts * library/scale.tcl: Fix for bug #787065 for Button-2 press. diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index c0385af..07000c3 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.3 2003/07/18 09:53:16 dkf Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.13.2.4 2003/08/19 21:00:13 jenglish Exp $ */ #include "tkPort.h" @@ -1224,7 +1224,7 @@ PanedWindowWorldChanged(instanceData) /* * Allocated a graphics context for drawing the paned window widget - * elements (background, sashes, etc.). + * elements (background, sashes, etc.) and set the window background. */ gcValues.background = Tk_3DBorderColor(pwPtr->background)->pixel; @@ -1233,6 +1233,7 @@ PanedWindowWorldChanged(instanceData) Tk_FreeGC(pwPtr->display, pwPtr->gc); } pwPtr->gc = newGC; + Tk_SetWindowBackground(pwPtr->tkwin, gcValues.background); /* * Issue geometry size requests to Tk. -- cgit v0.12 From b789bd9bde8fcc02d873ec79094b914aa2627fbc Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Sep 2003 23:45:05 +0000 Subject: * generic/tkImage.c: Stopped [image create] from generating an * tests/image.test: image command name that would overwrite an existing command name. Thanks to Michael Schlenker. [Bug 808039]. --- ChangeLog | 6 ++++++ generic/tkImage.c | 11 +++++++---- tests/image.test | 14 +++++++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1536d67..2e46497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-09-17 Don Porter + + * generic/tkImage.c: Stopped [image create] from generating an + * tests/image.test: image command name that would overwrite an + existing command name. Thanks to Michael Schlenker. [Bug 808039]. + 2003-08-19 Joe English * generic/tkPanedWindow.c(PanedWindowWorldChanged): Set window background from the -background resource. diff --git a/generic/tkImage.c b/generic/tkImage.c index 78e2a56..d813c96 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkImage.c,v 1.19.2.1 2003/07/07 09:43:01 dkf Exp $ + * RCS: @(#) $Id: tkImage.c,v 1.19.2.2 2003/09/17 23:45:05 dgp Exp $ */ #include "tkInt.h" @@ -233,9 +233,12 @@ Tk_ImageObjCmd(clientData, interp, objc, objv) */ if ((objc == 3) || (*(arg = Tcl_GetString(objv[3])) == '-')) { - dispPtr->imageId++; - sprintf(idString, "image%d", dispPtr->imageId); - name = idString; + Tcl_CmdInfo dummy; + do { + dispPtr->imageId++; + sprintf(idString, "image%d", dispPtr->imageId); + name = idString; + } while (Tcl_GetCommandInfo(interp, name, &dummy) != 0); firstOption = 3; } else { TkWindow *topWin; diff --git a/tests/image.test b/tests/image.test index dd5d3dd..7e35f9a 100644 --- a/tests/image.test +++ b/tests/image.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: image.test,v 1.8 2003/01/22 14:32:59 dkf Exp $ +# RCS: @(#) $Id: image.test,v 1.8.2.1 2003/09/17 23:45:05 dgp Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -93,6 +93,18 @@ test image-1.11 {Tk_ImageCmd procedure, "create" option with same name as main w removeFile script set x } {0 {1 {images may not be named the same as the main window}}} +test image-1.11 {Tk_ImageCmd, "create" option: do not generated command name in use} -setup { + set i [image create bitmap] + regexp {^image(\d+)$} $i -> serial + incr serial + proc image$serial {} {return works} + set j [image create bitmap] +} -body { + image$serial +} -cleanup { + rename image$serial {} + image delete $i $j +} -result works test image-2.1 {Tk_ImageCmd procedure, "delete" option} { list [catch {image delete} msg] $msg -- cgit v0.12 From 9a0aa47ac345a885549c42ece41c68c066c15d58 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 25 Sep 2003 05:37:48 +0000 Subject: * library/demos/widget: don't create iconwindow on aqua, but add about menu like on classic. * macosx/Makefile: pass MAKEOVERRIDES to pxbuild. * macosx/tkMacOSXButton.c: added -compound support for bevel buttons. --- ChangeLog | 13 ++++++++++--- library/demos/widget | 6 +++--- macosx/Makefile | 4 ++-- macosx/tkMacOSXButton.c | 22 +++++++++++++++++++++- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e46497..41d2d3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2003-09-25 Daniel Steffen + + * library/demos/widget: don't create iconwindow on aqua, but add + about menu like on classic. + * macosx/Makefile: pass MAKEOVERRIDES to pxbuild. + * macosx/tkMacOSXButton.c: added -compound support for bevel buttons. + 2003-09-17 Don Porter - * generic/tkImage.c: Stopped [image create] from generating an - * tests/image.test: image command name that would overwrite an - existing command name. Thanks to Michael Schlenker. [Bug 808039]. + * generic/tkImage.c: Stopped [image create] from generating an + * tests/image.test: image command name that would overwrite an + existing command name. Thanks to Michael Schlenker. [Bug 808039]. 2003-08-19 Joe English * generic/tkPanedWindow.c(PanedWindowWorldChanged): diff --git a/library/demos/widget b/library/demos/widget index 33c7843..7795851 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -11,11 +11,11 @@ exec wish "$0" "$@" # ".tcl" files is this directory, which are sourced by this script # as needed. # -# RCS: @(#) $Id: widget,v 1.9 2003/02/19 16:13:15 dkf Exp $ +# RCS: @(#) $Id: widget,v 1.9.2.1 2003/09/25 05:37:48 das Exp $ eval destroy [winfo child .] wm title . "Widget Demonstration" -if {$tcl_platform(platform) eq "unix"} { +if {[tk windowingsystem] eq "x11"} { # This won't work everywhere, but there's no other way in core Tk # at the moment to display a coloured icon. image create photo TclPowered \ @@ -47,7 +47,7 @@ menu .menuBar -tearoff 0 menu .menuBar.file -tearoff 0 # On the Mac use the specia .apple menu for the about item -if {[string equal [tk windowingsystem] "classic"]} { +if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} { .menuBar add cascade -menu .menuBar.apple menu .menuBar.apple -tearoff 0 .menuBar.apple add command -label "About..." -command "aboutBox" diff --git a/macosx/Makefile b/macosx/Makefile index bb5adf6..e4f029a 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -3,7 +3,7 @@ # Simple makefile for building on Mac OS X with the # Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7.2.2 2003/07/18 01:06:33 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.3 2003/09/25 05:37:48 das Exp $ # ################################################################################ @@ -25,7 +25,7 @@ PBXBUILD = /usr/bin/pbxbuild BUILD = ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \ TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \ - TCLSH_DIR="${TCLSH_DIR}" + TCLSH_DIR="${TCLSH_DIR}" ${MAKEOVERRIDES} DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 2366e01..749b4ef 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.2 2003/04/30 16:19:07 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.3 2003/09/25 05:37:48 das Exp $ */ #include "tkButton.h" @@ -1171,6 +1171,26 @@ SetupBevelButton( "SetControlData BevelButtonGraphicAlign failed, %d\n", err ); } + if (butPtr->compound != COMPOUND_NONE) { + ControlButtonTextPlacement thePlacement = \ + kControlBevelButtonPlaceNormally; + if (butPtr->compound == COMPOUND_TOP) { + thePlacement = kControlBevelButtonPlaceBelowGraphic; + } else if (butPtr->compound == COMPOUND_BOTTOM) { + thePlacement = kControlBevelButtonPlaceAboveGraphic; + } else if (butPtr->compound == COMPOUND_LEFT) { + thePlacement = kControlBevelButtonPlaceToRightOfGraphic; + } else if (butPtr->compound == COMPOUND_RIGHT) { + thePlacement = kControlBevelButtonPlaceToLeftOfGraphic; + } + if ((err=SetControlData(controlHandle, kControlButtonPart, + kControlBevelButtonTextPlaceTag, + sizeof(ControlButtonTextPlacement), + (char *) &thePlacement)) != noErr ) { + fprintf(stderr, + "SetControlData BevelButtonTextPlace failed, %d\n", err ); + } + } } /* -- cgit v0.12 From 83f9d12aa84524eda922d520d77728f5d8b489ca Mon Sep 17 00:00:00 2001 From: cc_benny Date: Fri, 26 Sep 2003 16:18:18 +0000 Subject: * macosx/tkMacOSXWm.c (TkWmStackorderToplevelWrapperMap): Add GetWindowFromPort() [Bug #812415]; make function static. --- ChangeLog | 5 +++++ macosx/tkMacOSXWm.c | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41d2d3d..31d86f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 Benjamin Riefenstahl + + * macosx/tkMacOSXWm.c (TkWmStackorderToplevelWrapperMap): Add + GetWindowFromPort() [Bug #812415]; make function static. + 2003-09-25 Daniel Steffen * library/demos/widget: don't create iconwindow on aqua, but add diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index bad9c47..aa00e3a 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7 2003/02/25 16:09:29 das Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.1 2003/09/26 16:19:52 cc_benny Exp $ */ #include @@ -72,6 +72,8 @@ static int ParseGeometry _ANSI_ARGS_((Tcl_Interp *interp, char *string, TkWindow *winPtr)); static void TopLevelEventProc _ANSI_ARGS_((ClientData clientData, XEvent *eventPtr)); +static void TkWmStackorderToplevelWrapperMap _ANSI_ARGS_(( + TkWindow *winPtr, Tcl_HashTable *table)); static void TopLevelReqProc _ANSI_ARGS_((ClientData dummy, Tk_Window tkwin)); static void UpdateGeometryInfo _ANSI_ARGS_(( @@ -5408,21 +5410,21 @@ TkpChangeFocus(winPtr, force) * *---------------------------------------------------------------------- */ -void +static void TkWmStackorderToplevelWrapperMap(winPtr, table) TkWindow *winPtr; /* TkWindow to recurse on */ Tcl_HashTable *table; /* Maps mac window to TkWindow */ { TkWindow *childPtr; Tcl_HashEntry *hPtr; - void *wrapper; + WindowRef macWindow; int newEntry; if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr)) { - wrapper = (void *) TkMacOSXGetDrawablePort(winPtr->window); + macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); hPtr = Tcl_CreateHashEntry(table, - (char *) wrapper, &newEntry); + (const char *) macWindow, &newEntry); Tcl_SetHashValue(hPtr, winPtr); } -- cgit v0.12 From 168fe5dd9174a0db2bf0b8619b59d9315281eed5 Mon Sep 17 00:00:00 2001 From: cc_benny Date: Fri, 26 Sep 2003 17:20:16 +0000 Subject: * tkMacOSXWm.h: Nested comment typo --- macosx/tkMacOSXWm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h index eaa0dd5..fb17959 100644 --- a/macosx/tkMacOSXWm.h +++ b/macosx/tkMacOSXWm.h @@ -1,5 +1,4 @@ /* -/* * tkMacOSXWm.h -- * * Declarations of Macintosh specific functions for implementing the -- cgit v0.12 From b3ec66c29e8fb666e39d76bd1a169d365361a985 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 29 Sep 2003 09:22:22 +0000 Subject: Added note to make it clear that frameworks are an OSX feature [Bug 619440] --- ChangeLog | 9 +++++++-- unix/tcl.m4 | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31d86f4..5bf09c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2003-09-29 Donal K. Fellows + + * unix/tcl.m4 (SC_ENABLE_FRAMEWORK): Added note to make it clearer + that this is an OSX feature, not a general Unix feature. [Bug 619440] + 2003-09-26 Benjamin Riefenstahl - * macosx/tkMacOSXWm.c (TkWmStackorderToplevelWrapperMap): Add - GetWindowFromPort() [Bug #812415]; make function static. + * macosx/tkMacOSXWm.c (TkWmStackorderToplevelWrapperMap): Add + GetWindowFromPort() [Bug #812415]; make function static. 2003-09-25 Daniel Steffen diff --git a/unix/tcl.m4 b/unix/tcl.m4 index e407792..adcaf98 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -354,7 +354,7 @@ AC_DEFUN(SC_ENABLE_SHARED, [ AC_DEFUN(SC_ENABLE_FRAMEWORK, [ AC_MSG_CHECKING([how to package libraries]) AC_ARG_ENABLE(framework, - [ --enable-framework package shared libraries in frameworks [--disable-framework]], + [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]], [tcl_ok=$enableval], [tcl_ok=no]) if test "${enable_framework+set}" = set; then -- cgit v0.12 From 9d4eef9915ff4fe5f2f9c209c5b100769515897f Mon Sep 17 00:00:00 2001 From: das Date: Wed, 1 Oct 2003 14:35:39 +0000 Subject: * macosx/Wish.pbproj/project.pbxproj: * macosx/Makefile: fixed redo prebinding bug when DESTDIR="". Added support for all applicable customizable makefile variables from tcl/macosx/Makefile. * macosx/README: * macosx/Wish.pbproj/project.pbxproj: ensure that the versioned wishX.X script works correctly when Tk.framework with multiple versions is present by referring to a copy of 'Wish Shell.app' located in Tk.framework/Versions/X.X/Resources. --- ChangeLog | 13 +++++++++ macosx/Makefile | 59 +++++++++++++++++++++++++------------- macosx/README | 7 ++--- macosx/Wish.pbproj/project.pbxproj | 13 +++++---- 4 files changed, 63 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5bf09c9..e9d0c40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2003-10-01 Daniel Steffen + + * macosx/Wish.pbproj/project.pbxproj: + * macosx/Makefile: fixed redo prebinding bug when DESTDIR="". + Added support for all applicable customizable makefile variables + from tcl/macosx/Makefile. + + * macosx/README: + * macosx/Wish.pbproj/project.pbxproj: ensure that the versioned + wishX.X script works correctly when Tk.framework with multiple + versions is present by referring to a copy of 'Wish Shell.app' + located in Tk.framework/Versions/X.X/Resources. + 2003-09-29 Donal K. Fellows * unix/tcl.m4 (SC_ENABLE_FRAMEWORK): Added note to make it clearer diff --git a/macosx/Makefile b/macosx/Makefile index e4f029a..9aa832f 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -1,38 +1,57 @@ ################################################################################ # -# Simple makefile for building on Mac OS X with the -# Project Builder command line tool 'pbxbuild' +# Makefile to build AquaTk on Mac OS X packaged as a Framework +# uses Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7.2.3 2003/09/25 05:37:48 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.4 2003/10/01 14:35:39 das Exp $ # ################################################################################ -INSTALL_ROOT ?= +#------------------------------------------------------------------------------- +# customizable settings -BUILD_DIR ?= ${CURDIR}/../../build -SYMROOT ?= ${BUILD_DIR}/${PROJECT} +DESTDIR ?= +INSTALL_ROOT ?= ${DESTDIR} + +BUILD_DIR ?= ${CURDIR}/../../build +SYMROOT ?= ${BUILD_DIR}/${PROJECT} +OBJROOT ?= ${SYMROOT} + +EXTRA_MAKE_ARGS ?= + +INSTALL_PATH ?= /Library/Frameworks +APPLICATION_INSTALL_PATH ?= /Applications/Utilities + +PREFIX ?= /usr +BINDIR ?= ${PREFIX}/bin TCL_FRAMEWORK_DIR ?= ${BUILD_DIR}/tcl -TCLSH_DIR ?= ${TCL_FRAMEWORK_DIR} +TCLSH_DIR ?= ${TCL_FRAMEWORK_DIR} + +#------------------------------------------------------------------------------- + +PROJECT = tk +TARGET = Wish -PROJECT = tk -TARGET = Wish +DEVBUILDSTYLE = Development +DEPBUILDSTYLE = Deployment -DEVBUILDSTYLE = Development -DEPBUILDSTYLE = Deployment +PBXBUILD = /usr/bin/pbxbuild -PBXBUILD = /usr/bin/pbxbuild +MAKE_VARS := SYMROOT OBJROOT BINDIR APPLICATION_INSTALL_PATH \ + TCL_FRAMEWORK_DIR TCLSH_DIR +MAKE_ARGS_V = $(foreach v,${MAKE_VARS},$v=${$v}) -BUILD = ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \ - TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \ - TCLSH_DIR="${TCLSH_DIR}" ${MAKEOVERRIDES} +BUILD = ${PBXBUILD} -target "${TARGET}" ${MAKE_ARGS_V} \ + DYLIB_INSTALL_PATH="${INSTALL_PATH}" \ + ${EXTRA_MAKE_ARGS} ${MAKEOVERRIDES} -DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" -DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" +DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" +DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" -INSTALLOPTS = INSTALL_ROOT="${INSTALL_ROOT}" +INSTALLOPTS = INSTALL_ROOT="${INSTALL_ROOT}" -EMBEDDEDOPTS = EMBEDDED_BUILD=1 +EMBEDDEDOPTS = EMBEDDED_BUILD=1 ################################################################################ @@ -81,7 +100,7 @@ clean-deploy: ################################################################################ cleanup-embedded: - @-cd ${INSTALL_ROOT}; \ + @-cd ${INSTALL_ROOT}/; \ chmod -RH u+w Library/Frameworks/Tcl.framework; \ rm -rf Library/Frameworks/Tcl.framework; \ chmod -RH u+w Library/Frameworks/Tk.framework; \ diff --git a/macosx/README b/macosx/README index 65380e1..07302c0 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ TclTkAqua README ---------------- -RCS: @(#) $Id: README,v 1.6.2.2 2003/07/18 01:06:33 das Exp $ +RCS: @(#) $Id: README,v 1.6.2.3 2003/10/01 14:35:39 das Exp $ This is the README file for the Mac OS X native versions of Tcl & Tk. @@ -70,9 +70,8 @@ system's standard framework directories: /Network/Library/Frameworks /System/Library/Frameworks and 'Wish Shell' as well as /usr/bin/tclsh will work. -- /usr/bin/wish is a script that calls 'Wish Shell' in its default location - /Applications/Utilities/Wish Shell.app -it will break if 'Wish Shell' is moved. +- /usr/bin/wish is a script that calls a copy of 'Wish Shell' contained in + Tk.framework/Resources - if 'Wish Shell' is started from the Finder or via 'open', $argv contains a "-psn_XXXX" argument. This is the Wish's carbon process serial number, you may diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 8b1daed..9c4fcc7 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -2880,11 +2880,14 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright F5877FBD031FAC6A016F146B, ); buildSettings = { + APPLICATION_INSTALL_PATH = "${SYSTEM_ADMIN_APPS_DIR}"; + BINDIR = /usr/bin; + DYLIB_INSTALL_PATH = /Library/Frameworks; FRAMEWORK_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)\" \"$(SYMROOT)\""; FRAMEWORK_VERSION = 8.4; GLOBAL_CFLAGS = "`source \"${TCL_FRAMEWORK_DIR}/Tcl.framework/tclConfig.sh\"; echo $${}{TCL_EXTRA_CFLAGS} $${}{TCL_DEFS} | sed -e 's|\\\\\\\\\\\\\\\"|\\\"|g' | sed -e 's| -DTCL_WIDE_INT_TYPE=long. long||'` -U_REENTRANT"; HEADER_SEARCH_PATHS = "\"$(TCL_FRAMEWORK_DIR)/Tcl.framework/Headers\" \"$(TCL_FRAMEWORK_DIR)/Tcl.framework/PrivateHeaders\" ../generic ../xlib"; - INSTALL_PATH = /Applications/Utilities; + INSTALL_PATH = "${APPLICATION_INSTALL_PATH}"; LIBRARY_SEARCH_PATHS = ""; OPTIMIZATION_CFLAGS = "-O0"; OTHER_CFLAGS = "-DMAC_OSX_TK -DTCL_WIDE_INT_TYPE=\"long long\""; @@ -3141,7 +3144,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents\"\n\n# if we are embedding frameworks, copy them into the app\nrm -rf \"Frameworks\"\nmkdir -p \"Frameworks\"\nif [ \"${DEPLOYMENT_LOCATION:-}\" = \"YES\" -o \"${ACTION}\" = \"install\" ]; then\n FWKDIR=\"${INSTALL_ROOT}/Library/Frameworks\"\nelse\n FWKDIR=\"${TARGET_BUILD_DIR}\"\nfi\ncp -fRPH \"${FWKDIR}/Tcl.framework\" \"Frameworks\"\ncp -fRPH \"${FWKDIR}/Tk.framework\" \"Frameworks\"\n\n# fix install names when embedding\nfix_install_id ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -id $(otool -L \"$1\" | awk \"/$(basename \"$1\")\\.framework.*[^:]\\$/ {sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_name ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -change $(otool -L \"$1\" | awk \"/$2\\.framework.*[^:]\\$/ {print \\$1; sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_id Frameworks/Tcl.framework/Tcl\nfix_install_id Frameworks/Tk.framework/Tk\nfix_install_name Frameworks/Tk.framework/Tk Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tk\n\nfi"; + shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\ncd \"${TARGET_BUILD_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents\"\n\n# if we are embedding frameworks, copy them into the app\nrm -rf \"Frameworks\"\nmkdir -p \"Frameworks\"\nif [ \"${DEPLOYMENT_LOCATION:-}\" = \"YES\" -o \"${ACTION}\" = \"install\" ]; then\n FWKDIR=\"${INSTALL_ROOT}${DYLIB_INSTALL_PATH}\"\nelse\n FWKDIR=\"${TARGET_BUILD_DIR}\"\nfi\ncp -fpRPH \"${FWKDIR}/Tcl.framework\" \"Frameworks\"\ncp -fpRPH \"${FWKDIR}/Tk.framework\" \"Frameworks\"\n\n# fix install names when embedding\nfix_install_id ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -id $(otool -L \"$1\" | awk \"/$(basename \"$1\")\\.framework.*[^:]\\$/ {sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_name ( ) {\n chmod -RH a+w \"$1\"\n install_name_tool -change $(otool -L \"$1\" | awk \"/$2\\.framework.*[^:]\\$/ {print \\$1; sub(\\\"^.*/Frameworks\\\",\\\"@executable_path/../Frameworks\\\",\\$1); print \\$1}\") \"$1\"\n chmod -RH a-w \"$1\" \n}\nfix_install_id Frameworks/Tcl.framework/Tcl\nfix_install_id Frameworks/Tk.framework/Tk\nfix_install_name Frameworks/Tk.framework/Tk Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tcl\nfix_install_name \"MacOS/${PRODUCT_NAME}\" Tk\n\nfi"; }; F55BC46802B2D38B01DC9062 = { fileEncoding = 5; @@ -3191,7 +3194,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}/${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}/${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nfi"; + shellScript = "# ensure we can overwrite a previous install\nif [ -d \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\" ]; then\n chmod -RH u+w \"${INSTALL_ROOT}${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}\"\nfi"; }; F5877FB8031F982D016F146B = { buildActionMask = 8; @@ -3229,7 +3232,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nif [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# fix permissions on uninstalled products\nchmod a+w \"${TEMP_ROOT}/UninstalledProducts\"\nchmod a+w \"${TEMP_ROOT}\"/UninstalledProducts/libtkstub*.a"; + shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}/\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nif [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\nredo_prebinding -r . \"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Versions/${FRAMEWORK_VERSION}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# fix permissions on uninstalled products\nchmod a+w \"${TEMP_ROOT}/UninstalledProducts\"\nchmod a+w \"${TEMP_ROOT}\"/UninstalledProducts/libtkstub*.a"; }; F5877FBD031FAC6A016F146B = { buildActionMask = 8; @@ -3242,7 +3245,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# redo prebinding\ncd \"${INSTALL_ROOT}\"\nEXECUTABLE_DIR=\"./${INSTALL_PATH}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}/Contents/MacOS\"\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\n if [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\n if [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\n if [ ! -d Library/Frameworks/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework Library/Frameworks; RM_TCL=1; fi\n PREBIND_OPTS=\"-r .\"\nfi\nredo_prebinding ${PREBIND_OPTS:-} -e \"${EXECUTABLE_DIR}\" \"${EXECUTABLE_DIR}/${PRODUCT_NAME}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# install wish script & symbolic links\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nrm -f \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\"\ncat > \"${INSTALL_ROOT}/usr/bin/wish${FRAMEWORK_VERSION}\" <&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\nif [ -n \"${RM_TCL:-}\" ]; then rm -f Library/Frameworks/Tcl.framework; fi\n\n# copy Wish.app into framework, install wish script & symbolic link\nif [ -z \"${EMBEDDED_BUILD:-}\" ]; then\nrm -rf \"./${FWK_RSRC_DIR}/${APP_DIR}\"\ncp -fpRPH \"./${INSTALL_PATH}/${APP_DIR}\" \"./${FWK_RSRC_DIR}\"\nmkdir -p \"./${BINDIR}\"\nrm -f \"./${BINDIR}/wish${FRAMEWORK_VERSION}\"\ncat > \"./${BINDIR}/wish${FRAMEWORK_VERSION}\" < Date: Fri, 3 Oct 2003 00:42:17 +0000 Subject: * library/scale.tcl: Clear bug with chording mouse buttons. --- ChangeLog | 4 ++++ library/scale.tcl | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9d0c40..8b044ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-10-03 Pat Thoyts + + * library/scale.tcl: Clear bug with chording mouse buttons. + 2003-10-01 Daniel Steffen * macosx/Wish.pbproj/project.pbxproj: diff --git a/library/scale.tcl b/library/scale.tcl index cdae3c9..4373434 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scale widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scale.tcl,v 1.9.2.2 2003/08/13 10:59:33 patthoyts Exp $ +# RCS: @(#) $Id: scale.tcl,v 1.9.2.3 2003/10/03 00:42:17 patthoyts Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -188,8 +188,10 @@ proc ::tk::ScaleDrag {w x y} { proc ::tk::ScaleEndDrag {w} { variable ::tk::Priv set Priv(dragging) 0 - $w configure -sliderrelief $Priv($w,relief) - unset Priv($w,relief) + if {[info exists Priv($w,relief)]} { + $w configure -sliderrelief $Priv($w,relief) + unset Priv($w,relief) + } } # ::tk::ScaleIncrement -- -- cgit v0.12 From acfbb6ac86830513ec37ce001e991a8264abc53a Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 3 Oct 2003 16:32:39 +0000 Subject: * README: Bumped to patch level 8.4.5 * generic/tk.h: to prepare for next patch * macosx/Wish.pbproj/project.pbxproj: release. * unix/configure.in: * unix/tk.spec: * win/configure.in: * unix/configure: autoconf (2.13) * win/configure: --- ChangeLog | 12 ++++++++++++ README | 4 ++-- generic/tk.h | 6 +++--- macosx/Wish.pbproj/project.pbxproj | 8 ++++---- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tk.spec | 6 +++--- win/configure | 2 +- win/configure.in | 4 ++-- 9 files changed, 30 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b044ba..121bff3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2003-10-03 Don Porter + + * README: Bumped to patch level 8.4.5 + * generic/tk.h: to prepare for next patch + * macosx/Wish.pbproj/project.pbxproj: release. + * unix/configure.in: + * unix/tk.spec: + * win/configure.in: + + * unix/configure: autoconf (2.13) + * win/configure: + 2003-10-03 Pat Thoyts * library/scale.tcl: Clear bug with chording mouse buttons. diff --git a/README b/README index e4b71de..bfae72e 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.4.4 source distribution. + This is the Tk 8.4.5 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.39.2.2 2003/07/15 22:46:34 dgp Exp $ +RCS: @(#) $Id: README,v 1.39.2.3 2003/10/03 16:32:39 dgp Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index 907fbeb..1f7b530 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74.2.2 2003/07/15 22:46:35 dgp Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.3 2003/10/03 16:32:39 dgp Exp $ */ #ifndef _TK @@ -50,10 +50,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 4 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 4 +#define TK_RELEASE_SERIAL 5 #define TK_VERSION "8.4" -#define TK_PATCH_LEVEL "8.4.4" +#define TK_PATCH_LEVEL "8.4.5" /* * The following definitions set up the proper options for Macintosh diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 9c4fcc7..1d6779f 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1565,11 +1565,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType FMWK CFBundleShortVersionString - 8.4.4 + 8.4.5 CFBundleSignature WiSH CFBundleVersion - 8.4.4 + 8.4.5 "; @@ -2948,11 +2948,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType APPL CFBundleShortVersionString - 8.4.4 + 8.4.5 CFBundleSignature WiSH CFBundleVersion - 8.4.4 + 8.4.5 "; diff --git a/unix/configure b/unix/configure index c88e410..5a90484 100755 --- a/unix/configure +++ b/unix/configure @@ -547,7 +547,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".4" +TK_PATCH_LEVEL=".5" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/configure.in b/unix/configure.in index c189fba..5b4a199 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.2 2003/07/15 22:46:35 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.3 2003/10/03 16:32:39 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".4" +TK_PATCH_LEVEL=".5" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/tk.spec b/unix/tk.spec index f2736e5..a478bdc 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.15.2.2 2003/07/15 22:46:35 dgp Exp $ +# $Id: tk.spec,v 1.15.2.3 2003/10/03 16:32:39 dgp Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.4.4 +%define version 8.4.5 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: http://www.tcl.tk/ Packager: Carina Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.4 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.5 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure b/win/configure index a96f760..4b0150b 100755 --- a/win/configure +++ b/win/configure @@ -536,7 +536,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".4" +TK_PATCH_LEVEL=".5" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index f18717b..ad21f02 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.4 2003/07/15 22:46:35 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.5 2003/10/03 16:32:40 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".4" +TK_PATCH_LEVEL=".5" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From c2fb1be822c7ca6b052ea2934a05bbf13461ef91 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Oct 2003 15:27:31 +0000 Subject: * unix/configure.in: Added check that version of Tcl header found by configure matches that of the Tk we wish to build. As long as the Tk sources insist on lockstep releases, Tk's configuration should verify that's what we have. [Bug 749088] * unix/configure: autoconf (2.13) --- ChangeLog | 9 ++ unix/configure | 274 ++++++++++++++++++++++++++++-------------------------- unix/configure.in | 8 +- 3 files changed, 156 insertions(+), 135 deletions(-) diff --git a/ChangeLog b/ChangeLog index 121bff3..aac890b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-10-06 Don Porter + + * unix/configure.in: Added check that version of Tcl header found + by configure matches that of the Tk we wish to build. As long as + the Tk sources insist on lockstep releases, Tk's configuration should + verify that's what we have. [Bug 749088] + + * unix/configure: autoconf (2.13) + 2003-10-03 Don Porter * README: Bumped to patch level 8.4.5 diff --git a/unix/configure b/unix/configure index 5a90484..45a2189 100755 --- a/unix/configure +++ b/unix/configure @@ -1813,13 +1813,19 @@ echo "configure:1768: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +if test "${TCL_VERSION}" != "${TK_VERSION}"; then + { echo "configure: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." 1>&2; exit 1; } +fi + #-------------------------------------------------------------------- # Recompute the necessary flags to run the compiler #-------------------------------------------------------------------- echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1823: checking how to build libraries" >&5 +echo "configure:1829: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -1852,7 +1858,7 @@ EOF # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1856: checking for $ac_word" >&5 +echo "configure:1862: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1884,7 +1890,7 @@ fi # Step 0.a: Enable 64 bit support? echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 -echo "configure:1888: checking if 64bit support is requested" >&5 +echo "configure:1894: checking if 64bit support is requested" >&5 # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then enableval="$enable_64bit" @@ -1904,7 +1910,7 @@ fi # Step 0.b: Enable Solaris 64 bit VIS support? echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:1908: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:1914: checking if 64bit Sparc VIS support is requested" >&5 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then enableval="$enable_64bit_vis" @@ -1928,7 +1934,7 @@ fi # there are a few systems, like Next, where this doesn't work. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -echo "configure:1932: checking system version (for dynamic loading)" >&5 +echo "configure:1938: checking system version (for dynamic loading)" >&5 if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else @@ -1954,7 +1960,7 @@ echo "configure:1932: checking system version (for dynamic loading)" >&5 # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1958: checking for dlopen in -ldl" >&5 +echo "configure:1964: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1962,7 +1968,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2021,7 +2027,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2025: checking for $ac_word" >&5 +echo "configure:2031: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2150,7 +2156,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2154: checking for gettimeofday in -lbsd" >&5 +echo "configure:2160: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2158,7 +2164,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2259,7 +2265,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2263: checking for shl_load in -ldld" >&5 +echo "configure:2269: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2267,7 +2273,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2346,7 +2352,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2350: checking for shl_load in -ldld" >&5 +echo "configure:2356: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2354,7 +2360,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2492,17 +2498,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2496: checking for dld.h" >&5 +echo "configure:2502: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2567,17 +2573,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2571: checking for dld.h" >&5 +echo "configure:2577: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2635,17 +2641,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2639: checking for dlfcn.h" >&5 +echo "configure:2645: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2673,9 +2679,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2677: checking for ELF" >&5 +echo "configure:2683: checking for ELF" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3037: checking for ld accepts -Bexport flag" >&5 +echo "configure:3043: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -3090,9 +3096,9 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3094: checking sys/exec.h" >&5 +echo "configure:3100: checking sys/exec.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3110,7 +3116,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3128,9 +3134,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3132: checking a.out.h" >&5 +echo "configure:3138: checking a.out.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3148,7 +3154,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3166,9 +3172,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3170: checking sys/exec_aout.h" >&5 +echo "configure:3176: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3186,7 +3192,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3338,7 +3344,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3342: checking for build with symbols" >&5 +echo "configure:3348: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -3412,12 +3418,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:3416: checking for sin" >&5 +echo "configure:3422: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -3461,7 +3467,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:3465: checking for main in -lieee" >&5 +echo "configure:3471: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3469,14 +3475,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3507,7 +3513,7 @@ fi libbsd=no if test "`uname -s`" = "AIX" ; then echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:3511: checking for gettimeofday in -lbsd" >&5 +echo "configure:3517: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3515,7 +3521,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3557,9 +3563,9 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6 -echo "configure:3561: checking stdlib.h" >&5 +echo "configure:3567: checking stdlib.h" >&5 cat > conftest.$ac_ext < EOF @@ -3574,7 +3580,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3588,7 +3594,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3620,16 +3626,16 @@ echo "$ac_t""$tk_ok" 1>&6 #-------------------------------------------------------------------- echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6 -echo "configure:3624: checking fd_set and sys/select" >&5 +echo "configure:3630: checking fd_set and sys/select" >&5 cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -3641,7 +3647,7 @@ fi rm -f conftest* if test $tk_ok = no; then cat > conftest.$ac_ext < EOF @@ -3673,12 +3679,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3677: checking for ANSI C header files" >&5 +echo "configure:3683: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3686,7 +3692,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3703,7 +3709,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3721,7 +3727,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3742,7 +3748,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3753,7 +3759,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3777,12 +3783,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3781: checking for mode_t" >&5 +echo "configure:3787: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3810,12 +3816,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3814: checking for pid_t" >&5 +echo "configure:3820: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3843,12 +3849,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3847: checking for size_t" >&5 +echo "configure:3853: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3876,12 +3882,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3880: checking for uid_t in sys/types.h" >&5 +echo "configure:3886: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3918,17 +3924,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3922: checking for $ac_hdr" >&5 +echo "configure:3928: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3955,12 +3961,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3959: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3965: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3969,7 +3975,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3995,16 +4001,16 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:3999: checking pw_gecos in struct pwd" >&5 +echo "configure:4005: checking pw_gecos in struct pwd" >&5 cat > conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -4037,7 +4043,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4041: checking for X" >&5 +echo "configure:4047: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4099,12 +4105,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4173,14 +4179,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4270,12 +4276,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4295,15 +4301,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:4299: checking for X11 header files" >&5 +echo "configure:4305: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4339,7 +4345,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:4343: checking for X11 libraries" >&5 +echo "configure:4349: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -4359,7 +4365,7 @@ echo "configure:4343: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:4363: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:4369: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4367,7 +4373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4452,7 +4458,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" #-------------------------------------------------------------------- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:4456: checking for main in -lXbsd" >&5 +echo "configure:4462: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4460,14 +4466,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4490,12 +4496,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4494: checking for connect" >&5 +echo "configure:4500: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4540,7 +4546,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4544: checking for main in -lsocket" >&5 +echo "configure:4550: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4548,14 +4554,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4581,12 +4587,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:4585: checking for accept" >&5 +echo "configure:4591: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -4631,12 +4637,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4635: checking for gethostbyname" >&5 +echo "configure:4641: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4677,7 +4683,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4681: checking for main in -lnsl" >&5 +echo "configure:4687: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4685,14 +4691,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4732,13 +4738,13 @@ LIBS="$LIBS$THREADS_LIBS" if test -d /usr/include/mit ; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:4736: checking MIT X libraries" >&5 +echo "configure:4742: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -4749,7 +4755,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -4776,12 +4782,12 @@ fi MATH_LIBS="" echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4780: checking for sin" >&5 +echo "configure:4786: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4825,7 +4831,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:4829: checking for main in -lieee" >&5 +echo "configure:4835: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4833,14 +4839,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4867,14 +4873,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4871: checking whether char is unsigned" >&5 +echo "configure:4877: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -4939,12 +4945,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4943: checking for strtod" >&5 +echo "configure:4949: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -4989,7 +4995,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4993: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:4999: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4998,7 +5004,7 @@ else tcl_cv_strtod_buggy=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=1 else diff --git a/unix/configure.in b/unix/configure.in index 5b4a199..f5a714a 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.3 2003/10/03 16:32:39 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.4 2003/10/06 15:27:32 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -92,6 +92,12 @@ SC_TCL_64BIT_FLAGS SC_PATH_TCLCONFIG SC_LOAD_TCLCONFIG +if test "${TCL_VERSION}" != "${TK_VERSION}"; then + AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}.]) +fi + #-------------------------------------------------------------------- # Recompute the necessary flags to run the compiler #-------------------------------------------------------------------- -- cgit v0.12 From c2dd6ffabf1f18a3dc4c0f0439cbbbd884ef31a7 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Oct 2003 16:04:36 +0000 Subject: * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so that alpha and beta releases of Tcl are not favored. [Bug 608698] * unix/configure: autoconf (2.13) --- ChangeLog | 3 + unix/configure | 284 +++++++++++++++++++++++++++++---------------------------- unix/tcl.m4 | 22 ++++- 3 files changed, 170 insertions(+), 139 deletions(-) diff --git a/ChangeLog b/ChangeLog index aac890b..04d7521 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-10-06 Don Porter + * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so + that alpha and beta releases of Tcl are not favored. [Bug 608698] + * unix/configure.in: Added check that version of Tcl header found by configure matches that of the Tk we wish to build. As long as the Tk sources insist on lockstep releases, Tk's configuration should diff --git a/unix/configure b/unix/configure index 45a2189..752fc3c 100755 --- a/unix/configure +++ b/unix/configure @@ -1710,10 +1710,16 @@ else if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ + `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ ../../tcl \ + `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ ../../../tcl \ + `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` @@ -1740,6 +1746,8 @@ else if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` @@ -1764,7 +1772,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1768: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1776: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1825,7 +1833,7 @@ fi echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1829: checking how to build libraries" >&5 +echo "configure:1837: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -1858,7 +1866,7 @@ EOF # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1862: checking for $ac_word" >&5 +echo "configure:1870: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1890,7 +1898,7 @@ fi # Step 0.a: Enable 64 bit support? echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 -echo "configure:1894: checking if 64bit support is requested" >&5 +echo "configure:1902: checking if 64bit support is requested" >&5 # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then enableval="$enable_64bit" @@ -1910,7 +1918,7 @@ fi # Step 0.b: Enable Solaris 64 bit VIS support? echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:1914: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:1922: checking if 64bit Sparc VIS support is requested" >&5 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then enableval="$enable_64bit_vis" @@ -1934,7 +1942,7 @@ fi # there are a few systems, like Next, where this doesn't work. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -echo "configure:1938: checking system version (for dynamic loading)" >&5 +echo "configure:1946: checking system version (for dynamic loading)" >&5 if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else @@ -1960,7 +1968,7 @@ echo "configure:1938: checking system version (for dynamic loading)" >&5 # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1964: checking for dlopen in -ldl" >&5 +echo "configure:1972: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1968,7 +1976,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2027,7 +2035,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2031: checking for $ac_word" >&5 +echo "configure:2039: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2156,7 +2164,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2160: checking for gettimeofday in -lbsd" >&5 +echo "configure:2168: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2164,7 +2172,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2265,7 +2273,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2269: checking for shl_load in -ldld" >&5 +echo "configure:2277: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2273,7 +2281,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2352,7 +2360,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2356: checking for shl_load in -ldld" >&5 +echo "configure:2364: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2360,7 +2368,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2498,17 +2506,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2502: checking for dld.h" >&5 +echo "configure:2510: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2573,17 +2581,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2577: checking for dld.h" >&5 +echo "configure:2585: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2641,17 +2649,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2645: checking for dlfcn.h" >&5 +echo "configure:2653: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2679,9 +2687,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2683: checking for ELF" >&5 +echo "configure:2691: checking for ELF" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3043: checking for ld accepts -Bexport flag" >&5 +echo "configure:3053: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -3096,9 +3106,9 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3100: checking sys/exec.h" >&5 +echo "configure:3110: checking sys/exec.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3116,7 +3126,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3134,9 +3144,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3138: checking a.out.h" >&5 +echo "configure:3148: checking a.out.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3154,7 +3164,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3172,9 +3182,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3176: checking sys/exec_aout.h" >&5 +echo "configure:3186: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3192,7 +3202,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3344,7 +3354,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3348: checking for build with symbols" >&5 +echo "configure:3358: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -3418,12 +3428,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:3422: checking for sin" >&5 +echo "configure:3432: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -3467,7 +3477,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:3471: checking for main in -lieee" >&5 +echo "configure:3481: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3475,14 +3485,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3513,7 +3523,7 @@ fi libbsd=no if test "`uname -s`" = "AIX" ; then echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:3517: checking for gettimeofday in -lbsd" >&5 +echo "configure:3527: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3521,7 +3531,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3563,9 +3573,9 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6 -echo "configure:3567: checking stdlib.h" >&5 +echo "configure:3577: checking stdlib.h" >&5 cat > conftest.$ac_ext < EOF @@ -3580,7 +3590,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3594,7 +3604,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3626,16 +3636,16 @@ echo "$ac_t""$tk_ok" 1>&6 #-------------------------------------------------------------------- echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6 -echo "configure:3630: checking fd_set and sys/select" >&5 +echo "configure:3640: checking fd_set and sys/select" >&5 cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -3647,7 +3657,7 @@ fi rm -f conftest* if test $tk_ok = no; then cat > conftest.$ac_ext < EOF @@ -3679,12 +3689,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3683: checking for ANSI C header files" >&5 +echo "configure:3693: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3692,7 +3702,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3709,7 +3719,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3727,7 +3737,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3748,7 +3758,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3759,7 +3769,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3783,12 +3793,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3787: checking for mode_t" >&5 +echo "configure:3797: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3816,12 +3826,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3820: checking for pid_t" >&5 +echo "configure:3830: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3849,12 +3859,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3853: checking for size_t" >&5 +echo "configure:3863: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3882,12 +3892,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3886: checking for uid_t in sys/types.h" >&5 +echo "configure:3896: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3924,17 +3934,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3928: checking for $ac_hdr" >&5 +echo "configure:3938: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3961,12 +3971,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3965: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3975: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3975,7 +3985,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4001,16 +4011,16 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:4005: checking pw_gecos in struct pwd" >&5 +echo "configure:4015: checking pw_gecos in struct pwd" >&5 cat > conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -4043,7 +4053,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4047: checking for X" >&5 +echo "configure:4057: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4105,12 +4115,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4179,14 +4189,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4276,12 +4286,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4301,15 +4311,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:4305: checking for X11 header files" >&5 +echo "configure:4315: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4345,7 +4355,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:4349: checking for X11 libraries" >&5 +echo "configure:4359: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -4365,7 +4375,7 @@ echo "configure:4349: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:4369: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:4379: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4373,7 +4383,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4458,7 +4468,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" #-------------------------------------------------------------------- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:4462: checking for main in -lXbsd" >&5 +echo "configure:4472: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4466,14 +4476,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4496,12 +4506,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4500: checking for connect" >&5 +echo "configure:4510: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4546,7 +4556,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4550: checking for main in -lsocket" >&5 +echo "configure:4560: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4554,14 +4564,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4587,12 +4597,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:4591: checking for accept" >&5 +echo "configure:4601: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -4637,12 +4647,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4641: checking for gethostbyname" >&5 +echo "configure:4651: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4683,7 +4693,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4687: checking for main in -lnsl" >&5 +echo "configure:4697: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4691,14 +4701,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4738,13 +4748,13 @@ LIBS="$LIBS$THREADS_LIBS" if test -d /usr/include/mit ; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:4742: checking MIT X libraries" >&5 +echo "configure:4752: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -4755,7 +4765,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -4782,12 +4792,12 @@ fi MATH_LIBS="" echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4786: checking for sin" >&5 +echo "configure:4796: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4831,7 +4841,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:4835: checking for main in -lieee" >&5 +echo "configure:4845: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4839,14 +4849,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4873,14 +4883,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4877: checking whether char is unsigned" >&5 +echo "configure:4887: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -4945,12 +4955,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4949: checking for strtod" >&5 +echo "configure:4959: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -4995,7 +5005,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4999: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:5009: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5004,7 +5014,7 @@ else tcl_cv_strtod_buggy=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=1 else diff --git a/unix/tcl.m4 b/unix/tcl.m4 index adcaf98..53a4615 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -44,10 +44,16 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ + `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ + `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ + `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` @@ -74,6 +80,8 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` @@ -140,10 +148,16 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ + `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ + `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ + `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` @@ -168,6 +182,8 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` @@ -1333,8 +1349,10 @@ dnl AC_CHECK_TOOL(AR, ar) LDFLAGS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' - if test "$GCC" != "yes" ; then - EXTRA_CFLAGS="-DHAVE_TZSET -std1" + if test "$GCC" = "yes" ; then + EXTRA_CFLAGS="-mieee" + else + EXTRA_CFLAGS="-DHAVE_TZSET -std1 -ieee" fi # see pthread_intro(3) for pthread support on osf1, k.furukawa if test "${TCL_THREADS}" = "1" ; then -- cgit v0.12 From 45f853f735ec129e4f324d44318f1eb80dcc0cdd Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Oct 2003 16:59:23 +0000 Subject: *unix/configure.in: Reconfigured to use $TCL_PREFIX as the default value of --prefix, and also added warning when a TK_PREFIX value different from TCL_PREFIX is selected, since [package require Tk] fails in that configuration. [Bug 765642] * unix/configure: autoconf (2.13) --- ChangeLog | 5 + unix/configure | 658 +++++++++++++++++++++++++++--------------------------- unix/configure.in | 36 +-- 3 files changed, 358 insertions(+), 341 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04d7521..fd5f71d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-10-06 Don Porter + *unix/configure.in: Reconfigured to use $TCL_PREFIX as the + default value of --prefix, and also added warning when a TK_PREFIX + value different from TCL_PREFIX is selected, since [package require Tk] + fails in that configuration. [Bug 765642] + * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so that alpha and beta releases of Tcl are not favored. [Bug 608698] diff --git a/unix/configure b/unix/configure index 752fc3c..1e362e0 100755 --- a/unix/configure +++ b/unix/configure @@ -12,6 +12,8 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help + --with-tcl directory containing tcl configuration (tclConfig.sh)" +ac_help="$ac_help --enable-man-symlinks use symlinks for the manpages" ac_help="$ac_help --enable-man-compression=PROG @@ -19,8 +21,6 @@ ac_help="$ac_help ac_help="$ac_help --enable-threads build with threads" ac_help="$ac_help - --with-tcl directory containing tcl configuration (tclConfig.sh)" -ac_help="$ac_help --enable-shared build and link with shared libraries [--enable-shared]" ac_help="$ac_help --enable-64bit enable 64bit support (where applicable)" @@ -551,12 +551,169 @@ TK_PATCH_LEVEL=".5" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" +#-------------------------------------------------------------------- +# Find and load the tclConfig.sh file +#-------------------------------------------------------------------- + + + # + # Ok, lets find the tcl configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-tcl + # + + if test x"${no_tcl}" = x ; then + # we reset no_tcl in case something fails here + no_tcl=true + # Check whether --with-tcl or --without-tcl was given. +if test "${with_tcl+set}" = set; then + withval="$with_tcl" + with_tclconfig=${withval} +fi + + echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 +echo "configure:576: checking for Tcl configuration" >&5 + if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + # First check to see if --with-tcl was specified. + if test x"${with_tclconfig}" != x ; then + if test -f "${with_tclconfig}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + else + { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } + fi + fi + + # then check for a private Tcl installation + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ../tcl \ + `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ + ../../tcl \ + `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ + ../../../tcl \ + `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + +fi + + + if test x"${ac_cv_c_tclconfig}" = x ; then + TCL_BIN_DIR="# no Tcl configs found" + echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 + exit 0 + else + no_tcl= + TCL_BIN_DIR=${ac_cv_c_tclconfig} + echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6 + fi + fi + + + echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 +echo "configure:657: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 + + if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then + echo "$ac_t""loading" 1>&6 + . $TCL_BIN_DIR/tclConfig.sh + else + echo "$ac_t""file not found" 1>&6 + fi + + # + # If the TCL_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable TCL_LIB_SPEC will be set to the value + # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC + # instead of TCL_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + # + + if test -f $TCL_BIN_DIR/Makefile ; then + TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} + TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} + TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + fi + + # + # eval is required to do the TCL_DBGX substitution + # + + eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" + eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" + eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" + + eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" + eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" + eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" + + + + + + + + + + + + + + +if test "${TCL_VERSION}" != "${TK_VERSION}"; then + { echo "configure: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." 1>&2; exit 1; } +fi + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ if test "${prefix}" = "NONE"; then - prefix=/usr/local + prefix="$TCL_PREFIX" fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix @@ -573,7 +730,7 @@ TK_SRC_DIR=`cd $srcdir/..; pwd` echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6 -echo "configure:577: checking whether to use symlinks for manpages" >&5 +echo "configure:734: checking whether to use symlinks for manpages" >&5 # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then enableval="$enable_man_symlinks" @@ -585,7 +742,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking compression for manpages""... $ac_c" 1>&6 -echo "configure:589: checking compression for manpages" >&5 +echo "configure:746: checking compression for manpages" >&5 # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then enableval="$enable_man_compression" @@ -613,7 +770,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:617: checking for $ac_word" >&5 +echo "configure:774: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -643,7 +800,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:647: checking for $ac_word" >&5 +echo "configure:804: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -694,7 +851,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:698: checking for $ac_word" >&5 +echo "configure:855: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -726,7 +883,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:887: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -737,12 +894,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 741 "configure" +#line 898 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -768,12 +925,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:929: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:777: checking whether we are using GNU C" >&5 +echo "configure:934: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -782,7 +939,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -801,7 +958,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:805: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:962: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -838,7 +995,7 @@ fi #------------------------------------------------------------------------ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:842: checking how to run the C preprocessor" >&5 +echo "configure:999: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -853,13 +1010,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -870,13 +1027,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -887,13 +1044,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -921,17 +1078,17 @@ for ac_hdr in unistd.h limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:925: checking for $ac_hdr" >&5 +echo "configure:1082: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -964,7 +1121,7 @@ done echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:968: checking for building with threads" >&5 +echo "configure:1125: checking for building with threads" >&5 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -996,7 +1153,7 @@ EOF EOF echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1000: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:1157: checking for pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1004,7 +1161,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1043,7 +1200,7 @@ fi # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1047: checking for __pthread_mutex_init in -lpthread" >&5 +echo "configure:1204: checking for __pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1051,7 +1208,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1090,7 +1247,7 @@ fi THREADS_LIBS=" -lpthread" else echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:1094: checking for pthread_mutex_init in -lpthreads" >&5 +echo "configure:1251: checking for pthread_mutex_init in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1098,7 +1255,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1135,7 +1292,7 @@ fi THREADS_LIBS=" -lpthreads" else echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 -echo "configure:1139: checking for pthread_mutex_init in -lc" >&5 +echo "configure:1296: checking for pthread_mutex_init in -lc" >&5 ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1143,7 +1300,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1177,7 +1334,7 @@ fi if test "$tcl_ok" = "no"; then echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 -echo "configure:1181: checking for pthread_mutex_init in -lc_r" >&5 +echo "configure:1338: checking for pthread_mutex_init in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1185,7 +1342,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1236,12 +1393,12 @@ fi for ac_func in pthread_attr_setstacksize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1240: checking for $ac_func" >&5 +echo "configure:1397: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1292,12 +1449,12 @@ done for ac_func in readdir_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1296: checking for $ac_func" >&5 +echo "configure:1453: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1359,18 +1516,18 @@ done if test -z "$no_pipe"; then if test -n "$GCC"; then echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:1363: checking if the compiler understands -pipe" >&5 +echo "configure:1520: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1390,21 +1547,21 @@ fi echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:1394: checking for required early compiler flags" >&5 +echo "configure:1551: checking for required early compiler flags" >&5 tcl_flags="" if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:1408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -1412,7 +1569,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -1420,7 +1577,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -1446,14 +1603,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -1461,7 +1618,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -1469,7 +1626,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:1473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -1498,7 +1655,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:1502: checking for 64-bit integer type" >&5 +echo "configure:1659: checking for 64-bit integer type" >&5 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1506,14 +1663,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -1530,13 +1687,13 @@ rm -f conftest* : else cat > conftest.$ac_ext < int main() {exit(!(sizeof(${tcl_type_64bit}) > sizeof(long)));} EOF -if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_type_64bit=${tcl_type_64bit} else @@ -1565,13 +1722,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:1569: checking for struct dirent64" >&5 +echo "configure:1726: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1579,7 +1736,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:1583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -1600,13 +1757,13 @@ EOF echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6 echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:1604: checking for struct stat64" >&5 +echo "configure:1761: checking for struct stat64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -1614,7 +1771,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:1618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -1635,13 +1792,13 @@ EOF echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6 echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:1639: checking for off64_t" >&5 +echo "configure:1796: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -1649,7 +1806,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -1671,163 +1828,6 @@ EOF fi #-------------------------------------------------------------------- -# Find and load the tclConfig.sh file -#-------------------------------------------------------------------- - - - # - # Ok, lets find the tcl configuration - # First, look for one uninstalled. - # the alternative search directory is invoked by --with-tcl - # - - if test x"${no_tcl}" = x ; then - # we reset no_tcl in case something fails here - no_tcl=true - # Check whether --with-tcl or --without-tcl was given. -if test "${with_tcl+set}" = set; then - withval="$with_tcl" - with_tclconfig=${withval} -fi - - echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:1695: checking for Tcl configuration" >&5 - if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - - # First check to see if --with-tcl was specified. - if test x"${with_tclconfig}" != x ; then - if test -f "${with_tclconfig}/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` - else - { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } - fi - fi - - # then check for a private Tcl installation - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in \ - ../tcl \ - `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ - `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ - `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ - ../../tcl \ - `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ - `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ - `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ - ../../../tcl \ - `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ - `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ - `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - - # check in a few common install locations - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in `ls -d ${libdir} 2>/dev/null` \ - `ls -d /usr/local/lib 2>/dev/null` \ - `ls -d /usr/contrib/lib 2>/dev/null` \ - `ls -d /usr/lib 2>/dev/null` \ - ; do - if test -f "$i/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i; pwd)` - break - fi - done - fi - - # check in a few other private locations - if test x"${ac_cv_c_tclconfig}" = x ; then - for i in \ - ${srcdir}/../tcl \ - `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ - `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ - `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` - break - fi - done - fi - -fi - - - if test x"${ac_cv_c_tclconfig}" = x ; then - TCL_BIN_DIR="# no Tcl configs found" - echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 - exit 0 - else - no_tcl= - TCL_BIN_DIR=${ac_cv_c_tclconfig} - echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6 - fi - fi - - - echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1776: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 - - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then - echo "$ac_t""loading" 1>&6 - . $TCL_BIN_DIR/tclConfig.sh - else - echo "$ac_t""file not found" 1>&6 - fi - - # - # If the TCL_BIN_DIR is the build directory (not the install directory), - # then set the common variable name to the value of the build variables. - # For example, the variable TCL_LIB_SPEC will be set to the value - # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC - # instead of TCL_BUILD_LIB_SPEC since it will work with both an - # installed and uninstalled version of Tcl. - # - - if test -f $TCL_BIN_DIR/Makefile ; then - TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} - TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} - TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} - fi - - # - # eval is required to do the TCL_DBGX substitution - # - - eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" - eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" - eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" - - eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" - eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" - eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" - - - - - - - - - - - - - - -if test "${TCL_VERSION}" != "${TK_VERSION}"; then - { echo "configure: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." 1>&2; exit 1; } -fi - -#-------------------------------------------------------------------- # Recompute the necessary flags to run the compiler #-------------------------------------------------------------------- @@ -3420,6 +3420,12 @@ if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}/lib" fi +if test "$TCL_PREFIX" != "$prefix"; then + echo "configure: warning: + Different --prefix selected for Tk and Tcl! + [package require Tk] may not work correctly in tclsh." 1>&2 +fi + #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. @@ -3428,12 +3434,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:3432: checking for sin" >&5 +echo "configure:3438: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -3477,7 +3483,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:3481: checking for main in -lieee" >&5 +echo "configure:3487: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3485,14 +3491,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3523,7 +3529,7 @@ fi libbsd=no if test "`uname -s`" = "AIX" ; then echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:3527: checking for gettimeofday in -lbsd" >&5 +echo "configure:3533: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3531,7 +3537,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3573,9 +3579,9 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6 -echo "configure:3577: checking stdlib.h" >&5 +echo "configure:3583: checking stdlib.h" >&5 cat > conftest.$ac_ext < EOF @@ -3590,7 +3596,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3604,7 +3610,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3636,16 +3642,16 @@ echo "$ac_t""$tk_ok" 1>&6 #-------------------------------------------------------------------- echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6 -echo "configure:3640: checking fd_set and sys/select" >&5 +echo "configure:3646: checking fd_set and sys/select" >&5 cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -3657,7 +3663,7 @@ fi rm -f conftest* if test $tk_ok = no; then cat > conftest.$ac_ext < EOF @@ -3689,12 +3695,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3693: checking for ANSI C header files" >&5 +echo "configure:3699: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3702,7 +3708,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3719,7 +3725,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3737,7 +3743,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3758,7 +3764,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3769,7 +3775,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3793,12 +3799,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3797: checking for mode_t" >&5 +echo "configure:3803: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3826,12 +3832,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3830: checking for pid_t" >&5 +echo "configure:3836: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3859,12 +3865,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3863: checking for size_t" >&5 +echo "configure:3869: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3892,12 +3898,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3896: checking for uid_t in sys/types.h" >&5 +echo "configure:3902: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3934,17 +3940,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3938: checking for $ac_hdr" >&5 +echo "configure:3944: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3971,12 +3977,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3975: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3981: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3985,7 +3991,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4011,16 +4017,16 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:4015: checking pw_gecos in struct pwd" >&5 +echo "configure:4021: checking pw_gecos in struct pwd" >&5 cat > conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:4024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -4053,7 +4059,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4057: checking for X" >&5 +echo "configure:4063: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4115,12 +4121,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4189,14 +4195,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4286,12 +4292,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4311,15 +4317,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:4315: checking for X11 header files" >&5 +echo "configure:4321: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4355,7 +4361,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:4359: checking for X11 libraries" >&5 +echo "configure:4365: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -4375,7 +4381,7 @@ echo "configure:4359: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:4379: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:4385: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4383,7 +4389,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4468,7 +4474,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" #-------------------------------------------------------------------- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:4472: checking for main in -lXbsd" >&5 +echo "configure:4478: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4476,14 +4482,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4506,12 +4512,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4510: checking for connect" >&5 +echo "configure:4516: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4556,7 +4562,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4560: checking for main in -lsocket" >&5 +echo "configure:4566: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4564,14 +4570,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4597,12 +4603,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:4601: checking for accept" >&5 +echo "configure:4607: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -4647,12 +4653,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4651: checking for gethostbyname" >&5 +echo "configure:4657: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4693,7 +4699,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4697: checking for main in -lnsl" >&5 +echo "configure:4703: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4701,14 +4707,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4748,13 +4754,13 @@ LIBS="$LIBS$THREADS_LIBS" if test -d /usr/include/mit ; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:4752: checking MIT X libraries" >&5 +echo "configure:4758: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -4765,7 +4771,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -4792,12 +4798,12 @@ fi MATH_LIBS="" echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4796: checking for sin" >&5 +echo "configure:4802: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4841,7 +4847,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:4845: checking for main in -lieee" >&5 +echo "configure:4851: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4849,14 +4855,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4883,14 +4889,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4887: checking whether char is unsigned" >&5 +echo "configure:4893: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -4955,12 +4961,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4959: checking for strtod" >&5 +echo "configure:4965: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -5005,7 +5011,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:5009: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:5015: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5014,7 +5020,7 @@ else tcl_cv_strtod_buggy=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=1 else @@ -5312,10 +5318,6 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@MKLINKS_FLAGS@%$MKLINKS_FLAGS%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@TCL_THREADS@%$TCL_THREADS%g s%@TCL_VERSION@%$TCL_VERSION%g s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g @@ -5325,6 +5327,10 @@ s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g +s%@MKLINKS_FLAGS@%$MKLINKS_FLAGS%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@TCL_THREADS@%$TCL_THREADS%g s%@RANLIB@%$RANLIB%g s%@AR@%$AR%g s%@DL_LIBS@%$DL_LIBS%g diff --git a/unix/configure.in b/unix/configure.in index f5a714a..5ca56d8 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.4 2003/10/06 15:27:32 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.5 2003/10/06 16:59:25 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -15,12 +15,25 @@ TK_PATCH_LEVEL=".5" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" +#-------------------------------------------------------------------- +# Find and load the tclConfig.sh file +#-------------------------------------------------------------------- + +SC_PATH_TCLCONFIG +SC_LOAD_TCLCONFIG + +if test "${TCL_VERSION}" != "${TK_VERSION}"; then + AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}.]) +fi + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ if test "${prefix}" = "NONE"; then - prefix=/usr/local + prefix="$TCL_PREFIX" fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix @@ -86,19 +99,6 @@ SC_TCL_EARLY_FLAGS SC_TCL_64BIT_FLAGS #-------------------------------------------------------------------- -# Find and load the tclConfig.sh file -#-------------------------------------------------------------------- - -SC_PATH_TCLCONFIG -SC_LOAD_TCLCONFIG - -if test "${TCL_VERSION}" != "${TK_VERSION}"; then - AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}.]) -fi - -#-------------------------------------------------------------------- # Recompute the necessary flags to run the compiler #-------------------------------------------------------------------- @@ -121,6 +121,12 @@ if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}/lib" fi +if test "$TCL_PREFIX" != "$prefix"; then + AC_MSG_WARN([ + Different --prefix selected for Tk and Tcl! + [[package require Tk]] may not work correctly in tclsh.]) +fi + #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. -- cgit v0.12 From 65ad6953ff82273f66f448dc7857c94708bdcd9e Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Oct 2003 17:10:57 +0000 Subject: log update --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fd5f71d..159ea91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ *unix/configure.in: Reconfigured to use $TCL_PREFIX as the default value of --prefix, and also added warning when a TK_PREFIX value different from TCL_PREFIX is selected, since [package require Tk] - fails in that configuration. [Bug 765642] + fails in that configuration. [Bugs 428627,765642] * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so that alpha and beta releases of Tcl are not favored. [Bug 608698] -- cgit v0.12 From b1eed7633ca62a55dae79c330372fdfd886160c1 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Oct 2003 22:15:16 +0000 Subject: * doc/ConfigWidg.3: Removed reference to Tk_Offset from the NAME section to resolve mkLinks conflict with SetOptions.3 [Bug 404197] --- ChangeLog | 5 ++++- doc/ConfigWidg.3 | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 159ea91..bdfe647 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2003-10-06 Don Porter - *unix/configure.in: Reconfigured to use $TCL_PREFIX as the + * doc/ConfigWidg.3: Removed reference to Tk_Offset from the + NAME section to resolve mkLinks conflict with SetOptions.3 [Bug 404197] + + * unix/configure.in: Reconfigured to use $TCL_PREFIX as the default value of --prefix, and also added warning when a TK_PREFIX value different from TCL_PREFIX is selected, since [package require Tk] fails in that configuration. [Bugs 428627,765642] diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3 index 87ab6e9..6d41953 100644 --- a/doc/ConfigWidg.3 +++ b/doc/ConfigWidg.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ConfigWidg.3,v 1.8 2002/08/05 04:30:38 dgp Exp $ +'\" RCS: @(#) $Id: ConfigWidg.3,v 1.8.2.1 2003/10/06 22:15:17 dgp Exp $ '\" .so man.macros .TH Tk_ConfigureWidget 3 4.1 Tk "Tk Library Procedures" .BS .SH NAME -Tk_ConfigureWidget, Tk_Offset, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- process configuration options for widgets +Tk_ConfigureWidget, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- process configuration options for widgets .SH SYNOPSIS .nf \fB#include \fR @@ -20,9 +20,6 @@ int \fBTk_ConfigureWidget(\fIinterp, tkwin, specs, argc, argv, widgRec, flags\fB)\fR .sp int -\fBTk_Offset(\fItype, field\fB)\fR -.sp -int \fBTk_ConfigureInfo(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR .sp int -- cgit v0.12 From 946b98c68ec1de3f3b0d3d70a9c5fbefcc63144c Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Oct 2003 22:17:51 +0000 Subject: * unix/mkLinks: make mklinks --- ChangeLog | 1 + unix/mkLinks | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdfe647..3ee1127 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ verify that's what we have. [Bug 749088] * unix/configure: autoconf (2.13) + * unix/mkLinks: make mklinks 2003-10-03 Don Porter diff --git a/unix/mkLinks b/unix/mkLinks index adb3559..0b91246 100644 --- a/unix/mkLinks +++ b/unix/mkLinks @@ -174,12 +174,10 @@ if test -r ConfigWidg.3; then rm -f ConfigWidg.3.* $ZIP ConfigWidg.3 rm -f Tk_ConfigureWidget.3 Tk_ConfigureWidget.3.* - rm -f Tk_Offset.3 Tk_Offset.3.* rm -f Tk_ConfigureInfo.3 Tk_ConfigureInfo.3.* rm -f Tk_ConfigureValue.3 Tk_ConfigureValue.3.* rm -f Tk_FreeOptions.3 Tk_FreeOptions.3.* ln $S ConfigWidg.3$Z Tk_ConfigureWidget.3$Z - ln $S ConfigWidg.3$Z Tk_Offset.3$Z ln $S ConfigWidg.3$Z Tk_ConfigureInfo.3$Z ln $S ConfigWidg.3$Z Tk_ConfigureValue.3$Z ln $S ConfigWidg.3$Z Tk_FreeOptions.3$Z -- cgit v0.12 From f20e77cbd2724af11ed36f9e85980b608a5629ae Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 10 Oct 2003 00:03:56 +0000 Subject: correct imageYOffset for buttons with just images --- ChangeLog | 5 +++++ win/tkWinButton.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ee1127..a27dc78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-09 Jeff Hobbs + + * win/tkWinButton.c (TkpDisplayButton): correct imageYOffset for + buttons with just images. + 2003-10-06 Don Porter * doc/ConfigWidg.3: Removed reference to Tk_Offset from the diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 415a202..2ad0c4b 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.20.2.2 2003/04/26 02:53:47 hobbs Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.20.2.3 2003/10/10 00:03:57 hobbs Exp $ */ #define OEMRESOURCE @@ -560,15 +560,15 @@ TkpDisplayButton(clientData) y += offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, height, - pixmap, x, y); + pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, pixmap, - x, y); + imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, gc, x, y); -- cgit v0.12 From f21b0b281862c1937001b4fa19161b59eab679a0 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 10 Oct 2003 20:20:47 +0000 Subject: * mac/tkMacButton.c (TkpDisplayButton): * macosx/tkMacOSXButton.c (TkpDisplayButton): * unix/tkUnixButton.c (TkpDisplayButton): correct imageYOffset for buttons with just images. --- ChangeLog | 7 +++++++ mac/tkMacButton.c | 8 ++++---- macosx/tkMacOSXButton.c | 8 ++++---- unix/tkUnixButton.c | 8 ++++---- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index a27dc78..4d322a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-10-10 Jeff Hobbs + + * mac/tkMacButton.c (TkpDisplayButton): + * macosx/tkMacOSXButton.c (TkpDisplayButton): + * unix/tkUnixButton.c (TkpDisplayButton): correct imageYOffset for + buttons with just images. + 2003-10-09 Jeff Hobbs * win/tkWinButton.c (TkpDisplayButton): correct imageYOffset for diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c index a2a5916..365fc26 100644 --- a/mac/tkMacButton.c +++ b/mac/tkMacButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacButton.c,v 1.17.2.1 2003/04/26 02:53:47 hobbs Exp $ + * RCS: @(#) $Id: tkMacButton.c,v 1.17.2.2 2003/10/10 20:20:47 hobbs Exp $ */ #include "tkButton.h" @@ -455,15 +455,15 @@ TkpDisplayButton( y += offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, - pixmap, x, y); + pixmap, imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, gc, x, y); diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 749b4ef..dc9f405 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.3 2003/09/25 05:37:48 das Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.4 2003/10/10 20:20:47 hobbs Exp $ */ #include "tkButton.h" @@ -417,15 +417,15 @@ TkpDisplayButton( y += dpPtr->offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, - pixmap, x, y); + pixmap, imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, dpPtr->gc, x, y); diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index 46fac82..1246ece 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.3 2003/04/26 02:58:17 hobbs Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.4 2003/10/10 20:20:47 hobbs Exp $ */ #include "tkButton.h" @@ -293,15 +293,15 @@ TkpDisplayButton(clientData) y += offset; } imageXOffset += x; - imageXOffset += y; + imageYOffset += y; if (butPtr->image != NULL) { if ((butPtr->selectImage != NULL) && (butPtr->flags & SELECTED)) { Tk_RedrawImage(butPtr->selectImage, 0, 0, width, - height, pixmap, x, y); + height, pixmap, imageXOffset, imageYOffset); } else { Tk_RedrawImage(butPtr->image, 0, 0, width, height, pixmap, - x, y); + imageXOffset, imageYOffset); } } else { XSetClipOrigin(butPtr->display, gc, x, y); -- cgit v0.12 From f7654c43f895fd31af766c4c55b0ce763d2f7aba Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 13 Oct 2003 00:55:08 +0000 Subject: * unix/mkLinks: * doc/GetHWND.3: add Tk_AttachHWND docs [Bug #220803] --- ChangeLog | 16 ++++++++++++---- doc/GetHWND.3 | 17 ++++++++++++++--- tests/listbox.test | 6 +++--- unix/mkLinks | 2 ++ 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d322a5..117d309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-10-12 Jeff Hobbs + + * tests/listbox.test (13.3): correct result size + (4.7): correct test for possible window drift [Bug #701931] (dgp) + + * unix/mkLinks: + * doc/GetHWND.3: add Tk_AttachHWND docs [Bug #220803] + 2003-10-10 Jeff Hobbs * mac/tkMacButton.c (TkpDisplayButton): @@ -5,12 +13,12 @@ * unix/tkUnixButton.c (TkpDisplayButton): correct imageYOffset for buttons with just images. -2003-10-09 Jeff Hobbs +2003-10-09 Jeff Hobbs * win/tkWinButton.c (TkpDisplayButton): correct imageYOffset for buttons with just images. -2003-10-06 Don Porter +2003-10-06 Don Porter * doc/ConfigWidg.3: Removed reference to Tk_Offset from the NAME section to resolve mkLinks conflict with SetOptions.3 [Bug 404197] @@ -20,8 +28,8 @@ value different from TCL_PREFIX is selected, since [package require Tk] fails in that configuration. [Bugs 428627,765642] - * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so - that alpha and beta releases of Tcl are not favored. [Bug 608698] + * unix/tcl.m4 (SC_PATH_TCLCONFIG): Corrected search path so + that alpha and beta releases of Tcl are not favored. [Bug 608698] * unix/configure.in: Added check that version of Tcl header found by configure matches that of the Tk we wish to build. As long as diff --git a/doc/GetHWND.3 b/doc/GetHWND.3 index b512578..eb33db6 100644 --- a/doc/GetHWND.3 +++ b/doc/GetHWND.3 @@ -2,28 +2,39 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: GetHWND.3,v 1.2 2000/09/07 00:28:38 ericm Exp $ +'\" RCS: @(#) $Id: GetHWND.3,v 1.2.8.1 2003/10/13 00:55:08 hobbs Exp $ '\" '\" .so man.macros -.TH Tk_GetHWND 3 "" Tk "Tk Library Procedures" +.TH HWND 3 8.0 Tk "Tk Library Procedures" .BS .SH NAME -Tk_GetHWND \- retrieve the Windows handle for an X window +Tk_GetHWND, Tk_AttachHWND \- manage interactione between the Windows handle and an X window .SH SYNOPSIS .nf \fB#include \fR .sp HWND \fBTk_GetHWND\fR(\fIwindow\fR) +.sp +Window +\fBTk_AttachHWND\fR(\fItkwin, hwnd\fR) .SH ARGUMENTS .AP Window window in X token for window. +.AP Tk_Window tkwin in +Tk window for window. +.AP HWND hwnd in +Windows HWND for window. .BE .SH DESCRIPTION .PP \fBTk_GetHWND\fR returns the Windows HWND identifier for X Windows window given by \fIwindow\fR. +.PP +\fBTk_AttachHWND\fR binds the Windows HWND identifier to the +specified Tk_Window given by \fItkwin\fR. It returns an X Windows +window that encapsulates the HWND. .SH KEYWORDS identifier, window diff --git a/tests/listbox.test b/tests/listbox.test index 37f5f30..a6f858c 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: listbox.test,v 1.21 2003/02/25 02:07:25 hobbs Exp $ +# RCS: @(#) $Id: listbox.test,v 1.21.2.1 2003/10/13 00:55:25 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -841,7 +841,7 @@ test listbox-4.7 {ConfigureListbox procedure} { catch {destroy .l} wm withdraw . listbox .l -font $fixed -width 30 -height 20 -setgrid 1 - wm geom . +0+0 + wm geom . +25+25 pack .l update wm deiconify . @@ -1529,7 +1529,7 @@ test listbox-13.3 {ListboxScanTo procedure} {fonts} { .l scan dragto [expr 5+$width] [expr 10+$height] update lappend x [.l xview] [.l yview] -} {{0.8 1} {0.75 1} {0.62 0.82} {0.25 0.5}} +} {{0.8 1} {0.75 1} {0.64 0.84} {0.25 0.5}} test listbox-14.1 {NearestListboxElement procedure, partial last line} { mkPartial diff --git a/unix/mkLinks b/unix/mkLinks index 0b91246..2caca62 100644 --- a/unix/mkLinks +++ b/unix/mkLinks @@ -476,7 +476,9 @@ if test -r GetHWND.3; then rm -f GetHWND.3.* $ZIP GetHWND.3 rm -f Tk_GetHWND.3 Tk_GetHWND.3.* + rm -f Tk_AttachHWND.3 Tk_AttachHWND.3.* ln $S GetHWND.3$Z Tk_GetHWND.3$Z + ln $S GetHWND.3$Z Tk_AttachHWND.3$Z fi if test -r GetImage.3; then rm -f GetImage.3.* -- cgit v0.12 From 36942822bfe420c414a9d44a6cfd15358ab5475b Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 13 Oct 2003 03:30:04 +0000 Subject: * generic/tkInt.h: move TkGetOptionSpec to stubs intDecls * generic/tkIntDecls.h: * generic/tkInt.decls: * generic/tkStubInit.c: --- ChangeLog | 5 +++++ generic/tkInt.decls | 7 ++++++- generic/tkInt.h | 5 +---- generic/tkIntDecls.h | 10 +++++++++- generic/tkStubInit.c | 3 ++- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 117d309..bcf143b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-10-12 Jeff Hobbs + * generic/tkInt.h: move TkGetOptionSpec to stubs intDecls + * generic/tkIntDecls.h: + * generic/tkInt.decls: + * generic/tkStubInit.c: + * tests/listbox.test (13.3): correct result size (4.7): correct test for possible window drift [Bug #701931] (dgp) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 951bb45..eb1d607 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tkInt.decls,v 1.33 2003/01/22 14:32:59 dkf Exp $ +# RCS: @(#) $Id: tkInt.decls,v 1.33.2.1 2003/10/13 03:30:04 hobbs Exp $ library tk @@ -673,6 +673,11 @@ declare 148 generic { CONST char *cmdName) } +declare 149 generic { + CONST Tk_OptionSpec * TkGetOptionSpec (CONST char *name, + Tk_OptionTable optionTable) +} + ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff --git a/generic/tkInt.h b/generic/tkInt.h index 2723d41..4cf39d5 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.56 2003/02/18 06:22:44 mdejong Exp $ + * RCS: $Id: tkInt.h,v 1.56.2.1 2003/10/13 03:30:05 hobbs Exp $ */ #ifndef _TKINT @@ -1113,9 +1113,6 @@ EXTERN char * TkCanvasDashPrintProc _ANSI_ARGS_(( EXTERN int TkGetDoublePixels _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, CONST char *string, double *doublePtr)); -EXTERN CONST Tk_OptionSpec * - TkGetOptionSpec _ANSI_ARGS_((CONST char *name, - Tk_OptionTable optionTable)); EXTERN int TkOffsetParseProc _ANSI_ARGS_(( ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, CONST char *value, char *widgRec, diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index d50dab4..ac3093e 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkIntDecls.h,v 1.22 2003/01/22 14:33:00 dkf Exp $ + * RCS: @(#) $Id: tkIntDecls.h,v 1.22.2.1 2003/10/13 03:30:05 hobbs Exp $ */ #ifndef _TKINTDECLS @@ -559,6 +559,9 @@ EXTERN void TkStylePkgFree _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 148 */ EXTERN Tk_Window TkToplevelWindowForCommand _ANSI_ARGS_(( Tcl_Interp * interp, CONST char * cmdName)); +/* 149 */ +EXTERN CONST Tk_OptionSpec * TkGetOptionSpec _ANSI_ARGS_((CONST char * name, + Tk_OptionTable optionTable)); typedef struct TkIntStubs { int magic; @@ -834,6 +837,7 @@ typedef struct TkIntStubs { void (*tkStylePkgInit) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 146 */ void (*tkStylePkgFree) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 147 */ Tk_Window (*tkToplevelWindowForCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName)); /* 148 */ + CONST Tk_OptionSpec * (*tkGetOptionSpec) _ANSI_ARGS_((CONST char * name, Tk_OptionTable optionTable)); /* 149 */ } TkIntStubs; #ifdef __cplusplus @@ -1543,6 +1547,10 @@ extern TkIntStubs *tkIntStubsPtr; #define TkToplevelWindowForCommand \ (tkIntStubsPtr->tkToplevelWindowForCommand) /* 148 */ #endif +#ifndef TkGetOptionSpec +#define TkGetOptionSpec \ + (tkIntStubsPtr->tkGetOptionSpec) /* 149 */ +#endif #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 259baf3..335dee7 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.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: tkStubInit.c,v 1.41 2003/01/22 14:33:00 dkf Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.41.2.1 2003/10/13 03:30:05 hobbs Exp $ */ #include "tkInt.h" @@ -329,6 +329,7 @@ TkIntStubs tkIntStubs = { TkStylePkgInit, /* 146 */ TkStylePkgFree, /* 147 */ TkToplevelWindowForCommand, /* 148 */ + TkGetOptionSpec, /* 149 */ }; TkIntPlatStubs tkIntPlatStubs = { -- cgit v0.12 From 2b5dcb0f64726e8ebf0793892d2a89ac5bcf4f5e Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 22 Oct 2003 15:22:06 +0000 Subject: Constrain tk_dialg to be sensibly sized and placed. [Bug 827535] --- ChangeLog | 5 +++++ library/dialog.tcl | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bcf143b..67c1c12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-22 Donal K. Fellows + + * library/dialog.tcl (tk_dialog): Constrain the dialog to be + fairly sensibly sized and placed. [Bug 827535] + 2003-10-12 Jeff Hobbs * generic/tkInt.h: move TkGetOptionSpec to stubs intDecls diff --git a/library/dialog.tcl b/library/dialog.tcl index 2eb425f..2a66619 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -3,7 +3,7 @@ # This file defines the procedure tk_dialog, which creates a dialog # box containing a bitmap, a message, and one or more buttons. # -# RCS: @(#) $Id: dialog.tcl,v 1.14 2002/08/31 06:12:28 das Exp $ +# RCS: @(#) $Id: dialog.tcl,v 1.14.2.1 2003/10/22 15:22:07 dkf Exp $ # # Copyright (c) 1992-1993 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -155,6 +155,16 @@ proc ::tk_dialog {w title text bitmap default args} { - [winfo vrootx [winfo parent $w]]}] set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \ - [winfo vrooty [winfo parent $w]]}] + # Make sure that the window is on the screen and set the maximum + # size of the window is the size of the screen. That'll let things + # fail fairly gracefully when very large messages are used. [Bug 827535] + if {$x < 0} { + set x 0 + } + if {$y < 0} { + set y 0 + } + wm maxsize $w [winfo screenwidth $w] [winfo screenheight $w] wm geom $w +$x+$y wm deiconify $w -- cgit v0.12 From 298bf949d9b3d9909ca44a3785afb833bc73c6a9 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 28 Oct 2003 15:59:31 +0000 Subject: Make sure we do default placement strategy when placement is empty [Bug 819284] --- ChangeLog | 5 +++++ library/tk.tcl | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67c1c12..aa51442 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-28 Donal K. Fellows + + * library/tk.tcl (::tk::PlaceWindow): Added check for empty string + first when determining placement strategy. [Bug 819284] + 2003-10-22 Donal K. Fellows * library/dialog.tcl (tk_dialog): Constrain the dialog to be diff --git a/library/tk.tcl b/library/tk.tcl index 1d0d3d0..0d5b2ed 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -3,7 +3,7 @@ # Initialization script normally executed in the interpreter for each # Tk-based application. Arranges class bindings for widgets. # -# RCS: @(#) $Id: tk.tcl,v 1.46 2003/02/18 21:24:39 hobbs Exp $ +# RCS: @(#) $Id: tk.tcl,v 1.46.2.1 2003/10/28 15:59:34 dkf Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -79,7 +79,11 @@ proc ::tk::PlaceWindow {w {place ""} {anchor ""}} { wm withdraw $w update idletasks set checkBounds 1 - if {[string equal -len [string length $place] $place "pointer"]} { + if {[string equal $place ""]} { + set x [expr {([winfo screenwidth $w]-[winfo reqwidth $w])/2}] + set y [expr {([winfo screenheight $w]-[winfo reqheight $w])/2}] + set checkBounds 0 + } elseif {[string equal -len [string length $place] $place "pointer"]} { ## place at POINTER (centered if $anchor == center) if {[string equal -len [string length $anchor] $anchor "center"]} { set x [expr {[winfo pointerx $w]-[winfo reqwidth $w]/2}] -- cgit v0.12 From 0a33d1a5e30a44e9689fbcddcf9438a8f2cd4282 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 29 Oct 2003 01:07:46 +0000 Subject: * unix/tkUnixFont.c (GetFontAttributes): place extra check for NULL family against bad X servers. --- unix/tkUnixFont.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index d29fd9f..22ea02f 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFont.c,v 1.18.2.2 2003/07/19 01:45:42 hobbs Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.18.2.3 2003/10/29 01:07:46 hobbs Exp $ */ #include "tkUnixInt.h" @@ -2716,6 +2716,13 @@ GetFontAttributes(display, fontStructPtr, faPtr) } else { TkInitFontAttributes(&faPtr->fa); TkInitXLFDAttributes(&faPtr->xa); + } + /* + * Do last ditch check for family. It seems that some X servers can + * fail on the X font calls above, slipping through earlier checks. + * X-Win32 5.4 is one of these. + */ + if (faPtr->fa.family == NULL) { faPtr->fa.family = Tk_GetUid(""); faPtr->xa.foundry = Tk_GetUid(""); faPtr->xa.charset = Tk_GetUid(""); -- cgit v0.12 From ae26300c3702f6b0b62ad08cf91e9b4cd11ce55d Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 29 Oct 2003 01:08:02 +0000 Subject: * win/tkWinImage.c (XGetImageZPixmap): add separate 16bpp XGetImage code to correctly handle 16bpp requests. This appears to never have worked correctly. --- win/tkWinImage.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/win/tkWinImage.c b/win/tkWinImage.c index bb20a88..dbbf3ba 100644 --- a/win/tkWinImage.c +++ b/win/tkWinImage.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: tkWinImage.c,v 1.6.2.1 2003/07/17 01:02:47 hobbs Exp $ + * RCS: @(#) $Id: tkWinImage.c,v 1.6.2.2 2003/10/29 01:08:02 hobbs Exp $ */ #include "tkWinInt.h" @@ -425,6 +425,29 @@ XGetImageZPixmap(display, d, x, y, width, height, plane_mask, format) for (i = 0; i < bmInfo->bmiHeader.biSizeImage; i++, p++) { *p = (unsigned char) palette[*p]; } + } else if (depth == 16) { + GetDIBits(hdcMem, hbmp, 0, height, NULL, bmInfo, DIB_RGB_COLORS); + data = ckalloc(bmInfo->bmiHeader.biSizeImage); + if (!data) { + /* printf("Failed to allocate data area for XImage.\n"); */ + ret_image = NULL; + goto cleanup; + } + ret_image = XCreateImage(display, NULL, 16, ZPixmap, 0, data, + width, height, 16, 0 /* will be calc'ed from bitmap_pad */); + if (ret_image == NULL) { + ckfree((char *) data); + goto cleanup; + } + + /* Get the BITMAP info directly into the Image. */ + if (GetDIBits(hdcMem, hbmp, 0, height, ret_image->data, bmInfo, + DIB_RGB_COLORS) == 0) { + ckfree((char *) ret_image->data); + ckfree((char *) ret_image); + ret_image = NULL; + goto cleanup; + } } else { GetDIBits(hdcMem, hbmp, 0, height, NULL, bmInfo, DIB_RGB_COLORS); data = ckalloc(width * height * 4); @@ -441,6 +464,10 @@ XGetImageZPixmap(display, d, x, y, width, height, plane_mask, format) } if (depth <= 24) { + /* + * This used to handle 16 and 24 bpp, but now just handles 24. + * It can likely be optimized for that. -- hobbs + */ unsigned char *smallBitData, *smallBitBase, *bigBitData; unsigned int byte_width, h, w; @@ -456,19 +483,18 @@ XGetImageZPixmap(display, d, x, y, width, height, plane_mask, format) /* Get the BITMAP info into the Image. */ if (GetDIBits(hdcMem, hbmp, 0, height, smallBitData, bmInfo, - DIB_RGB_COLORS) == 0) { + DIB_RGB_COLORS) == 0) { ckfree((char *) ret_image->data); ckfree((char *) ret_image); ckfree((char *) smallBitBase); ret_image = NULL; goto cleanup; } - /* Copy the 24 Bit Pixmap to a 32-Bit one. */ for (h = 0; h < height; h++) { bigBitData = ret_image->data + h * ret_image->bytes_per_line; smallBitData = smallBitBase + h * byte_width; - + for (w = 0; w < width; w++) { *bigBitData++ = ((*smallBitData++)); *bigBitData++ = ((*smallBitData++)); -- cgit v0.12 From 32c3620333d2a0608a749aff93284c034a9dab09 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 29 Oct 2003 01:08:19 +0000 Subject: * tests/focusTcl.test (setup1): expand frame size to allow for correct visibility of windows that use larger default fonts. --- tests/focusTcl.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/focusTcl.test b/tests/focusTcl.test index db064e0..fed65fd 100644 --- a/tests/focusTcl.test +++ b/tests/focusTcl.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: focusTcl.test,v 1.5 2002/07/14 15:45:23 dgp Exp $ +# RCS: @(#) $Id: focusTcl.test,v 1.5.2.1 2003/10/29 01:08:19 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -21,7 +21,7 @@ proc setup1 w { set w "" } foreach i {a b c d} { - frame $w.$i -width 100 -height 50 -bd 2 -relief raised + frame $w.$i -width 200 -height 50 -bd 2 -relief raised pack $w.$i } .b configure -width 0 -height 0 -- cgit v0.12 From 154047c98418988037e8fb8e59f990a9661ab493 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 29 Oct 2003 01:08:29 +0000 Subject: see changes --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index aa51442..0b0a9f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-10-28 Jeff Hobbs + + * win/tkWinImage.c (XGetImageZPixmap): add separate 16bpp + XGetImage code to correctly handle 16bpp requests. This appears + to never have worked correctly. + + * tests/focusTcl.test (setup1): expand frame size to allow for + correct visibility of windows that use larger default fonts. + 2003-10-28 Donal K. Fellows * library/tk.tcl (::tk::PlaceWindow): Added check for empty string -- cgit v0.12 From d45313986c3d6fa76764b573e3756ced4178072b Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 29 Oct 2003 01:38:53 +0000 Subject: added extra change note --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0b0a9f7..941d80f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-10-28 Jeff Hobbs + * unix/tkUnixFont.c (GetFontAttributes): place extra check for NULL + family against bad X servers. + * win/tkWinImage.c (XGetImageZPixmap): add separate 16bpp XGetImage code to correctly handle 16bpp requests. This appears to never have worked correctly. -- cgit v0.12 From ea842e2dd7a53e72534b6252b0a151ab79e32365 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 29 Oct 2003 09:40:34 +0000 Subject: * library/tkfbox.tcl (IconList_Create,IconList_Add): Added option munging to allow some control of foreground colours on Unix in the same way that you can influence the background. [Bug 795717] --- ChangeLog | 6 ++++++ library/tkfbox.tcl | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 941d80f..f1824b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-10-29 Donal K. Fellows + + * library/tkfbox.tcl (IconList_Create,IconList_Add): Added option + munging to allow some control of foreground colours on Unix in the + same way that you can influence the background. [Bug 795717] + 2003-10-28 Jeff Hobbs * unix/tkUnixFont.c (GetFontAttributes): place extra check for NULL diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index fb4a8e4..384a473 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.38 2003/02/21 14:13:26 dkf Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.1 2003/10/29 09:40:34 dkf Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -238,6 +238,12 @@ proc ::tk::IconList_Create {w} { set data(noScroll) 1 set data(selection) {} set data(index,anchor) "" + set fg [option get $data(canvas) foreground Foreground] + if {$fg eq ""} { + set data(fill) black + } else { + set data(fill) $fg + } # Creates the event bindings. # @@ -342,7 +348,7 @@ proc ::tk::IconList_Add {w image items} { set iTag [$data(canvas) create image 0 0 -image $image -anchor nw \ -tags [list icon $data(numItems) item$data(numItems)]] set tTag [$data(canvas) create text 0 0 -text $text -anchor nw \ - -font $data(font) \ + -font $data(font) -fill $data(fill) \ -tags [list text $data(numItems) item$data(numItems)]] set rTag [$data(canvas) create rect 0 0 0 0 -fill "" -outline "" \ -tags [list rect $data(numItems) item$data(numItems)]] -- cgit v0.12 From 94e994c1de50054c97d76535ff4168bda70e65c4 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 1 Nov 2003 21:44:32 +0000 Subject: Updated messages for Dutch from Arjen Markus and Pascal Scheffers [Patch 820519] --- ChangeLog | 5 +++++ library/msgs/nl.msg | 39 +++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1824b9..3785170 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-01 Donal K. Fellows + + * library/msgs/nl.msg: Updated messages from Arjen Markus and + Pascal Scheffers. Thanks! [Patch 820519] + 2003-10-29 Donal K. Fellows * library/tkfbox.tcl (IconList_Create,IconList_Add): Added option diff --git a/library/msgs/nl.msg b/library/msgs/nl.msg index daad847..90446c8 100644 --- a/library/msgs/nl.msg +++ b/library/msgs/nl.msg @@ -10,23 +10,26 @@ namespace eval ::tk { ::msgcat::mcset nl "Application Error" "Toepassingsfout" ::msgcat::mcset nl "&Blue" "&Blauw" ::msgcat::mcset nl "&Cancel" "&Annuleren" - ::msgcat::mcset nl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kan niet naar map \"%1\$s\" gaan.\nU heeft geen toestemming hiervoor." + ::msgcat::mcset nl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kan niet naar map \"%1\$s\" gaan.\nU heeft hiervoor geen toestemming." ::msgcat::mcset nl "Choose Directory" "Kies map" ::msgcat::mcset nl "Clear" "Wissen" - ::msgcat::mcset nl "Clear entry, Press OK; Enter %1\$s, press OK" "Wis veld, Druk op OK; Geef %1\$s in, druk op OK" + ::msgcat::mcset nl "Clear entry, Press OK; Enter %1\$s, press OK" "Wis veld, Druk op OK; typ %1\$s in, druk op OK" + ::msgcat::mcset nl "&Clear Console" "&Wis Console" ::msgcat::mcset nl "Color" "Kleur" ::msgcat::mcset nl "Console" - ::msgcat::mcset nl "Copy" "Copi\u00ebren" + ::msgcat::mcset nl "Copy" "Kopi\u00ebren" ::msgcat::mcset nl "Cut" "Knippen" ::msgcat::mcset nl "Delete" "Wissen" ::msgcat::mcset nl "Details" ::msgcat::mcset nl "Details >>" ::msgcat::mcset nl "Directory \"%1\$s\" does not exist." "Map \"%1\$s\" bestaat niet." ::msgcat::mcset nl "&Directory:" "&Map:" - ::msgcat::mcset nl "Enter \"%1\$s\", press OK" "Toets \"%1\$s\", druk op OK" - ::msgcat::mcset nl "Enter \"%1\$s\", press OK, enter \"%2\$s\", press OK" "Toets \"%1\$s\", druk op OK, toets \"%2\$s\", druk op OK" + ::msgcat::mcset nl "Edit" "Bewerken" + ::msgcat::mcset nl "Enter \"%1\$s\", press OK" "Typ \"%1\$s\", druk op OK" + ::msgcat::mcset nl "Enter \"%1\$s\", press OK, enter \"%2\$s\", press OK" "Typ \"%1\$s\", druk op OK, typ \"%2\$s\", druk op OK" ::msgcat::mcset nl "Error: %1\$s" "Fout: %1\$s" ::msgcat::mcset nl "Exit" "Be\u00ebindigen" + ::msgcat::mcset nl "File" "Bestand" ::msgcat::mcset nl "File \"%1\$s\" already exists.\n\n" "Bestand \"%1\$s\" bestaat al.\n\n" ::msgcat::mcset nl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Bestand \"%1\$s\" bestaat al.\nWilt u het overschrijven?" ::msgcat::mcset nl "File \"%1\$s\" does not exist." "Bestand \"%1\$s\" bestaat niet." @@ -39,7 +42,7 @@ namespace eval ::tk { ::msgcat::mcset nl "&Green" "&Groen" ::msgcat::mcset nl "Hi" "H\u00e9" ::msgcat::mcset nl "Hide Console" "Verberg Console" - ::msgcat::mcset nl "&Ignore" + ::msgcat::mcset nl "&Ignore" "&Negeren" ::msgcat::mcset nl "Invalid file name \"%1\$s\"." "Ongeldige bestandsnaam \"%1\$s\"." ::msgcat::mcset nl "Log Files" "Log Bestanden" ::msgcat::mcset nl "&No" "&Nee" @@ -56,7 +59,7 @@ namespace eval ::tk { ::msgcat::mcset nl "Quit" "Stoppen" ::msgcat::mcset nl "&Red" "&Rood" ::msgcat::mcset nl "Replace existing file?" "Vervang bestaand bestand?" - ::msgcat::mcset nl "&Retry" "O&nieuw" + ::msgcat::mcset nl "&Retry" "&Herhalen" ::msgcat::mcset nl "&Save" "Op&slaan" ::msgcat::mcset nl "Save As" "Opslaan als" ::msgcat::mcset nl "Save To Log" "Opslaan naar Log" @@ -67,24 +70,24 @@ namespace eval ::tk { ::msgcat::mcset nl "Source..." "Bron..." ::msgcat::mcset nl "Tcl Scripts" ::msgcat::mcset nl "Tcl for Windows" "Tcl voor Windows" - ::msgcat::mcset nl "Text Files" "Tekst Bestanden" + ::msgcat::mcset nl "Text Files" "Tekstbestanden" ::msgcat::mcset nl "&Yes" "&Ja" ::msgcat::mcset nl "abort" "afbreken" ::msgcat::mcset nl "abort, retry, ignore, ok, cancel, no, or yes" "afbreken, opnieuw, negeren, ok, annuleren, nee, of ja" ::msgcat::mcset nl "abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel" "abortretryignore, ok, okcancel, retrycancel, yesno, of yesnocancel" - ::msgcat::mcset nl "bad %1\$s value \"%2\$s\": must be %3\$s" "foutieve %1\$s waarde \"%2\$s\": moet zijn %3\$s" - ::msgcat::mcset nl "bad file type \"%1\$s\", should be" "foutief bestandstype \"%1\$s\", moet zijn" - ::msgcat::mcset nl "bad option \"%1\$s\": should be %2\$s" "foutieve optie \"%1\$s\": moet zijn %2\$s" - ::msgcat::mcset nl "bad window path name \"%1\$s\"" "foutieve window pad naam \"%1\$s\"" + ::msgcat::mcset nl "bad %1\$s value \"%2\$s\": must be %3\$s" "verkeerde %1\$s waarde \"%2\$s\": moet zijn %3\$s" + ::msgcat::mcset nl "bad file type \"%1\$s\", should be" "verkeerd bestandstype \"%1\$s\", moet zijn" + ::msgcat::mcset nl "bad option \"%1\$s\": should be %2\$s" "verkeerde optie \"%1\$s\": moet zijn %2\$s" + ::msgcat::mcset nl "bad window path name \"%1\$s\"" "verkeerde window-padnaam \"%1\$s\"" ::msgcat::mcset nl "blue" "blauw" - ::msgcat::mcset nl "can't post %1\$s: it isn't a descendant of %2\$s (this is a new requirement in Tk versions 3.0 and later)" "kan %1\$s niet verzenden: het is geen afstammeling van %2\$s (dit is een niewe verplichting in Tk versies 3.0 en later)" + ::msgcat::mcset nl "can't post %1\$s: it isn't a descendant of %2\$s (this is a new requirement in Tk versions 3.0 and later)" "kan %1\$s niet verzenden: het is geen afstammeling van %2\$s (dit is een nieuwe eis in Tk versies 3.0 en later)" ::msgcat::mcset nl "cancel" "annuleren" ::msgcat::mcset nl "default button index greater than number of buttons specified for tk_dialog" "default knop index is groter dan het aantal knoppen beschikbaar voor tk_dialog" ::msgcat::mcset nl "display name to use (current one otherwise)" "te gebruiken schermnaam (anders huidige scherm)" ::msgcat::mcset nl "error, info, question, or warning" "error, info, question, of warning" ::msgcat::mcset nl "extension" ::msgcat::mcset nl "extensions" - ::msgcat::mcset nl "focus group \"%1\$s\" doesn't exist" "focus groep \"%1\$s\" bestaat niet" + ::msgcat::mcset nl "focus group \"%1\$s\" doesn't exist" "focusgroep \"%1\$s\" bestaat niet" ::msgcat::mcset nl "green" "groen" ::msgcat::mcset nl "history event %1\$s" ::msgcat::mcset nl "ignore" "negeren" @@ -92,15 +95,15 @@ namespace eval ::tk { ::msgcat::mcset nl "macType" ::msgcat::mcset nl "macTypes" ::msgcat::mcset nl "must specify a background color" "een achtergrondkleur is verplicht" - ::msgcat::mcset nl "name of the slave interpreter" "naam van de slaaf interpreter" + ::msgcat::mcset nl "name of the slave interpreter" "naam van de slaaf-interpreter" ::msgcat::mcset nl "no winfo screen . nor env(DISPLAY)" "geen winfo scherm . noch env(DISPLAY)" ::msgcat::mcset nl "ok" ::msgcat::mcset nl "red" "rood" ::msgcat::mcset nl "retry" "opnieuw" ::msgcat::mcset nl "should contain 5 or 4 elements" "moet 4 of 5 elementen bevatten" ::msgcat::mcset nl "spec" - ::msgcat::mcset nl "tk_chooseDirectory command" "tk_chooseDirectory commando" - ::msgcat::mcset nl "tk_chooseDirectory command, cancel gives null" "tk_chooseDirectory commando, annuleren geeft lege waarde" - ::msgcat::mcset nl "tk_chooseDirectory command, initialdir" "tk_chooseDirectory commando, initi\u00eble map" + ::msgcat::mcset nl "tk_chooseDirectory command" "tk_chooseDirectory opdracht" + ::msgcat::mcset nl "tk_chooseDirectory command, cancel gives null" "tk_chooseDirectory opdracht, annuleren geeft lege waarde" + ::msgcat::mcset nl "tk_chooseDirectory command, initialdir" "tk_chooseDirectory opdracht, initi\u00eble map" ::msgcat::mcset nl "yes" "ja" } -- cgit v0.12 From 231215f810e8b352d079b976e7911f0731a977b5 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 00:05:19 +0000 Subject: * generic/tkImgPhoto.c (ImgPhotoBlendComplexAlpha): add alpha blending for images with partial transparency. Only operates for 15bpp+ display, and not on Mac at all. [Bug 809157] --- generic/tkImgPhoto.c | 275 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 259 insertions(+), 16 deletions(-) diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index b0ea9d8..5bec1a6 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -8,6 +8,7 @@ * Copyright (c) 1994 The Australian National University. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 2002 Donal K. Fellows + * Copyright (c) 2003 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -16,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.2 2003/07/17 13:05:53 dkf Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.3 2003/11/11 00:05:19 hobbs Exp $ */ #include "tkInt.h" @@ -178,10 +179,13 @@ typedef struct PhotoMaster { * components. * IMAGE_CHANGED: 1 means that the instances of this image * need to be redithered. + * COMPLEX_ALPHA: 1 means that the instances of this image + * have alpha values that aren't 0 or 255. */ #define COLOR_IMAGE 1 #define IMAGE_CHANGED 2 +#define COMPLEX_ALPHA 4 /* * The following data structure represents all of the instances of @@ -389,6 +393,11 @@ static int ImgPhotoConfigureMaster _ANSI_ARGS_(( int objc, Tcl_Obj *CONST objv[], int flags)); static void ImgPhotoConfigureInstance _ANSI_ARGS_(( PhotoInstance *instancePtr)); +static int ToggleComplexAlphaIfNeeded _ANSI_ARGS_(( + PhotoMaster *mPtr)); +static void ImgPhotoBlendComplexAlpha _ANSI_ARGS_(( + XImage *bgImg, PhotoInstance *iPtr, + int xOffset, int yOffset, int width, int height)); static int ImgPhotoSetSize _ANSI_ARGS_((PhotoMaster *masterPtr, int width, int height)); static void ImgPhotoInstanceSetSize _ANSI_ARGS_(( @@ -2082,6 +2091,9 @@ ImgPhotoConfigureMaster(interp, masterPtr, objc, objv, flags) if (oldFormat != NULL) { Tcl_DecrRefCount(oldFormat); } + + ToggleComplexAlphaIfNeeded(masterPtr); + return TCL_OK; errorExit: @@ -2234,7 +2246,6 @@ ImgPhotoConfigureInstance(instancePtr) validBox.width, validBox.height); } } - } /* @@ -2434,6 +2445,200 @@ ImgPhotoGet(tkwin, masterData) /* *---------------------------------------------------------------------- * + * ToggleComplexAlphaIfNeeded -- + * + * This procedure is called when an image is modified to + * check if any partially transparent pixels exist, which + * requires blending instead of straight copy. + * + * Results: + * None. + * + * Side effects: + * (Re)sets COMPLEX_ALPHA flag of master. + * + *---------------------------------------------------------------------- + */ + +static int +ToggleComplexAlphaIfNeeded(PhotoMaster *mPtr) +{ + size_t len = MAX(mPtr->userWidth, mPtr->width) * + MAX(mPtr->userHeight, mPtr->height) * 4; + unsigned char *c = mPtr->pix32; + unsigned char *end = c + len; + + /* + * Set the COMPLEX_ALPHA flag if we have an image with partially + * transparent bits. + */ + mPtr->flags &= ~COMPLEX_ALPHA; + c += 3; /* start at first alpha byte */ + for (; c < end; c += 4) { + if (*c && *c != 255) { + mPtr->flags |= COMPLEX_ALPHA; + break; + } + } + return (mPtr->flags & COMPLEX_ALPHA); +} + +/* + *---------------------------------------------------------------------- + * + * ImgPhotoBlendComplexAlpha -- + * + * This procedure is called when an image with partially + * transparent pixels must be drawn over another image. + * + * Results: + * None. + * + * Side effects: + * Background image passed in gets drawn over with image data. + * + *---------------------------------------------------------------------- + */ +/* + * This should work on all platforms that set mask and shift data properly + * from the visualInfo. + * RGB is really only a 24+ bpp version whereas RGB15 is the correct version + * and works for 15bpp+, but it slower, so it's only used for 15bpp+. + */ +#ifndef __WIN32__ +#define GetRValue(rgb) (UCHAR((rgb & red_mask) >> red_shift)) +#define GetGValue(rgb) (UCHAR((rgb & green_mask) >> green_shift)) +#define GetBValue(rgb) (UCHAR((rgb & blue_mask) >> blue_shift)) +#define RGB(r,g,b) ((unsigned)((UCHAR(r)<masterPtr->pix32; + unsigned char *masterPtr; + +#ifndef __WIN32__ + /* + * We have to get the mask and shift info from the visual. + * This might be cached for better performance. + */ + unsigned long red_mask, green_mask, blue_mask; + unsigned long red_shift, green_shift, blue_shift; + Visual *visual = iPtr->visualInfo.visual; + + red_mask = visual->red_mask; + green_mask = visual->green_mask; + blue_mask = visual->blue_mask; + red_shift = 0; + green_shift = 0; + blue_shift = 0; + while ((0x0001 & (red_mask >> red_shift)) == 0) red_shift++; + while ((0x0001 & (green_mask >> green_shift)) == 0) green_shift++; + while ((0x0001 & (blue_mask >> blue_shift)) == 0) blue_shift++; +#endif + +#define ALPHA_BLEND(bgPix, imgPix, alpha, unalpha) \ + ((bgPix * unalpha + imgPix * alpha) / 255) + +#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) + /* + * Only unix requires the special case for <24bpp. It varies with + * 3 extra shifts and uses RGB15. The 24+bpp version could also + * then be further optimized. + */ + if (bgImg->depth < 24) { + unsigned char red_mlen, green_mlen, blue_mlen; + + red_mlen = 8 - CountBits(red_mask >> red_shift); + green_mlen = 8 - CountBits(green_mask >> green_shift); + blue_mlen = 8 - CountBits(blue_mask >> blue_shift); + for (y = 0; y < height; y++) { + line = (y + yOffset) * iPtr->masterPtr->width; + for (x = 0; x < width; x++) { + masterPtr = alphaAr + ((line + x + xOffset) * 4); + alpha = masterPtr[3]; + /* + * Ignore pixels that are fully transparent + */ + if (alpha) { + /* + * We could perhaps be more efficient than XGetPixel for + * 24 and 32 bit displays, but this seems "fast enough". + */ + r = masterPtr[0]; + g = masterPtr[1]; + b = masterPtr[2]; + if (alpha != 255) { + /* + * Only blend pixels that have some transparency + */ + unsigned char ra, ga, ba; + + pixel = XGetPixel(bgImg, x, y); + ra = GetRValue(pixel) << red_mlen; + ga = GetGValue(pixel) << green_mlen; + ba = GetBValue(pixel) << blue_mlen; + unalpha = 255 - alpha; + r = ALPHA_BLEND(ra, r, alpha, unalpha); + g = ALPHA_BLEND(ga, g, alpha, unalpha); + b = ALPHA_BLEND(ba, b, alpha, unalpha); + } + XPutPixel(bgImg, x, y, RGB15(r, g, b)); + } + } + } + } else +#endif + for (y = 0; y < height; y++) { + line = (y + yOffset) * iPtr->masterPtr->width; + for (x = 0; x < width; x++) { + masterPtr = alphaAr + ((line + x + xOffset) * 4); + alpha = masterPtr[3]; + /* + * Ignore pixels that are fully transparent + */ + if (alpha) { + /* + * We could perhaps be more efficient than XGetPixel for + * 24 and 32 bit displays, but this seems "fast enough". + */ + r = masterPtr[0]; + g = masterPtr[1]; + b = masterPtr[2]; + if (alpha != 255) { + /* + * Only blend pixels that have some transparency + */ + unsigned char ra, ga, ba; + + pixel = XGetPixel(bgImg, x, y); + ra = GetRValue(pixel); + ga = GetGValue(pixel); + ba = GetBValue(pixel); + unalpha = 255 - alpha; + r = ALPHA_BLEND(ra, r, alpha, unalpha); + g = ALPHA_BLEND(ga, g, alpha, unalpha); + b = ALPHA_BLEND(ba, b, alpha, unalpha); + } + XPutPixel(bgImg, x, y, RGB(r, g, b)); + } + } + } +#undef ALPHA_BLEND +} + +/* + *---------------------------------------------------------------------- + * * ImgPhotoDisplay -- * * This procedure is invoked to draw a photo image. @@ -2461,6 +2666,7 @@ ImgPhotoDisplay(clientData, display, drawable, imageX, imageY, width, * correspond to imageX and imageY. */ { PhotoInstance *instancePtr = (PhotoInstance *) clientData; + XVisualInfo visInfo = instancePtr->visualInfo; /* * If there's no pixmap, it means that an error occurred @@ -2471,21 +2677,56 @@ ImgPhotoDisplay(clientData, display, drawable, imageX, imageY, width, return; } - /* - * masterPtr->region describes which parts of the image contain - * valid data. We set this region as the clip mask for the gc, - * setting its origin appropriately, and use it when drawing the - * image. - */ + if ( +#if defined(MAC_TCL) || defined(MAC_OSX_TK) + /* + * The retrieval of bgImg is currently not functional on OSX + * (and likely not OS9 either), so skip attempts to alpha blend. + */ + 0 && +#endif + (instancePtr->masterPtr->flags & COMPLEX_ALPHA) + && visInfo.depth >= 15 + && (visInfo.class == DirectColor || visInfo.class == TrueColor)) { + XImage *bgImg = NULL; - TkSetRegion(display, instancePtr->gc, instancePtr->masterPtr->validRegion); - XSetClipOrigin(display, instancePtr->gc, drawableX - imageX, - drawableY - imageY); - XCopyArea(display, instancePtr->pixels, drawable, instancePtr->gc, - imageX, imageY, (unsigned) width, (unsigned) height, - drawableX, drawableY); - XSetClipMask(display, instancePtr->gc, None); - XSetClipOrigin(display, instancePtr->gc, 0, 0); + /* + * Pull the current background from the display to blend with + */ + bgImg = XGetImage(display, drawable, drawableX, drawableY, + (unsigned int)width, (unsigned int)height, AllPlanes, ZPixmap); + if (bgImg == NULL) { + return; + } + + ImgPhotoBlendComplexAlpha(bgImg, instancePtr, + imageX, imageY, width, height); + + /* + * Color info is unimportant as we only do this operation for + * depth >= 15. + */ + TkPutImage(NULL, 0, display, drawable, instancePtr->gc, + bgImg, 0, 0, drawableX, drawableY, + (unsigned int) width, (unsigned int) height); + XDestroyImage(bgImg); + } else { + /* + * masterPtr->region describes which parts of the image contain + * valid data. We set this region as the clip mask for the gc, + * setting its origin appropriately, and use it when drawing the + * image. + */ + TkSetRegion(display, instancePtr->gc, instancePtr->masterPtr->validRegion); + XSetClipOrigin(display, instancePtr->gc, drawableX - imageX, + drawableY - imageY); + XCopyArea(display, instancePtr->pixels, drawable, instancePtr->gc, + imageX, imageY, (unsigned) width, (unsigned) height, + drawableX, drawableY); + XSetClipMask(display, instancePtr->gc, None); + XSetClipOrigin(display, instancePtr->gc, 0, 0); + } + XFlush (display); } /* @@ -2790,6 +3031,8 @@ ImgPhotoSetSize(masterPtr, width, height) } } + ToggleComplexAlphaIfNeeded(masterPtr); + /* * Now adjust the sizes of the pixmaps for all of the instances. */ -- cgit v0.12 From cc28a05ba298a726964b45ca22b9cfc39a65d8a4 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 00:05:36 +0000 Subject: * unix/Makefile.in (SHLIB_LD_FLAGS): include in Makefile as it is used in MAKE_LIB sometimes (ie: AIX-64) [Bug #829686] (jimix) --- unix/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index d19eef8..ecd6d59 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.87.2.1 2003/05/20 17:32:19 hobbs Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.87.2.2 2003/11/11 00:05:36 hobbs Exp $ # Current Tk version; used in various names. @@ -235,6 +235,7 @@ WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ STLIB_LD = @STLIB_LD@ SHLIB_LD = @SHLIB_LD@ +SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ TK_SHLIB_LD_EXTRAS = @TK_SHLIB_LD_EXTRAS@ -- cgit v0.12 From ffdad8d85818234b95b62f6c512b5144f74e5ec4 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 00:05:52 +0000 Subject: * win/configure: * win/configure.in: define TK_LIB_FLAG, TK_LIB_SPEC, TK_BUILD_LIB_SPEC, TK_STUB_LIB_SPEC, TK_STUB_LIB_PATH, and TK_BUILD_STUB_LIB_PATH for tkConfig.sh [Bug #826614] --- ChangeLog | 14 ++++++++++++++ win/configure | 24 ++++++++++++++++-------- win/configure.in | 26 +++++++++++++++++--------- 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3785170..f00e76d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2003-11-10 Jeff Hobbs + + * generic/tkImgPhoto.c (ImgPhotoBlendComplexAlpha): add alpha + blending for images with partial transparency. Only operates for + 15bpp+ display, and not on Mac at all. [Bug 809157] + + * win/configure: + * win/configure.in: define TK_LIB_FLAG, TK_LIB_SPEC, + TK_BUILD_LIB_SPEC, TK_STUB_LIB_SPEC, TK_STUB_LIB_PATH, and + TK_BUILD_STUB_LIB_PATH for tkConfig.sh [Bug #826614] + + * unix/Makefile.in (SHLIB_LD_FLAGS): include in Makefile as it is + used in MAKE_LIB sometimes (ie: AIX-64) [Bug #829686] (jimix) + 2003-11-01 Donal K. Fellows * library/msgs/nl.msg: Updated messages from Arjen Markus and diff --git a/win/configure b/win/configure index 4b0150b..df5d51d 100755 --- a/win/configure +++ b/win/configure @@ -1762,10 +1762,17 @@ eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}" eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. -# we also need to double check about including DBGX in lib names -# and spaces in file or directory names for the eval +# we also need to double check about spaces in path names +eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\"" +TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" +TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" + eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\"" -eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" +TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}" + +TK_STUB_LIB_SPEC="-L${libdir} ${TK_STUB_LIB_FLAG}" +TK_STUB_LIB_PATH="${libdir}/${TK_STUB_LIB_FILE}" +TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}" eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" @@ -1865,7 +1872,6 @@ fi -# undefined at this point for win @@ -1873,6 +1879,8 @@ fi +# undefined at this point for win + trap '' 1 2 15 @@ -2099,14 +2107,14 @@ s%@MAKE_LIB@%$MAKE_LIB%g s%@POST_MAKE_LIB@%$POST_MAKE_LIB%g s%@MAKE_DLL@%$MAKE_DLL%g s%@MAKE_EXE@%$MAKE_EXE%g -s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g -s%@TK_CC_SEARCH_FLAGS@%$TK_CC_SEARCH_FLAGS%g -s%@TK_LD_SEARCH_FLAGS@%$TK_LD_SEARCH_FLAGS%g s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g +s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g -s%@TK_BUILD_STUB_LIB_PATH@%$TK_BUILD_STUB_LIB_PATH%g s%@TK_STUB_LIB_PATH@%$TK_STUB_LIB_PATH%g +s%@TK_BUILD_STUB_LIB_PATH@%$TK_BUILD_STUB_LIB_PATH%g +s%@TK_CC_SEARCH_FLAGS@%$TK_CC_SEARCH_FLAGS%g +s%@TK_LD_SEARCH_FLAGS@%$TK_LD_SEARCH_FLAGS%g CEOF EOF diff --git a/win/configure.in b/win/configure.in index ad21f02..3397844 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.5 2003/10/03 16:32:40 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.6 2003/11/11 00:05:54 hobbs Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -153,10 +153,17 @@ eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}" eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. -# we also need to double check about including DBGX in lib names -# and spaces in file or directory names for the eval +# we also need to double check about spaces in path names +eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\"" +TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" +TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" + eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\"" -eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" +TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}" + +TK_STUB_LIB_SPEC="-L${libdir} ${TK_STUB_LIB_FLAG}" +TK_STUB_LIB_PATH="${libdir}/${TK_STUB_LIB_FILE}" +TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}" eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" @@ -256,14 +263,15 @@ AC_SUBST(POST_MAKE_LIB) AC_SUBST(MAKE_DLL) AC_SUBST(MAKE_EXE) -# undefined at this point for win -AC_SUBST(TK_BUILD_LIB_SPEC) -AC_SUBST(TK_CC_SEARCH_FLAGS) -AC_SUBST(TK_LD_SEARCH_FLAGS) AC_SUBST(TK_LIB_FLAG) AC_SUBST(TK_LIB_SPEC) +AC_SUBST(TK_BUILD_LIB_SPEC) AC_SUBST(TK_STUB_LIB_SPEC) -AC_SUBST(TK_BUILD_STUB_LIB_PATH) AC_SUBST(TK_STUB_LIB_PATH) +AC_SUBST(TK_BUILD_STUB_LIB_PATH) + +# undefined at this point for win +AC_SUBST(TK_CC_SEARCH_FLAGS) +AC_SUBST(TK_LD_SEARCH_FLAGS) AC_OUTPUT(Makefile tkConfig.sh) -- cgit v0.12 From 1a825a827b319c5449d9c3adbd30766238d2727a Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 00:26:33 +0000 Subject: * win/tkWinDraw.c (XFillRectangles): correctly handle the XGCValues.function parameter when filling rectangles. [Bug #820278] [Patch #820282] --- ChangeLog | 4 ++++ win/tkWinDraw.c | 31 +++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f00e76d..43a622c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2003-11-10 Jeff Hobbs + * win/tkWinDraw.c (XFillRectangles): correctly handle the + XGCValues.function parameter when filling rectangles. + [Bug #820278] [Patch #820282] + * generic/tkImgPhoto.c (ImgPhotoBlendComplexAlpha): add alpha blending for images with partial transparency. Only operates for 15bpp+ display, and not on Mac at all. [Bug 809157] diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 39a3d9c..21f0636 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDraw.c,v 1.12 2003/02/26 02:47:04 hobbs Exp $ + * RCS: @(#) $Id: tkWinDraw.c,v 1.12.2.1 2003/11/11 00:26:33 hobbs Exp $ */ #include "tkWinInt.h" @@ -630,7 +630,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles) int i; RECT rect; TkWinDCState state; - HBRUSH brush; + HBRUSH brush, oldBrush; if (d == None) { return; @@ -644,7 +644,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles) || gc->fill_style == FillOpaqueStippled) && gc->stipple != None) { TkWinDrawable *twdPtr = (TkWinDrawable *)gc->stipple; - HBRUSH oldBrush, stipple; + HBRUSH stipple; HBITMAP oldBitmap, bitmap; HDC dcMem; HBRUSH bgBrush = CreateSolidBrush(gc->background); @@ -694,9 +694,28 @@ XFillRectangles(display, d, gc, rectangles, nrectangles) DeleteObject(stipple); DeleteObject(bgBrush); } else { - for (i = 0; i < nrectangles; i++) { - TkWinFillRect(dc, rectangles[i].x, rectangles[i].y, - rectangles[i].width, rectangles[i].height, gc->foreground); + if (gc->function == GXcopy) { + for (i = 0; i < nrectangles; i++) { + rect.left = rectangles[i].x; + rect.right = rect.left + rectangles[i].width; + rect.top = rectangles[i].y; + rect.bottom = rect.top + rectangles[i].height; + FillRect(dc, &rect, brush); + } + } else { + HPEN newPen = CreatePen(PS_NULL, 0, gc->foreground); + HPEN oldPen = SelectObject(dc, newPen); + oldBrush = SelectObject(dc, brush); + + for (i = 0; i < nrectangles; i++) { + Rectangle(dc, rectangles[i].x, rectangles[i].y, + rectangles[i].x + rectangles[i].width + 1, + rectangles[i].y + rectangles[i].height + 1); + } + + SelectObject(dc, oldBrush); + SelectObject(dc, oldPen); + DeleteObject(newPen); } } DeleteObject(brush); -- cgit v0.12 From e14fceacc931a0c7f16a435383c3a427e69a26d0 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 18:21:09 +0000 Subject: * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): add unicode clipboard support. [Patch #840107] (senn) --- ChangeLog | 5 +++++ macosx/tkMacOSXClipboard.c | 47 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43a622c..679d7f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-11 Jeff Hobbs + + * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): + add unicode clipboard support. [Patch #840107] (senn) + 2003-11-10 Jeff Hobbs * win/tkWinDraw.c (XFillRectangles): correctly handle the diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c index b327b90..3c083e1 100644 --- a/macosx/tkMacOSXClipboard.c +++ b/macosx/tkMacOSXClipboard.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.2.2.1 2003/05/13 02:42:57 das Exp $ + * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.2.2.2 2003/11/11 18:21:09 hobbs Exp $ */ #include "tkInt.h" @@ -72,8 +72,37 @@ TkSelGetSelection( " GetCurrentScrap failed.", (char *) NULL); return TCL_ERROR; } - - err=GetScrapFlavorSize(scrapRef,'TEXT',&length); + + /* + * Try UNICODE first + */ + err = GetScrapFlavorSize(scrapRef, kScrapFlavorTypeUnicode, &length); + if (err == noErr && length > 0) { + Tcl_DString ds; + char *data; + + buf = (char *) ckalloc(length + 2); + buf[length] = 0; + buf[length+1] = 0; /* 2-byte unicode null */ + err = GetScrapFlavorData(scrapRef, kScrapFlavorTypeUnicode, + &length, buf); + if (err == noErr) { + Tcl_DStringInit(&ds); + Tcl_UniCharToUtfDString((Tcl_UniChar *)buf, + Tcl_UniCharLen((Tcl_UniChar *)buf), &ds); + for (data = Tcl_DStringValue(&ds); *data != '\0'; data++) { + if (*data == '\r') { + *data = '\n'; + } + } + result = (*proc)(clientData, interp, Tcl_DStringValue(&ds)); + Tcl_DStringFree(&ds); + ckfree(buf); + return result; + } + } + + err = GetScrapFlavorSize(scrapRef, 'TEXT', &length); if (err != noErr) { Tcl_AppendResult(interp, Tk_GetAtomName(tkwin, selection), " GetScrapFlavorSize failed.", (char *) NULL); @@ -287,6 +316,7 @@ TkSuspendClipboard() } if (targetPtr != NULL) { Tcl_DString encodedText; + Tcl_DString unicodedText; length = 0; for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL; @@ -313,6 +343,17 @@ TkSuspendClipboard() Tcl_UtfToExternalDString(TkMacOSXCarbonEncoding, buffer, length, &encodedText); PutScrapFlavor(scrapRef, 'TEXT', 0, Tcl_DStringLength(&encodedText), Tcl_DStringValue(&encodedText) ); Tcl_DStringFree(&encodedText); + + /* + * Also put unicode data on scrap + */ + Tcl_DStringInit(&unicodedText); + Tcl_UtfToUniCharDString(buffer, length, &unicodedText); + PutScrapFlavor(scrapRef, kScrapFlavorTypeUnicode, 0, + Tcl_DStringLength(&unicodedText), + Tcl_DStringValue(&unicodedText)); + Tcl_DStringFree(&unicodedText); + ckfree(buffer); } -- cgit v0.12 From 359e23ebdc992276e306cb81ac749dc725072d3f Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 19:41:49 +0000 Subject: * generic/tkListbox.c (ListboxDeleteSubCmd, ListboxListVarProc): free itemconfig data when removing it from table. [Bug #836483] --- ChangeLog | 3 +++ generic/tkListbox.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 679d7f7..68e260f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-11-11 Jeff Hobbs + * generic/tkListbox.c (ListboxDeleteSubCmd, ListboxListVarProc): + free itemconfig data when removing it from table. [Bug #836483] + * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): add unicode clipboard support. [Patch #840107] (senn) diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 78977d6..0f60a95 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkListbox.c,v 1.29 2003/02/25 02:07:25 hobbs Exp $ + * RCS: @(#) $Id: tkListbox.c,v 1.29.2.1 2003/11/11 19:41:50 hobbs Exp $ */ #include "tkPort.h" @@ -1402,8 +1402,7 @@ ListboxGetItemAttributes(interp, listPtr, index) Tcl_HashEntry *entry; ItemAttr *attrs; - entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)index, - &new); + entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)index, &new); if (new) { attrs = (ItemAttr *) ckalloc(sizeof(ItemAttr)); attrs->border = NULL; @@ -2398,6 +2397,7 @@ ListboxDeleteSubCmd(listPtr, first, last) entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)i); if (entry != NULL) { + ckfree((char *)Tcl_GetHashValue(entry)); Tcl_DeleteHashEntry(entry); } @@ -3367,6 +3367,7 @@ ListboxListVarProc(clientData, interp, name1, name2, flags) /* Clean up attributes */ entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)i); if (entry != NULL) { + ckfree((char *)Tcl_GetHashValue(entry)); Tcl_DeleteHashEntry(entry); } } -- cgit v0.12 From cf2d11dba3a14674460a3022a91de2d4618e6365 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Nov 2003 22:39:35 +0000 Subject: * library/tkfbox.tcl (::tk::dialog::file::Update): optimize the dir/files list separation by using the -tails, -directory and -type option of 'glob'. Also passes the glob the -filetypes filters instead of calling string match over each file. [Patch #833819] --- ChangeLog | 6 ++++++ library/tkfbox.tcl | 54 +++++++++++++++++++----------------------------------- 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68e260f..22c9ab9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-11-11 Jeff Hobbs + * library/tkfbox.tcl (::tk::dialog::file::Update): optimize the + dir/files list separation by using the -tails, -directory and + -type option of 'glob'. Also passes the glob the -filetypes + filters instead of calling string match over each file. + [Patch #833819] + * generic/tkListbox.c (ListboxDeleteSubCmd, ListboxListVarProc): free itemconfig data when removing it from table. [Bug #836483] diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 384a473..f5431cd 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.1 2003/10/29 09:40:34 dkf Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.2 2003/11/11 22:39:36 hobbs Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -773,7 +773,7 @@ proc ::tk::IconList_Reset {w} { namespace eval ::tk::dialog {} namespace eval ::tk::dialog::file { - namespace import ::tk::msgcat::* + namespace import -force ::tk::msgcat::* } # ::tk::dialog::file:: -- @@ -1195,8 +1195,7 @@ proc ::tk::dialog::file::Update {w} { return } set class [winfo class $w] - if { [string compare $class TkFDialog] && \ - [string compare $class TkChooseDir] } { + if {($class ne "TkFDialog") && ($class ne "TkChooseDir")} { return } @@ -1225,9 +1224,8 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] # should have been checked before ::tk::dialog::file::Update is called, so # we normally won't come to here. Anyways, give an error and abort # action. - tk_messageBox -type ok -parent $w -message \ - "[mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $data(selectPath)]"\ - -icon warning + tk_messageBox -type ok -parent $w -icon warning -message \ + [mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $data(selectPath)] cd $appPWD return } @@ -1240,47 +1238,33 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] $data(ent) config -cursor watch $w config -cursor watch update idletasks - + ::tk::IconList_DeleteAll $data(icons) # Make the dir list # - set completeFileList [lsort -dictionary -unique [glob -nocomplain .* *]] + set dirs [lsort -dictionary -unique \ + [glob -tails -directory . -type d -nocomplain .* *]] set dirList {} - foreach f $completeFileList { - if {[string equal $f .]} { - continue - } - if {[string equal $f ..]} { + foreach d $dirs { + if {$d eq "." || $d eq ".."} { continue } - if {[file isdir ./$f]} { - lappend dirList $f - } + lappend dirList $d } ::tk::IconList_Add $data(icons) $folder $dirList - if { [string equal $class TkFDialog] } { - # Make the file list if this is a File Dialog + + if {$class eq "TkFDialog"} { + # Make the file list if this is a File Dialog, selecting all + # but 'd'irectory type files. # + set cmd [list glob -tails -directory . -type {f b c l p s} -nocomplain] if {[string equal $data(filter) *]} { - set files $completeFileList + lappend cmd .* * } else { - set files {} - foreach f $completeFileList { - foreach pat $data(filter) { - if { [string match $pat $f] } { - lappend files $f - break - } - } - } - } - set fileList {} - foreach f $files { - if {![file isdir ./$f]} { - lappend fileList $f - } + eval [list lappend cmd] $data(filter) } + set fileList [lsort -dictionary -unique [eval $cmd]] ::tk::IconList_Add $data(icons) $file $fileList } -- cgit v0.12 From 6d0d80c1290840239c1332b8a766302b464e6ccd Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 12 Nov 2003 00:04:32 +0000 Subject: (::tk::dialog::file::ActivateEnt): allow typing filename into entry when tk_getOpenFile -multiple 1 is specified. [Bug #788069] --- library/tkfbox.tcl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index f5431cd..cc99e86 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.2 2003/11/11 22:39:36 hobbs Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.3 2003/11/12 00:04:32 hobbs Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -1509,10 +1509,17 @@ proc ::tk::dialog::file::ActivateEnt {w} { # names as a true list, watching out for a single file with a # space in the name. Thus we query the IconList directly. + set selIcos [::tk::IconList_Curselection $data(icons)] set data(selectFile) "" - foreach item [::tk::IconList_Curselection $data(icons)] { - ::tk::dialog::file::VerifyFileName $w \ + if {[llength $selIcos] == 0 && $text ne ""} { + # This assumes the user typed something in without selecting + # files - so assume they only type in a single filename. + ::tk::dialog::file::VerifyFileName $w $text + } else { + foreach item $selIcos { + ::tk::dialog::file::VerifyFileName $w \ [::tk::IconList_Get $data(icons) $item] + } } } else { ::tk::dialog::file::VerifyFileName $w $text -- cgit v0.12 From 945271515ead5b592c10eb661258f8c61b351b9a Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 12 Nov 2003 00:04:53 +0000 Subject: * generic/tkMenuDraw.c (TkPostSubmenu): add {} around menu name in case it has spaces when calling Tcl_VarEval. This is a hack until this is rewritten for proper Tcl_Obj handling. [Bug #723856] --- generic/tkMenuDraw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index ee1e89e..2df7a6d 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenuDraw.c,v 1.3.20.1 2003/07/15 13:59:06 vincentdarley Exp $ + * RCS: @(#) $Id: tkMenuDraw.c,v 1.3.20.2 2003/11/12 00:04:53 hobbs Exp $ */ #include "tkMenu.h" @@ -986,7 +986,7 @@ TkPostSubmenu(interp, menuPtr, mePtr) */ TkEventuallyRedrawMenu(menuPtr, (TkMenuEntry *) NULL); - result = Tcl_VarEval(interp, name, " unpost", (char *) NULL); + result = Tcl_VarEval(interp, "{", name, "} unpost", (char *) NULL); menuPtr->postedCascade = NULL; if (result != TCL_OK) { return result; @@ -1009,7 +1009,7 @@ TkPostSubmenu(interp, menuPtr, mePtr) name = Tcl_GetStringFromObj(mePtr->namePtr, NULL); Tk_GetRootCoords(menuPtr->tkwin, &x, &y); AdjustMenuCoords(menuPtr, mePtr, &x, &y, string); - result = Tcl_VarEval(interp, name, " post ", string, (char *) NULL); + result = Tcl_VarEval(interp, "{", name, "} post ", string, (char *) NULL); if (result != TCL_OK) { return result; } -- cgit v0.12 From 62397c286ba9f643a43b403afee53647389b4429 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 12 Nov 2003 00:05:12 +0000 Subject: * generic/tkButton.c (ConfigureButton): abort option processing if the button was deleted. [Bug #824479] --- ChangeLog | 9 +++++++++ generic/tkButton.c | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 22c9ab9..5efa0ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,19 @@ 2003-11-11 Jeff Hobbs + * generic/tkButton.c (ConfigureButton): abort option processing if + the button was deleted. [Bug #824479] + + * generic/tkMenuDraw.c (TkPostSubmenu): add {} around menu name in + case it has spaces when calling Tcl_VarEval. This is a hack until + this is rewritten for proper Tcl_Obj handling. [Bug #723856] + * library/tkfbox.tcl (::tk::dialog::file::Update): optimize the dir/files list separation by using the -tails, -directory and -type option of 'glob'. Also passes the glob the -filetypes filters instead of calling string match over each file. [Patch #833819] + (::tk::dialog::file::ActivateEnt): allow typing filename into + entry when tk_getOpenFile -multiple 1 is specified. [Bug #788069] * generic/tkListbox.c (ListboxDeleteSubCmd, ListboxListVarProc): free itemconfig data when removing it from table. [Bug #836483] diff --git a/generic/tkButton.c b/generic/tkButton.c index 7e629cb..a26249d 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.c,v 1.20.2.1 2003/04/26 02:53:46 hobbs Exp $ + * RCS: @(#) $Id: tkButton.c,v 1.20.2.2 2003/11/12 00:05:13 hobbs Exp $ */ #include "tkButton.h" @@ -1080,6 +1080,13 @@ ConfigureButton(interp, butPtr, objc, objv) Tk_RestoreSavedOptions(&savedOptions); } + if ((butPtr->flags & BUTTON_DELETED)) { + /* + * Somehow button was deleted - just abort now. [Bug #824479] + */ + return TCL_ERROR; + } + /* * A few options need special processing, such as setting the * background from a 3-D border, or filling in complicated -- cgit v0.12 From fb87ee2e5398380c907389f452c69da6fccc14af Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 12 Nov 2003 01:09:15 +0000 Subject: improve AIX --enable-64bit handling --- ChangeLog | 3 +++ unix/configure | 80 +++++++++++++++++++++++++++++----------------------------- unix/tcl.m4 | 74 ++++++++++++++++++++++++++--------------------------- 3 files changed, 80 insertions(+), 77 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5efa0ac..3b20f2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-11-11 Jeff Hobbs + * unix/configure: + * unix/tcl.m4: improve AIX --enable-64bit handling + * generic/tkButton.c (ConfigureButton): abort option processing if the button was deleted. [Bug #824479] diff --git a/unix/configure b/unix/configure index 1e362e0..e224955 100755 --- a/unix/configure +++ b/unix/configure @@ -2079,30 +2079,10 @@ fi LIBS="$LIBS -lc" # AIX-5 uses ELF style dynamic libraries SHLIB_CFLAGS="" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - if test "`uname -m`" = "ia64" ; then - # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - # AIX-5 has dl* in libc.so - DL_LIBS="" - if test "$GCC" = "yes" ; then - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' - fi - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - else - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - fi - # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LDFLAGS="" @@ -2122,6 +2102,26 @@ fi SHLIB_LD_FLAGS="-b64" fi fi + + if test "`uname -m`" = "ia64" ; then + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + if test "$GCC" = "yes" ; then + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + else + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + fi + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + else + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + fi ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then @@ -2133,7 +2133,6 @@ fi fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" @@ -2151,6 +2150,21 @@ fi DL_LIBS="-lld" fi + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = "yes" ; then + if test "$GCC" = "yes" ; then + echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 + else + do64bit_ok=yes + EXTRA_CFLAGS="-q64" + LDFLAGS="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + fi + fi + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to @@ -2164,7 +2178,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2168: checking for gettimeofday in -lbsd" >&5 +echo "configure:2182: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2172,7 +2186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2211,20 +2225,6 @@ fi EOF fi - - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then - if test "$GCC" = "yes" ; then - echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 - else - do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" - RANLIB="${RANLIB} -X64" - AR="${AR} -X64" - SHLIB_LD_FLAGS="-b64" - fi - fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 53a4615..5b4ed48 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -832,30 +832,10 @@ dnl AC_CHECK_TOOL(AR, ar) LIBS="$LIBS -lc" # AIX-5 uses ELF style dynamic libraries SHLIB_CFLAGS="" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - if test "`uname -m`" = "ia64" ; then - # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - # AIX-5 has dl* in libc.so - DL_LIBS="" - if test "$GCC" = "yes" ; then - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' - fi - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - else - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - fi - # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LDFLAGS="" @@ -875,6 +855,26 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_FLAGS="-b64" fi fi + + if test "`uname -m`" = "ia64" ; then + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + if test "$GCC" = "yes" ; then + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + else + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + fi + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + else + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + fi ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then @@ -886,7 +886,6 @@ dnl AC_CHECK_TOOL(AR, ar) fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" @@ -904,6 +903,21 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="-lld" fi + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = "yes" ; then + if test "$GCC" = "yes" ; then + AC_MSG_WARN("64bit mode not supported with GCC on $system") + else + do64bit_ok=yes + EXTRA_CFLAGS="-q64" + LDFLAGS="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + fi + fi + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to @@ -921,20 +935,6 @@ dnl AC_CHECK_TOOL(AR, ar) MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ) fi - - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then - if test "$GCC" = "yes" ; then - AC_MSG_WARN("64bit mode not supported with GCC on $system") - else - do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" - RANLIB="${RANLIB} -X64" - AR="${AR} -X64" - SHLIB_LD_FLAGS="-b64" - fi - fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" -- cgit v0.12 From 44b7fd8e3208bcb711ecddd19594f91d320a0e19 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Sun, 16 Nov 2003 06:02:13 +0000 Subject: Fixes pkgIndex.tcl generation so a symbols build is loaded when Tcl is symbols --- ChangeLog | 5 +++++ win/makefile.vc | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b20f2c..b1a111a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-15 David Gravereaux + + * win/makefile.vc: Fixes pkgIndex.tcl generation so a symbols build + is loaded when Tcl is symbols. + 2003-11-11 Jeff Hobbs * unix/configure: diff --git a/win/makefile.vc b/win/makefile.vc index 2762c4d..940ad76 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.67.2.3 2003/03/23 02:25:21 kennykb Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.67.2.4 2003/11/16 06:02:13 davygrvy Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -531,8 +531,12 @@ install-binaries: !if !$(STATIC_BUILD) @echo Creating package index "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" -del "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" - echo if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)] != 0} { return } > "$(OUT_DIR)\pkgIndex.tcl" - echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk] >>"$(OUT_DIR)\pkgIndex.tcl" + echo if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)] != 0} { return }> "$(OUT_DIR)\pkgIndex.tcl" + echo if {[info exists ::tcl_platform(debug)]} {>> "$(OUT_DIR)\pkgIndex.tcl" + echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin tk84g.dll] Tk]>> "$(OUT_DIR)\pkgIndex.tcl" + echo } else {>> "$(OUT_DIR)\pkgIndex.tcl" + echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin tk84.dll] Tk]>> "$(OUT_DIR)\pkgIndex.tcl" + echo }>> "$(OUT_DIR)\pkgIndex.tcl" $(CPY) "$(OUT_DIR)\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\" !endif -- cgit v0.12 From 96fcd84d863cd9ed49b2f5f3c492864fb4019e1d Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 17 Nov 2003 02:20:19 +0000 Subject: * win/makefile.vc: Restored consistency of pkgIndex.tcl file with that generated by Makefile. --- ChangeLog | 5 +++++ win/makefile.vc | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1a111a..9247060 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-16 Don Porter + + * win/makefile.vc: Restored consistency of pkgIndex.tcl file + with that generated by Makefile. + 2003-11-15 David Gravereaux * win/makefile.vc: Fixes pkgIndex.tcl generation so a symbols build diff --git a/win/makefile.vc b/win/makefile.vc index 940ad76..9ee562b 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.67.2.4 2003/11/16 06:02:13 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.67.2.5 2003/11/17 02:20:20 dgp Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -531,12 +531,8 @@ install-binaries: !if !$(STATIC_BUILD) @echo Creating package index "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" -del "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" - echo if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)] != 0} { return }> "$(OUT_DIR)\pkgIndex.tcl" - echo if {[info exists ::tcl_platform(debug)]} {>> "$(OUT_DIR)\pkgIndex.tcl" - echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin tk84g.dll] Tk]>> "$(OUT_DIR)\pkgIndex.tcl" - echo } else {>> "$(OUT_DIR)\pkgIndex.tcl" - echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin tk84.dll] Tk]>> "$(OUT_DIR)\pkgIndex.tcl" - echo }>> "$(OUT_DIR)\pkgIndex.tcl" + echo if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)] != 0} { return } > "$(OUT_DIR)\pkgIndex.tcl" + echo package ifneeded Tk $(DOTVERSION) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk] >>"$(OUT_DIR)\pkgIndex.tcl" $(CPY) "$(OUT_DIR)\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\" !endif -- cgit v0.12 From c89c58f9f55f3535385438ef48ab09a78b6a6f36 Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 17 Nov 2003 23:29:35 +0000 Subject: * generic/tkMenubutton.h: fixed compound menubutton handling like * generic/tkMenubutton.c: *button corrections of 2003-04-25. * mac/tkMacMenubutton.c (TkpDisplayMenuButton): * unix/tkUnixMenubu.c (TkpDisplayMenuButton): --- ChangeLog | 13 ++++-- generic/tkMenubutton.c | 37 ++++++++++++----- generic/tkMenubutton.h | 11 ++--- mac/tkMacMenubutton.c | 98 ++++++++++++++++++++++++------------------- unix/tkUnixMenubu.c | 111 ++++++++++++++++++++++++++++--------------------- 5 files changed, 158 insertions(+), 112 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9247060..7a2ac90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ -2003-11-16 Don Porter +2003-11-17 Jeff Hobbs - * win/makefile.vc: Restored consistency of pkgIndex.tcl file - with that generated by Makefile. + * generic/tkMenubutton.h: fixed compound menubutton handling like + * generic/tkMenubutton.c: *button corrections of 2003-04-25. + * mac/tkMacMenubutton.c (TkpDisplayMenuButton): + * unix/tkUnixMenubu.c (TkpDisplayMenuButton): + +2003-11-16 Don Porter + + * win/makefile.vc: Restored consistency of pkgIndex.tcl file + with that generated by Makefile. 2003-11-15 David Gravereaux diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 0d22be5..000b4f9 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenubutton.c,v 1.12 2002/08/05 04:30:40 dgp Exp $ + * RCS: @(#) $Id: tkMenubutton.c,v 1.12.2.1 2003/11/17 23:29:36 hobbs Exp $ */ #include "tkMenubutton.h" @@ -276,6 +276,7 @@ Tk_MenubuttonObjCmd(clientData, interp, objc, objv) mbPtr->activeTextGC = None; mbPtr->gray = None; mbPtr->disabledGC = None; + mbPtr->stippleGC = None; mbPtr->leftBearing = 0; mbPtr->rightBearing = 0; mbPtr->widthString = NULL; @@ -451,14 +452,16 @@ DestroyMenuButton(memPtr) if (mbPtr->disabledGC != None) { Tk_FreeGC(mbPtr->display, mbPtr->disabledGC); } + if (mbPtr->stippleGC != None) { + Tk_FreeGC(mbPtr->display, mbPtr->stippleGC); + } if (mbPtr->gray != None) { Tk_FreeBitmap(mbPtr->display, mbPtr->gray); } if (mbPtr->textLayout != NULL) { Tk_FreeTextLayout(mbPtr->textLayout); } - Tk_FreeConfigOptions((char *) mbPtr, mbPtr->optionTable, - mbPtr->tkwin); + Tk_FreeConfigOptions((char *) mbPtr, mbPtr->optionTable, mbPtr->tkwin); mbPtr->tkwin = NULL; Tcl_EventuallyFree((ClientData) mbPtr, TCL_DYNAMIC); } @@ -702,7 +705,6 @@ TkMenuButtonWorldChanged(instanceData) } mbPtr->normalTextGC = gc; - gcValues.font = Tk_FontId(mbPtr->tkfont); gcValues.foreground = mbPtr->activeFg->pixel; gcValues.background = Tk_3DBorderColor(mbPtr->activeBorder)->pixel; mask = GCForeground | GCBackground | GCFont; @@ -712,23 +714,36 @@ TkMenuButtonWorldChanged(instanceData) } mbPtr->activeTextGC = gc; - gcValues.font = Tk_FontId(mbPtr->tkfont); gcValues.background = Tk_3DBorderColor(mbPtr->normalBorder)->pixel; - if ((mbPtr->disabledFg != NULL) && (mbPtr->imageString == NULL)) { - gcValues.foreground = mbPtr->disabledFg->pixel; - mask = GCForeground | GCBackground | GCFont; - } else { + + /* + * Create the GC that can be used for stippling + */ + + if (mbPtr->stippleGC == None) { gcValues.foreground = gcValues.background; mask = GCForeground; if (mbPtr->gray == None) { - mbPtr->gray = Tk_GetBitmap(NULL, mbPtr->tkwin, - Tk_GetUid("gray50")); + mbPtr->gray = Tk_GetBitmap(NULL, mbPtr->tkwin, "gray50"); } if (mbPtr->gray != None) { gcValues.fill_style = FillStippled; gcValues.stipple = mbPtr->gray; mask |= GCFillStyle | GCStipple; } + mbPtr->stippleGC = Tk_GetGC(mbPtr->tkwin, mask, &gcValues); + } + + /* + * Allocate the disabled graphics context, for drawing text in + * its disabled state. + */ + + mask = GCForeground | GCBackground | GCFont; + if (mbPtr->disabledFg != NULL) { + gcValues.foreground = mbPtr->disabledFg->pixel; + } else { + gcValues.foreground = gcValues.background; } gc = Tk_GetGC(mbPtr->tkwin, mask, &gcValues); if (mbPtr->disabledGC != None) { diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h index 332d770..673d997 100644 --- a/generic/tkMenubutton.h +++ b/generic/tkMenubutton.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenubutton.h,v 1.8 2001/10/12 13:30:31 tmh Exp $ + * RCS: @(#) $Id: tkMenubutton.h,v 1.8.4.1 2003/11/17 23:29:36 hobbs Exp $ */ #ifndef _TKMENUBUTTON @@ -124,12 +124,9 @@ typedef struct { * means use normalTextGC). */ Pixmap gray; /* Pixmap for displaying disabled text/icon if * disabledFg is NULL. */ - GC disabledGC; /* Used to produce disabled effect. If - * disabledFg isn't NULL, this GC is used to - * draw button text or icon. Otherwise - * text or icon is drawn with normalGC and - * this GC is used to stipple background - * across it. */ + GC disabledGC; /* Used to produce disabled effect for text. */ + GC stippleGC; /* Used to produce disabled stipple effect + * for images when disabled. */ int leftBearing; /* Distance from text origin to leftmost drawn * pixel (positive means to right). */ int rightBearing; /* Amount text sticks right from its origin. */ diff --git a/mac/tkMacMenubutton.c b/mac/tkMacMenubutton.c index 7cdb16a..002c5d4 100644 --- a/mac/tkMacMenubutton.c +++ b/mac/tkMacMenubutton.c @@ -9,17 +9,17 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacMenubutton.c,v 1.9 2001/10/12 13:30:31 tmh Exp $ + * RCS: @(#) $Id: tkMacMenubutton.c,v 1.9.4.1 2003/11/17 23:29:36 hobbs Exp $ */ #include "tkMenubutton.h" #include "tkMacInt.h" #include -#define kShadowOffset (3) /* amount to offset shadow from frame */ -#define kTriangleWidth (11) /* width of the triangle */ -#define kTriangleHeight (6) /* height of the triangle */ -#define kTriangleMargin (5) /* margin around triangle */ +#define kShadowOffset (3) /* amount to offset shadow from frame */ +#define kTriangleWidth (11) /* width of the triangle */ +#define kTriangleHeight (6) /* height of the triangle */ +#define kTriangleMargin (5) /* margin around triangle */ /* * Declaration of Unix specific button structure. @@ -93,6 +93,7 @@ TkpDisplayMenuButton( int y; Tk_Window tkwin = mbPtr->tkwin; int width, height, fullWidth, fullHeight; + int imageWidth, imageHeight; int imageXOffset, imageYOffset, textXOffset, textYOffset; int haveImage = 0, haveText = 0; MacMenuButton * macMBPtr = (MacMenuButton *) mbPtr; @@ -128,6 +129,9 @@ TkpDisplayMenuButton( Tk_SizeOfBitmap(mbPtr->display, mbPtr->bitmap, &width, &height); haveImage = 1; } + imageWidth = width; + imageHeight = height; + haveText = (mbPtr->textWidth != 0 && mbPtr->textHeight != 0); /* @@ -199,46 +203,44 @@ TkpDisplayMenuButton( mbPtr->indicatorWidth + fullWidth, fullHeight, &x, &y); + imageXOffset += x; + imageYOffset += y; if (mbPtr->image != NULL) { Tk_RedrawImage(mbPtr->image, 0, 0, width, height, Tk_WindowId(tkwin), - x + imageXOffset, y + imageYOffset); - } - if (mbPtr->bitmap != None) { + imageXOffset, imageYOffset); + } else if (mbPtr->bitmap != None) { XCopyPlane(mbPtr->display, mbPtr->bitmap, Tk_WindowId(tkwin), gc, 0, 0, (unsigned) width, (unsigned) height, - x + imageXOffset, y + imageYOffset, 1); - } - if (haveText) { - Tk_DrawTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, - mbPtr->textLayout, x + textXOffset, y + textYOffset , - 0, -1); - Tk_UnderlineTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, - mbPtr->textLayout, x + textXOffset, y + textYOffset , - mbPtr->underline); + imageXOffset, imageYOffset, 1); } + + Tk_DrawTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, + mbPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, + mbPtr->textLayout, x + textXOffset, y + textYOffset, + mbPtr->underline); + } else if (haveImage) { + TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, + width + mbPtr->indicatorWidth, height, &x, &y); + imageXOffset += x; + imageYOffset += y; + if (mbPtr->image != NULL) { + Tk_RedrawImage(mbPtr->image, 0, 0, width, height, Tk_WindowId(tkwin), + imageXOffset, imageYOffset); + } else if (mbPtr->bitmap != None) { + XCopyPlane(mbPtr->display, mbPtr->bitmap, Tk_WindowId(tkwin), + gc, 0, 0, (unsigned) width, (unsigned) height, + x, y, 1); + } } else { - if (mbPtr->image != NULL) { - TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, - width + mbPtr->indicatorWidth, height, &x, &y); - Tk_RedrawImage(mbPtr->image, 0, 0, width, height, Tk_WindowId(tkwin), - x + imageXOffset, y + imageYOffset); - } else if (mbPtr->bitmap != None) { - TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, - width + mbPtr->indicatorWidth, height, &x, &y); - XCopyPlane(mbPtr->display, mbPtr->bitmap, Tk_WindowId(tkwin), - gc, 0, 0, (unsigned) width, (unsigned) height, - x + imageXOffset, y + imageYOffset, 1); - } else { - TkComputeAnchor(mbPtr->anchor, tkwin, mbPtr->padX, mbPtr->padY, - mbPtr->textWidth + mbPtr->indicatorWidth, - mbPtr->textHeight, &x, &y); - Tk_DrawTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, - mbPtr->textLayout, x + textXOffset, y + textYOffset, - 0, -1); - Tk_UnderlineTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, - mbPtr->textLayout, x + textXOffset, y + textYOffset , - mbPtr->underline); - } + TkComputeAnchor(mbPtr->anchor, tkwin, mbPtr->padX, mbPtr->padY, + mbPtr->textWidth + mbPtr->indicatorWidth, + mbPtr->textHeight, &x, &y); + Tk_DrawTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, + mbPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, + mbPtr->textLayout, x + textXOffset, y + textYOffset, + mbPtr->underline); } #if 0 /* this is the original code */ @@ -278,10 +280,20 @@ TkpDisplayMenuButton( if ((mbPtr->state == STATE_DISABLED) && ((mbPtr->disabledFg != NULL) || (mbPtr->image != NULL))) { - XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), - mbPtr->disabledGC, mbPtr->inset, mbPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*mbPtr->inset)); + /* + * Stipple the whole button if no disabledFg was specified, + * otherwise restrict stippling only to displayed image + */ + if (mbPtr->disabledFg == NULL) { + XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), + mbPtr->stippleGC, mbPtr->inset, mbPtr->inset, + (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), + (unsigned) (Tk_Height(tkwin) - 2*mbPtr->inset)); + } else { + XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), + mbPtr->stippleGC, imageXOffset, imageYOffset, + (unsigned) imageWidth, (unsigned) imageHeight); + } } /* diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c index 186bd75..6979069 100644 --- a/unix/tkUnixMenubu.c +++ b/unix/tkUnixMenubu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixMenubu.c,v 1.6 2001/05/21 14:07:33 tmh Exp $ + * RCS: @(#) $Id: tkUnixMenubu.c,v 1.6.4.1 2003/11/17 23:29:36 hobbs Exp $ */ #include "tkMenubutton.h" @@ -77,7 +77,10 @@ TkpDisplayMenuButton(clientData) int y = 0; register Tk_Window tkwin = mbPtr->tkwin; int width, height, fullWidth, fullHeight; - int imageXOffset, imageYOffset, textXOffset, textYOffset; + int textXOffset, textYOffset; + int imageWidth, imageHeight; + int imageXOffset, imageYOffset; /* image information that will be used to + * restrict disabled pixmap as well */ int haveImage = 0, haveText = 0; mbPtr->flags &= ~REDRAW_PENDING; @@ -104,6 +107,9 @@ TkpDisplayMenuButton(clientData) Tk_SizeOfBitmap(mbPtr->display, mbPtr->bitmap, &width, &height); haveImage = 1; } + imageWidth = width; + imageHeight = height; + haveText = (mbPtr->textWidth != 0 && mbPtr->textHeight != 0); /* @@ -126,7 +132,6 @@ TkpDisplayMenuButton(clientData) fullHeight = 0; if (mbPtr->compound != COMPOUND_NONE && haveImage && haveText) { - switch ((enum compound) mbPtr->compound) { case COMPOUND_TOP: case COMPOUND_BOTTOM: { @@ -174,49 +179,49 @@ TkpDisplayMenuButton(clientData) } TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, - mbPtr->indicatorWidth + fullWidth, fullHeight, - &x, &y); + mbPtr->indicatorWidth + fullWidth, fullHeight, &x, &y); + + imageXOffset += x; + imageYOffset += y; + if (mbPtr->image != NULL) { + Tk_RedrawImage(mbPtr->image, 0, 0, width, height, pixmap, + imageXOffset, imageYOffset); + } else if (mbPtr->bitmap != None) { + XSetClipOrigin(mbPtr->display, gc, imageXOffset, imageYOffset); + XCopyPlane(mbPtr->display, mbPtr->bitmap, pixmap, + gc, 0, 0, (unsigned) width, (unsigned) height, + imageXOffset, imageYOffset, 1); + XSetClipOrigin(mbPtr->display, gc, 0, 0); + } - if (mbPtr->image != NULL) { - Tk_RedrawImage(mbPtr->image, 0, 0, width, height, pixmap, - x + imageXOffset, y + imageYOffset); - } - if (mbPtr->bitmap != None) { - XCopyPlane(mbPtr->display, mbPtr->bitmap, pixmap, - gc, 0, 0, (unsigned) width, (unsigned) height, - x + imageXOffset, y + imageYOffset, 1); - } - if (haveText) { - Tk_DrawTextLayout(mbPtr->display, pixmap, gc, mbPtr->textLayout, - x + textXOffset, y + textYOffset , - 0, -1); - Tk_UnderlineTextLayout(mbPtr->display, pixmap, gc, - mbPtr->textLayout, x + textXOffset, y + textYOffset , - mbPtr->underline); - } + Tk_DrawTextLayout(mbPtr->display, pixmap, gc, mbPtr->textLayout, + x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(mbPtr->display, pixmap, gc, mbPtr->textLayout, + x + textXOffset, y + textYOffset, mbPtr->underline); + } else if (haveImage) { + TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, + width + mbPtr->indicatorWidth, height, &x, &y); + imageXOffset += x; + imageYOffset += y; + if (mbPtr->image != NULL) { + Tk_RedrawImage(mbPtr->image, 0, 0, width, height, pixmap, + imageXOffset, imageYOffset); + } else if (mbPtr->bitmap != None) { + XSetClipOrigin(mbPtr->display, gc, x, y); + XCopyPlane(mbPtr->display, mbPtr->bitmap, pixmap, + gc, 0, 0, (unsigned) width, (unsigned) height, + x, y, 1); + XSetClipOrigin(mbPtr->display, gc, 0, 0); + } } else { - if (mbPtr->image != NULL) { - TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, - width + mbPtr->indicatorWidth, height, &x, &y); - Tk_RedrawImage(mbPtr->image, 0, 0, width, height, pixmap, - x + imageXOffset, y + imageYOffset); - } else if (mbPtr->bitmap != None) { - TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, - width + mbPtr->indicatorWidth, height, &x, &y); - XCopyPlane(mbPtr->display, mbPtr->bitmap, pixmap, - gc, 0, 0, (unsigned) width, (unsigned) height, - x + imageXOffset, y + imageYOffset, 1); - } else { - TkComputeAnchor(mbPtr->anchor, tkwin, mbPtr->padX, mbPtr->padY, - mbPtr->textWidth + mbPtr->indicatorWidth, - mbPtr->textHeight, &x, &y); - Tk_DrawTextLayout(mbPtr->display, pixmap, gc, mbPtr->textLayout, - x + textXOffset, y + textYOffset , - 0, -1); - Tk_UnderlineTextLayout(mbPtr->display, pixmap, gc, - mbPtr->textLayout, x + textXOffset, y + textYOffset , - mbPtr->underline); - } + TkComputeAnchor(mbPtr->anchor, tkwin, mbPtr->padX, mbPtr->padY, + mbPtr->textWidth + mbPtr->indicatorWidth, + mbPtr->textHeight, &x, &y); + Tk_DrawTextLayout(mbPtr->display, pixmap, gc, mbPtr->textLayout, + x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(mbPtr->display, pixmap, gc, + mbPtr->textLayout, x + textXOffset, y + textYOffset, + mbPtr->underline); } /* @@ -226,10 +231,20 @@ TkpDisplayMenuButton(clientData) if ((mbPtr->state == STATE_DISABLED) && ((mbPtr->disabledFg == NULL) || (mbPtr->image != NULL))) { - XFillRectangle(mbPtr->display, pixmap, mbPtr->disabledGC, - mbPtr->inset, mbPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*mbPtr->inset)); + /* + * Stipple the whole button if no disabledFg was specified, + * otherwise restrict stippling only to displayed image + */ + if (mbPtr->disabledFg == NULL) { + XFillRectangle(mbPtr->display, pixmap, mbPtr->stippleGC, + mbPtr->inset, mbPtr->inset, + (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), + (unsigned) (Tk_Height(tkwin) - 2*mbPtr->inset)); + } else { + XFillRectangle(mbPtr->display, pixmap, mbPtr->stippleGC, + imageXOffset, imageYOffset, + (unsigned) imageWidth, (unsigned) imageHeight); + } } /* -- cgit v0.12 From efff505cd7b080f4a6e6bfd21d0601dbbbc9be16 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 18 Nov 2003 23:37:37 +0000 Subject: updated for 8.4.5 release --- ChangeLog | 6 ++++++ changes | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7a2ac90..378b48a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-18 Jeff Hobbs + + *** 8.4.5 TAGGED FOR RELEASE *** + + * changes: updated for 8.4.5 release + 2003-11-17 Jeff Hobbs * generic/tkMenubutton.h: fixed compound menubutton handling like diff --git a/changes b/changes index 94e1bf2..99d1958 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.2 2003/07/21 22:37:32 hobbs Exp $ +RCS: @(#) $Id: changes,v 1.64.2.3 2003/11/18 23:37:38 hobbs Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5544,3 +5544,48 @@ on unix. while moving the thumb. --- Released 8.4.4, July 22, 2003 --- See ChangeLog for details --- + +2003-08-13 (bug fix)[787065] Fix Button-2 binding for scale widget. + +2003-08-19 (bug fix)[791500] Fix panedwindow refresh glitches for bg. + +2003-09-17 (bug fix)[808039] Prevent [image create] from generating an +image command name that overwrites and existing command. + +2003-09-25 (enhancement) Added -compound support for OS X bevel buttons. + +2003-10-10 (bug fix) Fix image offset stippling for disabled buttons. + +2003-10-22 (enhancement)[827535] Constring tk_dialog to be sensibly sized and +placed + +2003-10-28 (bug fix) Add 16bpp XGetImage support on Windows + +2003-10-29 (enhancement)[795717] Allow some control of foreground and +background colors on Tk's tk_getOpenFile/tk_chooseDirectory. + +2003-11-01 (enhancement)[820519] Updated Dutch (nl) message catalog. + +2003-11-10 (enhancement)[826614] Provide more Tk build info in tkConfig.sh. + +2003-11-10 (enhancement)[809157] Add alpha blending for images with partial +transparency on Windows and Unix on 15bpp+ displays. + +2003-11-10 (enhancement)[820282] Use the XGCValues.function parameter when +filling rectangles with XFillRectangles on Windows. + +2003-11-11 (enhancement)[840107] Add OS X unicode clipboard support. + +2003-11-11 (enhancement)[833819] Improve Tk's +tk_getOpenFile/tk_chooseDirectory directory glob'ing speed. + +2003-11-11 (bug fix)[836483] Fix mem leak in '$listbox itemconfigure'. + +2003-11-11 (bug fix)[723856] Correctly handle menu (un)posting on menus +with spaces in their names. + +2003-11-11 (enhancement) Improve AIX-64 build configuration. + +2003-11-17 (bug fix) Fix menubutton -compound state disabled drawing. + +--- Released 8.4.5, November 20, 2003 --- See ChangeLog for details --- -- cgit v0.12 From da6b5c5be1253d049455800d5d64e8c3d8006a58 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 19 Nov 2003 16:28:17 +0000 Subject: typo corrections --- changes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/changes b/changes index 99d1958..05974ac 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.3 2003/11/18 23:37:38 hobbs Exp $ +RCS: @(#) $Id: changes,v 1.64.2.4 2003/11/19 16:28:17 dgp Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5550,13 +5550,13 @@ while moving the thumb. 2003-08-19 (bug fix)[791500] Fix panedwindow refresh glitches for bg. 2003-09-17 (bug fix)[808039] Prevent [image create] from generating an -image command name that overwrites and existing command. +image command name that overwrites an existing command. 2003-09-25 (enhancement) Added -compound support for OS X bevel buttons. 2003-10-10 (bug fix) Fix image offset stippling for disabled buttons. -2003-10-22 (enhancement)[827535] Constring tk_dialog to be sensibly sized and +2003-10-22 (enhancement)[827535] Constrain tk_dialog to be sensibly sized and placed 2003-10-28 (bug fix) Add 16bpp XGetImage support on Windows -- cgit v0.12 From 2d6c6f164e05ff0894578151d2b8f97664da269a Mon Sep 17 00:00:00 2001 From: cc_benny Date: Fri, 21 Nov 2003 13:05:09 +0000 Subject: * keyArray: Add 0x34 as . Add notes. (Merge from trunk 1.6) --- macosx/tkMacOSXKeyboard.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index d20fae7..e568e9f 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.5 2003/02/19 19:27:47 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.5.2.1 2003/11/21 13:05:09 cc_benny Exp $ */ #include "tkInt.h" @@ -25,9 +25,21 @@ typedef struct { KeySym keysym; /* X windows Keysym */ } KeyInfo; +/* + * Notes on keyArray: + * + * 0x34, XK_Return - Powerbooks use this and some keymaps define it. + * + * 0x47, XK_Clear - This key is NumLock when used on PCs, but Mac + * applications don't use it like that. + * + * All other keycodes are taken from the published ADB keyboard layouts. + */ + static KeyInfo keyArray[] = { {0x4C, XK_Return}, {0x24, XK_Return}, + {0x34, XK_Return}, {0x33, XK_BackSpace}, {0x75, XK_Delete}, {0x30, XK_Tab}, -- cgit v0.12 From 6b134221da3f3f4decb7b56686ab031c94902c7d Mon Sep 17 00:00:00 2001 From: cc_benny Date: Fri, 21 Nov 2003 13:09:17 +0000 Subject: * macosx/tkMacOSXKeyboard.c: Add PowerBook keycode 0x34 as . (Merge from trunk) --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 378b48a..a846604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-21 Benjamin Riefenstahl + + * macosx/tkMacOSXKeyboard.c: Add PowerBook keycode 0x34 as + . (Merge from trunk) + 2003-11-18 Jeff Hobbs *** 8.4.5 TAGGED FOR RELEASE *** -- cgit v0.12 From 0846b3417b95766d91c1ec7aa598a89f559e018f Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 21 Nov 2003 20:14:28 +0000 Subject: moved 8-4-5 tag to include OS X keyboard fix --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a846604..9085724 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,12 @@ 2003-11-21 Benjamin Riefenstahl + *** 8.4.5 TAGGED FOR RELEASE *** + * macosx/tkMacOSXKeyboard.c: Add PowerBook keycode 0x34 as . (Merge from trunk) 2003-11-18 Jeff Hobbs - *** 8.4.5 TAGGED FOR RELEASE *** - * changes: updated for 8.4.5 release 2003-11-17 Jeff Hobbs -- cgit v0.12 From 30898442d4bd1515e66413919387389ea326bebb Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 3 Dec 2003 04:57:37 +0000 Subject: * generic/tkMenu.c (MenuVarProc): prevent this from triggering while interp is being destroyed. --- ChangeLog | 5 +++++ generic/tkMenu.c | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9085724..a6b258f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-02 Jeff Hobbs + + * generic/tkMenu.c (MenuVarProc): prevent this from triggering + while interp is being destroyed. + 2003-11-21 Benjamin Riefenstahl *** 8.4.5 TAGGED FOR RELEASE *** diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 3e4c54a..9055c7a 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenu.c,v 1.20.2.1 2003/07/15 13:59:06 vincentdarley Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.20.2.2 2003/12/03 04:57:37 hobbs Exp $ */ /* @@ -2544,19 +2544,27 @@ MenuVarProc(clientData, interp, name1, name2, flags) TkMenuEntry *mePtr = (TkMenuEntry *) clientData; TkMenu *menuPtr; CONST char *value; - char *name = Tcl_GetStringFromObj(mePtr->namePtr, NULL); + char *name; char *onValue; + if (flags & TCL_INTERP_DESTROYED) { + /* + * Do nothing if the interpreter is going away. + */ + + return (char *) NULL; + } + menuPtr = mePtr->menuPtr; + name = Tcl_GetStringFromObj(mePtr->namePtr, NULL); /* - * If the variable is being unset, then re-establish the - * trace unless the whole interpreter is going away. + * If the variable is being unset, then re-establish the trace. */ if (flags & TCL_TRACE_UNSETS) { mePtr->entryFlags &= ~ENTRY_SELECTED; - if ((flags & TCL_TRACE_DESTROYED) && !(flags & TCL_INTERP_DESTROYED)) { + if (flags & TCL_TRACE_DESTROYED) { Tcl_TraceVar(interp, name, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MenuVarProc, clientData); -- cgit v0.12 From 515d4a7d9cdf8245707898a11789b1617a379a2f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 3 Dec 2003 17:20:45 +0000 Subject: * README: Bumped patch level to 8.4.6 to distinguish * generic/tk.h: CVS snapshots from the 8.4.5 release. * unix/configure.in: * unix/tk.spec: * win/configure.in: * macosx/Wish.pbproj/project.pbxproj: * unix/configure: autoconf (2.13) * win/configure: --- ChangeLog | 14 +++++++++++++- README | 4 ++-- generic/tk.h | 6 +++--- macosx/Wish.pbproj/project.pbxproj | 8 ++++---- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tk.spec | 6 +++--- win/configure | 2 +- win/configure.in | 4 ++-- 9 files changed, 31 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6b258f..b8eed5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,21 @@ +2003-12-03 Don Porter + + * README: Bumped patch level to 8.4.6 to distinguish + * generic/tk.h: CVS snapshots from the 8.4.5 release. + * unix/configure.in: + * unix/tk.spec: + * win/configure.in: + * macosx/Wish.pbproj/project.pbxproj: + + * unix/configure: autoconf (2.13) + * win/configure: + 2003-12-02 Jeff Hobbs * generic/tkMenu.c (MenuVarProc): prevent this from triggering while interp is being destroyed. -2003-11-21 Benjamin Riefenstahl +2x03-11-21 Benjamin Riefenstahl *** 8.4.5 TAGGED FOR RELEASE *** diff --git a/README b/README index bfae72e..10c6dd6 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.4.5 source distribution. + This is the Tk 8.4.6 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.39.2.3 2003/10/03 16:32:39 dgp Exp $ +RCS: @(#) $Id: README,v 1.39.2.4 2003/12/03 17:20:48 dgp Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index 1f7b530..46db3d2 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74.2.3 2003/10/03 16:32:39 dgp Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.4 2003/12/03 17:20:48 dgp Exp $ */ #ifndef _TK @@ -50,10 +50,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 4 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 5 +#define TK_RELEASE_SERIAL 6 #define TK_VERSION "8.4" -#define TK_PATCH_LEVEL "8.4.5" +#define TK_PATCH_LEVEL "8.4.6" /* * The following definitions set up the proper options for Macintosh diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 1d6779f..0deb31d 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1565,11 +1565,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType FMWK CFBundleShortVersionString - 8.4.5 + 8.4.6 CFBundleSignature WiSH CFBundleVersion - 8.4.5 + 8.4.6 "; @@ -2948,11 +2948,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType APPL CFBundleShortVersionString - 8.4.5 + 8.4.6 CFBundleSignature WiSH CFBundleVersion - 8.4.5 + 8.4.6 "; diff --git a/unix/configure b/unix/configure index e224955..9f0e082 100755 --- a/unix/configure +++ b/unix/configure @@ -547,7 +547,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5" +TK_PATCH_LEVEL=".6" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/configure.in b/unix/configure.in index 5ca56d8..25449c5 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.5 2003/10/06 16:59:25 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.6 2003/12/03 17:20:50 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5" +TK_PATCH_LEVEL=".6" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/tk.spec b/unix/tk.spec index a478bdc..2ad4552 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.15.2.3 2003/10/03 16:32:39 dgp Exp $ +# $Id: tk.spec,v 1.15.2.4 2003/12/03 17:20:50 dgp Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.4.5 +%define version 8.4.6 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: http://www.tcl.tk/ Packager: Carina Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.5 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.6 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure b/win/configure index df5d51d..71fb6b0 100755 --- a/win/configure +++ b/win/configure @@ -536,7 +536,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5" +TK_PATCH_LEVEL=".6" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index 3397844..f7a20d6 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.6 2003/11/11 00:05:54 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.7 2003/12/03 17:20:50 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5" +TK_PATCH_LEVEL=".6" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From a98255897b484296ee0539fe3dc7ad8db8330461 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 3 Dec 2003 17:55:08 +0000 Subject: * generic/tk.h: Bumped patch level to 8.4.5.1 to distinguish * unix/configure.in: CVS snapshots from the 8.4.5 release. * unix/tk.spec: * win/configure.in: * unix/configure: autoconf (2.13) * win/configure: --- ChangeLog | 6 ++---- README | 4 ++-- generic/tk.h | 6 +++--- macosx/Wish.pbproj/project.pbxproj | 8 ++++---- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tk.spec | 6 +++--- win/configure | 2 +- win/configure.in | 4 ++-- 9 files changed, 20 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8eed5d..5fffd37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,9 @@ 2003-12-03 Don Porter - * README: Bumped patch level to 8.4.6 to distinguish - * generic/tk.h: CVS snapshots from the 8.4.5 release. - * unix/configure.in: + * generic/tk.h: Bumped patch level to 8.4.5.1 to distinguish + * unix/configure.in: CVS snapshots from the 8.4.5 release. * unix/tk.spec: * win/configure.in: - * macosx/Wish.pbproj/project.pbxproj: * unix/configure: autoconf (2.13) * win/configure: diff --git a/README b/README index 10c6dd6..e5ae05d 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.4.6 source distribution. + This is the Tk 8.4.5 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.39.2.4 2003/12/03 17:20:48 dgp Exp $ +RCS: @(#) $Id: README,v 1.39.2.5 2003/12/03 17:55:09 dgp Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index 46db3d2..93bfd6d 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74.2.4 2003/12/03 17:20:48 dgp Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.5 2003/12/03 17:55:09 dgp Exp $ */ #ifndef _TK @@ -50,10 +50,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 4 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 6 +#define TK_RELEASE_SERIAL 5 #define TK_VERSION "8.4" -#define TK_PATCH_LEVEL "8.4.6" +#define TK_PATCH_LEVEL "8.4.5.1" /* * The following definitions set up the proper options for Macintosh diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 0deb31d..1d6779f 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1565,11 +1565,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType FMWK CFBundleShortVersionString - 8.4.6 + 8.4.5 CFBundleSignature WiSH CFBundleVersion - 8.4.6 + 8.4.5 "; @@ -2948,11 +2948,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType APPL CFBundleShortVersionString - 8.4.6 + 8.4.5 CFBundleSignature WiSH CFBundleVersion - 8.4.6 + 8.4.5 "; diff --git a/unix/configure b/unix/configure index 9f0e082..3c1936a 100755 --- a/unix/configure +++ b/unix/configure @@ -547,7 +547,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".6" +TK_PATCH_LEVEL=".5.1" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/configure.in b/unix/configure.in index 25449c5..24bf085 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.6 2003/12/03 17:20:50 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.7 2003/12/03 17:55:10 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".6" +TK_PATCH_LEVEL=".5.1" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/tk.spec b/unix/tk.spec index 2ad4552..93e804d 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.15.2.4 2003/12/03 17:20:50 dgp Exp $ +# $Id: tk.spec,v 1.15.2.5 2003/12/03 17:55:11 dgp Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.4.6 +%define version 8.4.5.1 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: http://www.tcl.tk/ Packager: Carina Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.6 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.5.1 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure b/win/configure index 71fb6b0..2dc5fe8 100755 --- a/win/configure +++ b/win/configure @@ -536,7 +536,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".6" +TK_PATCH_LEVEL=".5.1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index f7a20d6..b93582c 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.7 2003/12/03 17:20:50 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.8 2003/12/03 17:55:11 dgp Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".6" +TK_PATCH_LEVEL=".5.1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From fe44218e5bf30dcdfe939cb469cd5ef43a5eb78c Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Dec 2003 09:40:36 +0000 Subject: Line transposition bug. [Bug 857159] --- ChangeLog | 5 +++++ doc/CrtImgType.3 | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fffd37..252972e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-10 Donal K. Fellows + + * doc/CrtImgType.3: Fixed line-transposition error found by Eric + Raymond. [Bug 857159] + 2003-12-03 Don Porter * generic/tk.h: Bumped patch level to 8.4.5.1 to distinguish diff --git a/doc/CrtImgType.3 b/doc/CrtImgType.3 index 0793ca0..d762235 100644 --- a/doc/CrtImgType.3 +++ b/doc/CrtImgType.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtImgType.3,v 1.6 2002/08/05 04:30:38 dgp Exp $ +'\" RCS: @(#) $Id: CrtImgType.3,v 1.6.2.1 2003/12/10 09:40:43 dkf Exp $ '\" .so man.macros .TH Tk_CreateImageType 3 8.3 Tk "Tk Library Procedures" @@ -17,9 +17,9 @@ Tk_CreateImageType, Tk_GetImageMasterData, Tk_InitImageArgs \- define new kind o \fB#include \fR .sp \fBTk_CreateImageType\fR(\fItypePtr\fR) -ClientData .sp .VS +ClientData \fBTk_GetImageMasterData\fR(\fIinterp, name, typePtrPtr\fR) .sp \fBTk_InitImageArgs\fR(\fIinterp, argc, argvPtr\fR) -- cgit v0.12 From d361604df94801ca13f7925809f1fc4627a25a45 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Thu, 11 Dec 2003 03:32:05 +0000 Subject: (WishPanic) : placed ExitProcess() in a __try block (SEH) to catch any exceptions that might happen. As Tcl will call Tcl_Finalize from its DllMain due to the unload from ExitProcess() unloading Tcl, and if Tcl_Panic had gotten called in an __except block, this avoid the possibility of not being able to exit. Falls to TerminateProcess() in the __except case. Removed the #ifdef _MSC_VER around DebugBreak as that function exists in kernel32.dll and is not compiler dependent. I'd prefer to use if (IsDebuggerPresent()) DebugBreak(); but IsDebuggerPresent() isn't available in all kernel32.dll modules for all versions of windows. --- win/winMain.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/win/winMain.c b/win/winMain.c index edfd42f..1f4392f 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: winMain.c,v 1.15 2002/11/04 07:49:43 davygrvy Exp $ + * RCS: @(#) $Id: winMain.c,v 1.15.2.1 2003/12/11 03:32:05 davygrvy Exp $ */ #include @@ -239,10 +239,12 @@ WishPanic TCL_VARARGS_DEF(CONST char *,arg1) MessageBeep(MB_ICONEXCLAMATION); MessageBox(NULL, buf, "Fatal Error in Wish", MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND); -#ifdef _MSC_VER DebugBreak(); -#endif - ExitProcess(1); + __try { + ExitProcess(EXIT_FAILURE); + } __except (EXCEPTION_EXECUTE_HANDLER) { + TerminateProcess(GetCurrentProcess(), EXIT_FAILURE); + } } /* *------------------------------------------------------------------------- -- cgit v0.12 From c86c9821eacbf9a7d07182ec547b433515e8c59f Mon Sep 17 00:00:00 2001 From: davygrvy Date: Thu, 11 Dec 2003 03:38:59 +0000 Subject: no message --- ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 252972e..71eec50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2003-12-10 David Gravereaux + + * win/winMain.c (WishPanic) : placed ExitProcess() in a __try block + (SEH) to catch any exceptions that might happen. As Tcl will call + Tcl_Finalize from its DllMain due to the unload from ExitProcess() + unloading Tcl, and if Tcl_Panic had gotten called in an __except + block handling an exception, this avoid the possibility of not + being able to exit from the stack being a mess. Falls to + TerminateProcess() in the __except case. + + Removed the #ifdef _MSC_VER around DebugBreak as that function + exists in kernel32.dll and is not compiler dependent. I'd prefer + to use 'if (IsDebuggerPresent()) DebugBreak();' but + IsDebuggerPresent() isn't available in all kernel32.dll modules + for all versions of windows. + 2003-12-10 Donal K. Fellows * doc/CrtImgType.3: Fixed line-transposition error found by Eric -- cgit v0.12 From b48d0bec9dc1356cf8373e750c416d17de7f6e66 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Fri, 12 Dec 2003 00:42:10 +0000 Subject: Reverted to 1.15 for two reasons. 1) problem is best addressed in Tcl's DllMain() and 2) needs a MinGW custom assembly implimentation as it doesn't understand SEH syntax. --- win/winMain.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/win/winMain.c b/win/winMain.c index 1f4392f..2d2b161 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: winMain.c,v 1.15.2.1 2003/12/11 03:32:05 davygrvy Exp $ + * RCS: @(#) $Id: winMain.c,v 1.15.2.2 2003/12/12 00:42:10 davygrvy Exp $ */ #include @@ -32,7 +32,7 @@ */ static void setargv _ANSI_ARGS_((int *argcPtr, char ***argvPtr)); -static void WishPanic _ANSI_ARGS_(TCL_VARARGS(CONST char *,format)); +static Tcl_PanicProc WishPanic; #ifdef TK_TEST extern int Tktest_Init(Tcl_Interp *interp); @@ -239,12 +239,10 @@ WishPanic TCL_VARARGS_DEF(CONST char *,arg1) MessageBeep(MB_ICONEXCLAMATION); MessageBox(NULL, buf, "Fatal Error in Wish", MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND); +#ifdef _MSC_VER DebugBreak(); - __try { - ExitProcess(EXIT_FAILURE); - } __except (EXCEPTION_EXECUTE_HANDLER) { - TerminateProcess(GetCurrentProcess(), EXIT_FAILURE); - } +#endif + ExitProcess(1); } /* *------------------------------------------------------------------------- -- cgit v0.12 From e92fc386463d39f6cfa8c989c3ac4b66da3ec205 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Fri, 12 Dec 2003 00:54:48 +0000 Subject: no message --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 71eec50..c53fa4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-12-11 David Gravereaux + + win/winMain.c: Backed-out yesterdays change. Reverted to 1.15 for + two reasons. 1) problem is best addressed in Tcl's DllMain() and + 2) needs a MinGW custom assembly implimentation as it doesn't + understand SEH syntax. + 2003-12-10 David Gravereaux * win/winMain.c (WishPanic) : placed ExitProcess() in a __try block -- cgit v0.12 From 7bbf35d799607f27798c04e1a2292bdcf2d5e8e9 Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Wed, 17 Dec 2003 18:08:29 +0000 Subject: Import fix for jerky scrollbar behavior from TOT. --- ChangeLog | 9 ++++ macosx/tkMacOSXScrlbr.c | 134 ++++++++++++++++++++++++++++++------------------ 2 files changed, 93 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index c53fa4d..1279bfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-12-17 Jim Ingham + + * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. + This version is clearer, and works helps keep the mouse better pinned to the + scrollbar. I also removed the glitch where the scrollbar would jump get + its middle over the mouse when you first moved it. + + Import from TOT. + 2003-12-11 David Gravereaux win/winMain.c: Backed-out yesterdays change. Reverted to 1.15 for diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index ecf7c59..f7e40e5 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5 2002/11/20 05:21:08 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.1 2003/12/17 18:08:29 wolfsuit Exp $ */ #include "tkScrollbar.h" @@ -42,8 +42,8 @@ enum { #define MIN_SLIDER_LENGTH 5 #define MIN_SCROLLBAR_VALUE 0 -#define MAX_SCROLLBAR_VALUE 1000 -#define MAX_SCROLLBAR_DVALUE 1000.0 +#define SCROLLBAR_SCALING_VALUE 100000 +#define SCROLLBAR_SCALING_DVALUE 100000.0 /* * Declaration of Windows specific scrollbar structure. @@ -95,8 +95,12 @@ typedef struct MacScrollbar { */ static ControlActionUPP scrollActionProc = NULL; /* Pointer to func. */ static ThumbActionUPP thumbActionProc = NULL; /* Pointer to func. */ -static TkScrollbar *activeScrollPtr = NULL; /* Non-null when in thumb */ +static TkScrollbar *activeScrollPtr = NULL; /* Non-null when in thumb */ /* proc. */ +static Point activePoint; /* Used when + * activeScrollPtr is + * non-NULL */ + /* * Forward declarations for procedures defined later in this file: */ @@ -237,9 +241,9 @@ TkpDisplayScrollbar( if (macScrollPtr->sbHandle == NULL) { Rect r; - SInt16 initialValue; - SInt16 minValue; - SInt16 maxValue; + SInt32 initialValue; + SInt32 minValue; + SInt32 maxValue; SInt16 procID; WindowRef frontNonFloating; @@ -247,7 +251,7 @@ TkpDisplayScrollbar( r.right = r.bottom = 1; minValue = MIN_SCROLLBAR_VALUE; - maxValue = MAX_SCROLLBAR_VALUE; + maxValue = SCROLLBAR_SCALING_VALUE; initialValue = (minValue + maxValue)/2; procID = kControlScrollBarLiveProc; @@ -578,7 +582,7 @@ ThumbActionProc() register TkScrollbar *scrollPtr = activeScrollPtr; register MacScrollbar *macScrollPtr = (MacScrollbar *) activeScrollPtr; Tcl_DString cmdString; - int origValue, trackBarPin; + int origValue; double thumbWidth, newFirstFraction, trackBarSize; char valueString[40]; Point currentPoint = { 0, 0 }; @@ -603,21 +607,20 @@ ThumbActionProc() * Note: the arrowLength is equal to the thumb width of a Mac scrollbar. */ - origValue = GetControlValue(macScrollPtr->sbHandle); + origValue = GetControl32BitValue(macScrollPtr->sbHandle); GetControlBounds(macScrollPtr->sbHandle, &trackRect); + + thumbWidth = scrollPtr->lastFraction - scrollPtr->firstFraction; + if (scrollPtr->vertical == true) { trackBarSize = (double) (trackRect.bottom - trackRect.top - - (scrollPtr->arrowLength * 3)); - trackBarPin = trackRect.top + scrollPtr->arrowLength - + (scrollPtr->arrowLength / 2); - InsetRect(&trackRect, -25, -113); + - (scrollPtr->arrowLength * 3)); + InsetRect(&trackRect, -50, -226); } else { trackBarSize = (double) (trackRect.right - trackRect.left - - (scrollPtr->arrowLength * 3)); - trackBarPin = trackRect.left + scrollPtr->arrowLength - + (scrollPtr->arrowLength / 2); - InsetRect(&trackRect, -113, -25); + - (scrollPtr->arrowLength * 3)); + InsetRect(&trackRect, -226, -50); } /* @@ -638,24 +641,29 @@ ThumbActionProc() && ((trackingResult == kMouseTrackingMouseDragged) || (trackingResult == kMouseTrackingMouseMoved))) { /* - * Calculating this value is a little tricky. We need to calculate a - * value for where the thumb would be in a Motif widget (variable - * thumb). This value is what the "command" expects and is what will - * be resent to the scrollbar to update its value. + * Calculate where the scrollbar should move to, and reset the + * activePoint to where we are now. */ - thumbWidth = scrollPtr->lastFraction - scrollPtr->firstFraction; + newFirstFraction = scrollPtr->firstFraction; if (PtInRect(currentPoint, &trackRect)) { + double pixDiff; + double fracDelta; if (scrollPtr->vertical == true) { - newFirstFraction = (1.0 - thumbWidth) * - ((double) (currentPoint.v - trackBarPin) / trackBarSize); + pixDiff = (double)(currentPoint.v - activePoint.v); } else { - newFirstFraction = (1.0 - thumbWidth) * - ((double) (currentPoint.h - trackBarPin) / trackBarSize); + pixDiff = (double)(currentPoint.h - activePoint.h); } - } else { - newFirstFraction = ((double) origValue / MAX_SCROLLBAR_DVALUE) - * (1.0 - thumbWidth); - } + fracDelta = pixDiff/(trackBarSize); + newFirstFraction += fracDelta; + if (newFirstFraction > 1.0) { + newFirstFraction = 1.0; + } else if (newFirstFraction < 0.0) { + newFirstFraction = 0.0; + } + } + + activePoint = currentPoint; + sprintf(valueString, "%g", newFirstFraction); Tcl_DStringSetLength(&cmdString, 0); Tcl_DStringAppend(&cmdString, scrollPtr->command, @@ -763,10 +771,10 @@ ScrollbarBindProc( macScrollPtr->macFlags |= IN_MODAL_LOOP; if (eventPtr->type == ButtonPress) { - Point where; - Rect bounds; - int part, x, y, dummy; - unsigned int state; + Point where; + Rect bounds; + int part, x, y, dummy; + unsigned int state; CGrafPtr saveWorld; GDHandle saveDevice; GWorldPtr destPort; @@ -783,8 +791,8 @@ ScrollbarBindProc( TkMacOSXSetUpClippingRgn(Tk_WindowId(scrollPtr->tkwin)); TkMacOSXWinBounds((TkWindow *) scrollPtr->tkwin, &bounds); - where.h = eventPtr->xbutton.x + bounds.left; - where.v = eventPtr->xbutton.y + bounds.top; + where.h = eventPtr->xbutton.x + bounds.left; + where.v = eventPtr->xbutton.y + bounds.top; part = TestControl(macScrollPtr->sbHandle, where); if (part == kControlIndicatorPart && scrollPtr->jump == false) { /* @@ -794,6 +802,8 @@ ScrollbarBindProc( * so the callback may have access to it. */ activeScrollPtr = scrollPtr; + activePoint.h = where.h; + activePoint.v = where.v; part = TrackControl(macScrollPtr->sbHandle, where, (ControlActionUPP) thumbActionProc); activeScrollPtr = NULL; @@ -816,8 +826,9 @@ ScrollbarBindProc( */ thumbWidth = scrollPtr->lastFraction - scrollPtr->firstFraction; - newFirstFraction = (1.0 - thumbWidth) * - ((double) GetControlValue(macScrollPtr->sbHandle) / MAX_SCROLLBAR_DVALUE); + newFirstFraction = (1.0 - thumbWidth) * + ((double) GetControl32BitValue(macScrollPtr->sbHandle) / SCROLLBAR_SCALING_DVALUE); + sprintf(valueString, "%g", newFirstFraction); Tcl_DStringInit(&cmdString); @@ -931,8 +942,8 @@ UpdateControlValues( Tk_Window tkwin = scrollPtr->tkwin; MacDrawable * macDraw = (MacDrawable *) Tk_WindowId(scrollPtr->tkwin); WindowRef windowRef = GetControlOwner(macScrollPtr->sbHandle); - double middle; - SInt32 viewSize; + double dViewSize; + SInt32 viewSize, controlMax, controlValue; int flushRight = false; int flushBottom = false; Rect contrlRect, portRect; @@ -1066,23 +1077,46 @@ UpdateControlValues( /* * Given the Tk parameters for the fractions of the start and * end of the thumb, the following calculation determines the - * location for the fixed sized Macintosh thumb. + * location for the Macintosh thumb. + * The Aqua scroll control works as follows. + * The scrollbar's value is the position of the left (or top) side of + * the view area in the content area being scrolled. + * The maximum value of the control is therefore the dimension of + * the content area less the size of the view area. + * Since these values are all integers, and Tk gives the thumb position + * as fractions, we have introduced a scaling factor. + * */ - middle = scrollPtr->firstFraction / (scrollPtr->firstFraction + - (1.0 - scrollPtr->lastFraction)); + dViewSize = (scrollPtr->lastFraction - scrollPtr->firstFraction) + * SCROLLBAR_SCALING_DVALUE; - viewSize = (SInt32) ((scrollPtr->lastFraction - scrollPtr->firstFraction) - * MAX_SCROLLBAR_DVALUE); + viewSize = (SInt32) dViewSize; + controlMax = (SInt32) (SCROLLBAR_SCALING_DVALUE - dViewSize); + controlValue = (SInt32) (SCROLLBAR_SCALING_DVALUE * scrollPtr->firstFraction); + + SetControlViewSize(macScrollPtr->sbHandle,viewSize); + SetControl32BitValue(macScrollPtr->sbHandle, controlValue); + SetControl32BitMaximum(macScrollPtr->sbHandle, controlMax); + +#if 0 + middle = scrollPtr->firstFraction / + (1.0 - (scrollPtr->lastFraction - scrollPtr->firstFraction)); + viewSize = (SInt32) ((scrollPtr->lastFraction - scrollPtr->firstFraction) + * SCROLLBAR_SCALING_DVALUE + / (1.0 - (scrollPtr->lastFraction - scrollPtr->firstFraction))); + + SetControlViewSize(macScrollPtr->sbHandle,viewSize); - SetControlValue(macScrollPtr->sbHandle, - (short) (middle * MAX_SCROLLBAR_VALUE) ); + SetControl32BitValue(macScrollPtr->sbHandle, + (middle) ); +#endif contrlHilite = GetControlHilite(macScrollPtr->sbHandle); - SetControlMinimum(macScrollPtr->sbHandle, 0); + SetControl32BitMinimum(macScrollPtr->sbHandle, 0); if ( contrlHilite == 0 || contrlHilite == 255) { if (scrollPtr->firstFraction == 0.0 && scrollPtr->lastFraction == 1.0) { - SetControlMinimum(macScrollPtr->sbHandle, MAX_SCROLLBAR_VALUE); + SetControl32BitMinimum(macScrollPtr->sbHandle, SCROLLBAR_SCALING_VALUE); } else { HiliteControl(macScrollPtr->sbHandle, 0); } -- cgit v0.12 From a17e4c4701d5221f8b3197963574a7af51f5ea72 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 1 Jan 2004 00:34:56 +0000 Subject: * macosx/Wish.pbproj/project.pbxproj: added missing private headers to installed Tk.framework, so that tkInt.h can be included sucessfully from Tk.framework/PrivateHeaders. * generic/tkPort.h: corrected include of tkMacOSXPort.h --- ChangeLog | 9 ++++++++- generic/tkPort.h | 4 ++-- macosx/Wish.pbproj/project.pbxproj | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1279bfa..b10746d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-12-31 Daniel Steffen + + * macosx/Wish.pbproj/project.pbxproj: added missing private headers + to installed Tk.framework, so that tkInt.h can be included + sucessfully from Tk.framework/PrivateHeaders. + * generic/tkPort.h: corrected include of tkMacOSXPort.h + 2003-12-17 Jim Ingham * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. @@ -9,7 +16,7 @@ 2003-12-11 David Gravereaux - win/winMain.c: Backed-out yesterdays change. Reverted to 1.15 for + * win/winMain.c: Backed-out yesterdays change. Reverted to 1.15 for two reasons. 1) problem is best addressed in Tcl's DllMain() and 2) needs a MinGW custom assembly implimentation as it doesn't understand SEH syntax. diff --git a/generic/tkPort.h b/generic/tkPort.h index b07e22d..ec4b362 100644 --- a/generic/tkPort.h +++ b/generic/tkPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPort.h,v 1.3 2002/08/31 06:12:26 das Exp $ + * RCS: @(#) $Id: tkPort.h,v 1.3.2.1 2004/01/01 00:34:56 das Exp $ */ #ifndef _TKPORT @@ -29,7 +29,7 @@ # if defined(MAC_TCL) # include "tkMacPort.h" # elif defined(MAC_OSX_TK) -# include "../macosx/tkMacOSXPort.h" +# include "tkMacOSXPort.h" # else # include "../unix/tkUnixPort.h" # endif diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 1d6779f..4c0a85e 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1909,6 +1909,9 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright fileRef = F537557B016C37A601DC9062; isa = PBXBuildFile; settings = { + ATTRIBUTES = ( + Private, + ); }; }; F53755F8016C390401DC9062 = { @@ -1975,6 +1978,9 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright fileRef = F5375543016C376E01DC9062; isa = PBXBuildFile; settings = { + ATTRIBUTES = ( + Private, + ); }; }; F5375603016C397D01DC9062 = { -- cgit v0.12 From fe51b7b0dda07cc288a94d651f877ea1179f1610 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 27 Jan 2004 10:10:06 +0000 Subject: * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference to mkpsenc.tcl in bundle resources phase (mkpsenc.tcl is already part of the copy files phase to Resources/Scripts). * macosx/Makefile: added support for 'xcodebuild' on Mac OS X 10.3. --- ChangeLog | 8 ++++++++ macosx/Makefile | 9 +++++++-- macosx/Wish.pbproj/project.pbxproj | 7 ------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b10746d..d670546 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-01-27 Daniel Steffen + + * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference + to mkpsenc.tcl in bundle resources phase (mkpsenc.tcl is already + part of the copy files phase to Resources/Scripts). + + * macosx/Makefile: added support for 'xcodebuild' on Mac OS X 10.3. + 2003-12-31 Daniel Steffen * macosx/Wish.pbproj/project.pbxproj: added missing private headers diff --git a/macosx/Makefile b/macosx/Makefile index 9aa832f..d0a2f90 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -3,7 +3,7 @@ # Makefile to build AquaTk on Mac OS X packaged as a Framework # uses Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7.2.4 2003/10/01 14:35:39 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.5 2004/01/27 10:10:16 das Exp $ # ################################################################################ @@ -37,12 +37,17 @@ DEVBUILDSTYLE = Development DEPBUILDSTYLE = Deployment PBXBUILD = /usr/bin/pbxbuild +XCODEBUILD = /usr/bin/xcodebuild + +BUILDCMD = `if [ -f $(XCODEBUILD) ]; then \ + echo "$(XCODEBUILD)"; \ + else echo "$(PBXBUILD)"; fi` MAKE_VARS := SYMROOT OBJROOT BINDIR APPLICATION_INSTALL_PATH \ TCL_FRAMEWORK_DIR TCLSH_DIR MAKE_ARGS_V = $(foreach v,${MAKE_VARS},$v=${$v}) -BUILD = ${PBXBUILD} -target "${TARGET}" ${MAKE_ARGS_V} \ +BUILD = ${BUILDCMD} -target "${TARGET}" ${MAKE_ARGS_V} \ DYLIB_INSTALL_PATH="${INSTALL_PATH}" \ ${EXTRA_MAKE_ARGS} ${MAKEOVERRIDES} diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 4c0a85e..f2695a9 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1634,7 +1634,6 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright F53755E1016C38D301DC9062 = { buildActionMask = 2147483647; files = ( - F5C2EA34034D71B2016F146B, ); isa = PBXResourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -3545,12 +3544,6 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright path = ../library/mkpsenc.tcl; refType = 2; }; - F5C2EA34034D71B2016F146B = { - fileRef = F5C2EA33034D71B2016F146B; - isa = PBXBuildFile; - settings = { - }; - }; F5C2EA35034D7212016F146B = { fileRef = F5C2EA33034D71B2016F146B; isa = PBXBuildFile; -- cgit v0.12 From 9b95eacd124700b0b7bf9a0a1e69bb1fb7e079c5 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 28 Jan 2004 23:36:55 +0000 Subject: Backported fix for bug #776646 which makes hand2 and fleur native on windows. --- ChangeLog | 5 ++ tests/cursor.test | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++- win/tkWinCursor.c | 15 ++++-- 3 files changed, 169 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d670546..d70bea8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-28 Pat Thoyts + + * win/tkWinCursor.c: Backported fix for bug #776646 which makes + * tests/cursor.test: hand2 and fleur native on windows. + 2003-01-27 Daniel Steffen * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference diff --git a/tests/cursor.test b/tests/cursor.test index 054fb0d..65d9309 100644 --- a/tests/cursor.test +++ b/tests/cursor.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: cursor.test,v 1.8 2002/09/03 00:22:37 hobbs Exp $ +# RCS: @(#) $Id: cursor.test,v 1.8.2.1 2004/01/28 23:37:23 patthoyts Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -132,6 +132,157 @@ test cursor-4.1 {FreeCursorObjProc} {testcursor} { set result } {{{1 3}} {{1 2}} {{1 1}} {}} +# ------------------------------------------------------------------------- + +test cursor-5.1 {assert consistent cursor configuration command} \ + -setup { button .b } \ + -body { + list [catch {.b configure -cursor {watch red black}} msg] $msg + } \ + -cleanup {destroy .b} \ + -result {0 {}} + +# ------------------------------------------------------------------------- +# Check for the standard set of cursors. + +set n 0 +foreach cursor { + X_cursor + arrow + based_arrow_down + based_arrow_up + boat + bogosity + bottom_left_corner + bottom_right_corner + bottom_side + bottom_tee + box_spiral + center_ptr + circle + clock + coffee_mug + cross + cross_reverse + crosshair + diamond_cross + dot + dotbox + double_arrow + draft_large + draft_small + draped_box + exchange + fleur + gobbler + gumby + hand1 + hand2 + heart + icon + iron_cross + left_ptr + left_side + left_tee + leftbutton + ll_angle + lr_angle + man + middlebutton + mouse + pencil + pirate + plus + question_arrow + right_ptr + right_side + right_tee + rightbutton + rtl_logo + sailboat + sb_down_arrow + sb_h_double_arrow + sb_left_arrow + sb_right_arrow + sb_up_arrow + sb_v_double_arrow + shuttle + sizing + spider + spraycan + star + target + tcross + top_left_arrow + top_left_corner + top_right_corner + top_side + top_tee + trek + ul_angle + umbrella + ur_angle + watch + xterm +} { + test cursor-6.$n {check cursor $cursor} \ + -setup {button .b -text $cursor} \ + -body { + list [catch {.b configure -cursor $cursor} msg] $msg + } \ + -cleanup {destroy .b} \ + -result {0 {}} + incr n +} +unset n + +# ------------------------------------------------------------------------- +# Check the Windows specific cursors +set n 0 +foreach cursor { + no + starting + size + size_ne_sw + size_ns + size_nw_se + size_we + uparrow + wait +} { + test cursor-7.$n {check cursor $cursor} \ + -constraints {pcOnly} \ + -setup {button .b -text $cursor} \ + -body { + list [catch {.b configure -cursor $cursor} msg] $msg + } \ + -cleanup {destroy .b} \ + -result {0 {}} + incr n +} +unset n + +# ------------------------------------------------------------------------- +# Check the Mac specific cursors +set n 0 +foreach cursor { + text + cross-hair +} { + test cursor-8.$n {check cursor $cursor} \ + -constraints {macOnly} \ + -setup {button .b -text $cursor} \ + -body { + list [catch {.b configure -cursor $cursor} msg] $msg + } \ + -cleanup {destroy .b} \ + -result {0 {}} + incr n +} +unset n + +# ------------------------------------------------------------------------- + destroy .t # cleanup diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c index 742bed9..ca5e72e 100644 --- a/win/tkWinCursor.c +++ b/win/tkWinCursor.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: tkWinCursor.c,v 1.10.2.1 2003/07/19 01:02:51 hobbs Exp $ + * RCS: @(#) $Id: tkWinCursor.c,v 1.10.2.2 2004/01/28 23:37:28 patthoyts Exp $ */ #include "tkWinInt.h" @@ -25,6 +25,14 @@ typedef struct { } TkWinCursor; /* + * The HAND cursor is only present when WINVER >= 0x0500. If this is + * not available at runtime, it will default to the unix-style cursor. + */ +#ifndef IDC_HAND +#define IDC_HAND MAKEINTRESOURCE(32649) +#endif + +/* * The table below is used to map from the name of a predefined cursor * to its resource identifier. */ @@ -38,7 +46,7 @@ static struct CursorName { {"ibeam", IDC_IBEAM}, {"icon", IDC_ICON}, {"no", IDC_NO}, - {"size", IDC_SIZE}, + {"size", IDC_SIZEALL}, {"size_ne_sw", IDC_SIZENESW}, {"size_ns", IDC_SIZENS}, {"size_nw_se", IDC_SIZENWSE}, @@ -46,12 +54,13 @@ static struct CursorName { {"uparrow", IDC_UPARROW}, {"wait", IDC_WAIT}, {"crosshair", IDC_CROSS}, - {"fleur", IDC_SIZE}, + {"fleur", IDC_SIZEALL}, {"sb_v_double_arrow", IDC_SIZENS}, {"sb_h_double_arrow", IDC_SIZEWE}, {"center_ptr", IDC_UPARROW}, {"watch", IDC_WAIT}, {"xterm", IDC_IBEAM}, + {"hand2", IDC_HAND}, {NULL, 0} }; -- cgit v0.12 From ddbf41804636015e174c51c243ef250fe5a5d8cb Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 4 Feb 2004 00:23:03 +0000 Subject: * library/menu.tcl (::tk::MbPost): make menubuttons that post above or below reverse direction when not enough space is available. --- ChangeLog | 30 ++++++++++++++++++------------ library/menu.tcl | 13 +++++++++++-- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index d70bea8..49130e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-03 Jeff Hobbs + + * library/menu.tcl (::tk::MbPost): make menubuttons that post + above or below reverse direction when not enough space is available. + 2004-01-28 Pat Thoyts * win/tkWinCursor.c: Backported fix for bug #776646 which makes @@ -5,28 +10,29 @@ 2003-01-27 Daniel Steffen - * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference - to mkpsenc.tcl in bundle resources phase (mkpsenc.tcl is already - part of the copy files phase to Resources/Scripts). + * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference + to mkpsenc.tcl in bundle resources phase (mkpsenc.tcl is already + part of the copy files phase to Resources/Scripts). - * macosx/Makefile: added support for 'xcodebuild' on Mac OS X 10.3. + * macosx/Makefile: added support for 'xcodebuild' on Mac OS X 10.3. 2003-12-31 Daniel Steffen - * macosx/Wish.pbproj/project.pbxproj: added missing private headers - to installed Tk.framework, so that tkInt.h can be included - sucessfully from Tk.framework/PrivateHeaders. + * macosx/Wish.pbproj/project.pbxproj: added missing private headers + to installed Tk.framework, so that tkInt.h can be included + sucessfully from Tk.framework/PrivateHeaders. * generic/tkPort.h: corrected include of tkMacOSXPort.h 2003-12-17 Jim Ingham - * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. - This version is clearer, and works helps keep the mouse better pinned to the - scrollbar. I also removed the glitch where the scrollbar would jump get - its middle over the mouse when you first moved it. + * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. + This version is clearer, and works helps keep the mouse better + pinned to the scrollbar. I also removed the glitch where the + scrollbar would jump get its middle over the mouse when you first + moved it. Import from TOT. - + 2003-12-11 David Gravereaux * win/winMain.c: Backed-out yesterdays change. Reverted to 1.15 for diff --git a/library/menu.tcl b/library/menu.tcl index 21dd22d..c6d65bf 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -4,7 +4,7 @@ # It also implements keyboard traversal of menus and implements a few # other utility procedures related to menus. # -# RCS: @(#) $Id: menu.tcl,v 1.18 2002/08/31 06:12:28 das Exp $ +# RCS: @(#) $Id: menu.tcl,v 1.18.2.1 2004/02/04 00:23:04 hobbs Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -280,11 +280,20 @@ proc ::tk::MbPost {w {x {}} {y {}}} { above { set x [winfo rootx $w] set y [expr {[winfo rooty $w] - [winfo reqheight $menu]}] + # if we go offscreen to the top, show as 'below' + if {$y < 0} { + set y [expr {[winfo rooty $w] + [winfo height $w]}] + } PostOverPoint $menu $x $y } below { set x [winfo rootx $w] set y [expr {[winfo rooty $w] + [winfo height $w]}] + # if we go offscreen to the bottom, show as 'above' + set mh [winfo reqheight $menu] + if {($y + $mh) > [winfo screenheight $w]} { + set y [expr {[winfo rooty $w] - $mh}] + } PostOverPoint $menu $x $y } left { @@ -336,7 +345,7 @@ proc ::tk::MbPost {w {x {}} {y {}}} { PostOverPoint $menu $x $y [MenuFindName $menu [$w cget -text]] } else { PostOverPoint $menu [winfo rootx $w] [expr {[winfo rooty $w]+[winfo height $w]}] - } + } } } } msg]} { -- cgit v0.12 From 5e1a7db351894f12bed8acd58aa4d95b72548532 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 9 Feb 2004 14:40:30 +0000 Subject: Stop crashes when copying a large photo to itself causes resizing. [Bug 877950] --- ChangeLog | 7 +++++++ generic/tkImgPhoto.c | 9 ++++++++- tests/imgPhoto.test | 10 +++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49130e0..96b10a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-02-09 Donal K. Fellows + + * generic/tkImgPhoto.c (Tk_PhotoPutBlock, Tk_PhotoPutZoomedBlock): + * tests/imgPhoto.test (imgPhoto-16.1): Better handling of the case + when copying from one area of a photo to another triggers a + resizing of the image. [Bug 877950] + 2004-02-03 Jeff Hobbs * library/menu.tcl (::tk::MbPost): make menubuttons that post diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 5bec1a6..d525660 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.3 2003/11/11 00:05:19 hobbs Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.4 2004/02/09 14:40:31 dkf Exp $ */ #include "tkInt.h" @@ -4263,12 +4263,18 @@ Tk_PhotoPutBlock(handle, blockPtr, x, y, width, height, compRule) xEnd = x + width; yEnd = y + height; if ((xEnd > masterPtr->width) || (yEnd > masterPtr->height)) { + int sameSrc = (blockPtr->pixelPtr == masterPtr->pix32); if (ImgPhotoSetSize(masterPtr, MAX(xEnd, masterPtr->width), MAX(yEnd, masterPtr->height)) == TCL_ERROR) { panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } + if (sameSrc) { + blockPtr->pixelPtr = masterPtr->pix32; + blockPtr->pitch = masterPtr->width * 4; + } } + if ((y < masterPtr->ditherY) || ((y == masterPtr->ditherY) && (x < masterPtr->ditherX))) { /* @@ -4569,6 +4575,7 @@ Tk_PhotoPutZoomedBlock(handle, blockPtr, x, y, width, height, zoomX, zoomY, } if (sameSrc) { blockPtr->pixelPtr = masterPtr->pix32; + blockPtr->pitch = masterPtr->width * 4; } } diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index e2b4468..72724d3 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -9,7 +9,7 @@ # # Author: Paul Mackerras (paulus@cs.anu.edu.au) # -# RCS: @(#) $Id: imgPhoto.test,v 1.15 2002/10/18 00:48:22 hobbs Exp $ +# RCS: @(#) $Id: imgPhoto.test,v 1.15.2.1 2004/02/09 14:40:31 dkf Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -661,6 +661,14 @@ test imgPhoto-15.1 {photo images can fail to allocate memory gracefully} \ list [catch {image create photo -width 32000 -height 32000} msg] $msg } {1 {not enough free memory for image buffer}} +test imgPhoto-16.1 {copying to self doesn't access freed memory} { + # Bug 877950 makes this crash when trying to copy out of a deallocated area + set photo [image create photo] + $i put red -to 0 0 1000 1000 + $i copy $i -from 0 0 1000 1000 -to 500 0 + image delete $i +} {} + destroy .c eval image delete [image names] -- cgit v0.12 From e964e6277d121cd33845a6c4e1f10076a74036d4 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 10 Feb 2004 11:07:49 +0000 Subject: Esperanto and Polish message catalogs from Artur Trzewik --- ChangeLog | 5 ++++ library/msgs/eo.msg | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ library/msgs/pl.msg | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 library/msgs/eo.msg create mode 100644 library/msgs/pl.msg diff --git a/ChangeLog b/ChangeLog index 96b10a2..a16e729 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-10 Donal K. Fellows + + * library/msgs/eo.msg: Language support for Esperanto and Polish from + * library/msgs/pl.msg: Artur Trzewik with thanks. + 2004-02-09 Donal K. Fellows * generic/tkImgPhoto.c (Tk_PhotoPutBlock, Tk_PhotoPutZoomedBlock): diff --git a/library/msgs/eo.msg b/library/msgs/eo.msg new file mode 100644 index 0000000..85436c3 --- /dev/null +++ b/library/msgs/eo.msg @@ -0,0 +1,73 @@ +namespace eval ::tk { + ::msgcat::mcset eo "&Abort" "&\u0108esigo" + ::msgcat::mcset eo "&About..." "Pri..." + ::msgcat::mcset eo "All Files" "\u0108ioj dosieroj" + ::msgcat::mcset eo "Application Error" "Aplikoerraro" + ::msgcat::mcset eo "&Blue" "&Blua" + ::msgcat::mcset eo "&Cancel" "&Rezignu" + ::msgcat::mcset eo "Cannot change to the directory \"%1\$s\".\nPermission denied." "Neeble \u0109angi al dosierulon \"%1\$s\".\nVi ne rajtas tion." + ::msgcat::mcset eo "Choose Directory" "Elektu Dosierujo" + ::msgcat::mcset eo "&Clear" "&Klaru" + ::msgcat::mcset eo "&Clear Console" "&Klaru konzolon" + ::msgcat::mcset eo "Color" "Farbo" + ::msgcat::mcset eo "Console" "Konzolo" + ::msgcat::mcset eo "&Copy" "&Kopiu" + ::msgcat::mcset eo "Cu&t" "&Enpo\u015digu" + ::msgcat::mcset eo "&Delete" "&Forprenu" + ::msgcat::mcset eo "Details >>" "Detaloj >>" + ::msgcat::mcset eo "Directory \"%1\$s\" does not exist." "La dosierujo \"%1\$s\" ne ekzistas." + ::msgcat::mcset eo "&Directory:" "&Dosierujo:" + ::msgcat::mcset eo "&Edit" "&Redaktu" + ::msgcat::mcset eo "Error: %1\$s" "Eraro: %1\$s" + ::msgcat::mcset eo "E&xit" "&Eliru" + ::msgcat::mcset eo "&File" "&Dosiero" + ::msgcat::mcset eo "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "La dosiero \"%1\$s\" jam ekzistas.\n\u0108u vi volas anstata\u00fbigi la dosieron?" + ::msgcat::mcset eo "File \"%1\$s\" already exists.\n\n" "La dosiero \"%1\$s\" jam egzistas. \n\n" + ::msgcat::mcset eo "File \"%1\$s\" does not exist." "La dosierp \"%1\$s\" ne estas." + ::msgcat::mcset eo "File &name:" "Dosiero&nomo:" + ::msgcat::mcset eo "File &names:" "Dosiero&nomoj:" + ::msgcat::mcset eo "Files of &type:" "Dosieroj de &Typo:" + ::msgcat::mcset eo "Fi&les:" "Do&sieroj:" + ::msgcat::mcset eo "&Filter" "&Filtrilo" + ::msgcat::mcset eo "Fil&ter:" "&Filtrilo:" + ::msgcat::mcset eo "&Green" "&Verda" + ::msgcat::mcset eo "&Help" "&Helpu" + ::msgcat::mcset eo "Hi" "Saluton" + ::msgcat::mcset eo "&Hide Console" "&Ka\u015du konzolon" + ::msgcat::mcset eo "&Ignore" "&Ignoru" + ::msgcat::mcset eo "Invalid file name \"%1\$s\"." "Malvalida dosieronomo \"%1\$s\"." + ::msgcat::mcset eo "Log Files" "Protokolo" + ::msgcat::mcset eo "&No" "&Ne" + ::msgcat::mcset eo "OK" + ::msgcat::mcset eo "Ok" + ::msgcat::mcset eo "Open" "Malfermu" + ::msgcat::mcset eo "&Open" "&Malfermu" + ::msgcat::mcset eo "Open Multiple Files" "Melfermu multan dosierojn" + ::msgcat::mcset eo "P&aste" "&Elpo\u015digi" + ::msgcat::mcset eo "&Quit" "&Finigu" + ::msgcat::mcset eo "&Red" "&Rosa" + ::msgcat::mcset eo "Replace existing file?" "\u0108u anstata\u00fbu ekzistantan dosieron?" + ::msgcat::mcset eo "&Retry" "&Ripetu" + ::msgcat::mcset eo "&Save" "&Savu" + ::msgcat::mcset eo "Save As" "Savu kiel" + ::msgcat::mcset eo "Save To Log" "Savu en protokolon" + ::msgcat::mcset eo "Select Log File" "Elektu prokolodosieron" + ::msgcat::mcset eo "Select a file to source" "Elektu dosieron por interpreti" + ::msgcat::mcset eo "&Selection:" "&Elekto:" + ::msgcat::mcset eo "Skip Messages" "transsaltu pluajn mesa\u011dojn" + ::msgcat::mcset eo "&Source..." "&Fontoprogramo..." + ::msgcat::mcset eo "Tcl Scripts" "Tcl-skriptoj" + ::msgcat::mcset eo "Tcl for Windows" "Tcl por vindoso" + ::msgcat::mcset eo "Text Files" "Tekstodosierojn" + ::msgcat::mcset eo "&Yes" "&Jes" + ::msgcat::mcset eo "abort" "\u0109esigo" + ::msgcat::mcset eo "blue" "blua" + ::msgcat::mcset eo "cancel" "rezignu" + ::msgcat::mcset eo "extension" "ekspansio" + ::msgcat::mcset eo "extensions" "ekspansioj" + ::msgcat::mcset eo "green" "verda" + ::msgcat::mcset eo "ignore" "ignorieren" + ::msgcat::mcset eo "red" "ru\u011da" + ::msgcat::mcset eo "retry" "ripetu" + ::msgcat::mcset eo "yes" "jes" +} diff --git a/library/msgs/pl.msg b/library/msgs/pl.msg new file mode 100644 index 0000000..02e6ffc --- /dev/null +++ b/library/msgs/pl.msg @@ -0,0 +1,73 @@ +namespace eval ::tk { + ::msgcat::mcset pl "&Abort" "&Anuluj" + ::msgcat::mcset pl "&About..." "O Programie..." + ::msgcat::mcset pl "All Files" "Wszystkie pliki" + ::msgcat::mcset pl "Application Error" "Bl\u0105d w Programie" + ::msgcat::mcset pl "&Blue" "&Niebieski" + ::msgcat::mcset pl "&Cancel" "&Anuluj" + ::msgcat::mcset pl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Katalog \"%1\$s\" nie mo\u017ce zosta\u0107 odczytany lub nie istnieje." + ::msgcat::mcset pl "Choose Directory" "Wybierz katalog" + ::msgcat::mcset pl "&Clear" "&Wyczy\u015b\u0107" + ::msgcat::mcset pl "&Clear Console" "&Wyczy\u015b\u0107 konsol\u0119" + ::msgcat::mcset pl "Color" "Kolor" + ::msgcat::mcset pl "Console" "Konsola" + ::msgcat::mcset pl "&Copy" "&Kopiuj" + ::msgcat::mcset pl "Cu&t" "&Wytnij" + ::msgcat::mcset pl "&Delete" "&Usu\u0144" + ::msgcat::mcset pl "Details >>" "Detale >>" + ::msgcat::mcset pl "Directory \"%1\$s\" does not exist." "Katalog \"%1\$s\" nie istniej." + ::msgcat::mcset pl "&Directory:" "&Katalog:" + ::msgcat::mcset pl "&Edit" "&Edytuj" + ::msgcat::mcset pl "Error: %1\$s" "B\u0142\u0105d: %1\$s" + ::msgcat::mcset pl "E&xit" "&Zako\u0144cz" + ::msgcat::mcset pl "&File" "&Plik" + ::msgcat::mcset pl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Plik \"%1\$s\" ju\u017c istnieje.\nCzy chcesz go zast\u0105pi\u0107?" + ::msgcat::mcset pl "File \"%1\$s\" already exists.\n\n" "Plik \"%1\$s\" ju\u017c istnieje. \n\n" + ::msgcat::mcset pl "File \"%1\$s\" does not exist." "Plik \"%1\$s\" nie istnieje." + ::msgcat::mcset pl "File &name:" "Nazwa &pliku:" + ::msgcat::mcset pl "File &names:" "Nazwy &plik\u00f3w:" + ::msgcat::mcset pl "Files of &type:" "Pliki &typu:" + ::msgcat::mcset pl "Fi&les:" "Pli&ki:" + ::msgcat::mcset pl "&Filter" "&Filter" + ::msgcat::mcset pl "Fil&ter:" "&Filter:" + ::msgcat::mcset pl "&Green" "&Zielony" + ::msgcat::mcset pl "&Help" "&Pomoc" + ::msgcat::mcset pl "Hi" "Witaj" + ::msgcat::mcset pl "&Hide Console" "&Schowaj konsol\u0119" + ::msgcat::mcset pl "&Ignore" "&Ignoruj" + ::msgcat::mcset pl "Invalid file name \"%1\$s\"." "Niew\u0142a\u015bciwa nazwa pliku \"%1\$s\"." + ::msgcat::mcset pl "Log Files" "Protoko\u0142uj" + ::msgcat::mcset pl "&No" "&Nie" + ::msgcat::mcset pl "OK" + ::msgcat::mcset pl "Ok" + ::msgcat::mcset pl "Open" "Wczytaj" + ::msgcat::mcset pl "&Open" "&Wczytaj" + ::msgcat::mcset pl "Open Multiple Files" "Wczytuj wiele plik\u00f3w" + ::msgcat::mcset pl "P&aste" "&Wklej" + ::msgcat::mcset pl "&Quit" "&Zako\u0144cz" + ::msgcat::mcset pl "&Red" "&Czerwonz" + ::msgcat::mcset pl "Replace existing file?" "Czy zost\u0105pi\u0107 instniej\u0105cy plik?" + ::msgcat::mcset pl "&Retry" "&Powt\u00f3rz" + ::msgcat::mcset pl "&Save" "&Zapisz" + ::msgcat::mcset pl "Save As" "Zapisz jako" + ::msgcat::mcset pl "Save To Log" "Wpisz do protoko\u0142u" + ::msgcat::mcset pl "Select Log File" "Wybierz plik proko\u0142u" + ::msgcat::mcset pl "Select a file to source" "Wybierz plik do wykonania" + ::msgcat::mcset pl "&Selection:" "&Wyb\u00f3r:" + ::msgcat::mcset pl "Skip Messages" "Omi\u0144 pozosta\u0142e komunikaty" + ::msgcat::mcset pl "&Source..." "&Kod \u017ar\u00f3d\u0142owy..." + ::msgcat::mcset pl "Tcl Scripts" "Tcl-skrypty" + ::msgcat::mcset pl "Tcl for Windows" "Tcl dla Okienek (Windows)" + ::msgcat::mcset pl "Text Files" "Pliki Tekstowe" + ::msgcat::mcset pl "&Yes" "&Tak" + ::msgcat::mcset pl "abort" "zako\u0144cz" + ::msgcat::mcset pl "blue" "niebieski" + ::msgcat::mcset pl "cancel" "anuluj" + ::msgcat::mcset pl "extension" "rozszerzenie" + ::msgcat::mcset pl "extensions" "rozszerzenia" + ::msgcat::mcset pl "green" "zielony" + ::msgcat::mcset pl "ignore" "ignoruj" + ::msgcat::mcset pl "red" "czerwony" + ::msgcat::mcset pl "retry" "potw\u00f3rz" + ::msgcat::mcset pl "yes" "tak" +} -- cgit v0.12 From a7be65999b9c4b9fae5a80c9775cab14109ab802 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 13 Feb 2004 01:26:40 +0000 Subject: * win/tkWinDialog.c (ChooseDirectoryValidateProc): create a pidl for -initialdir if we have a UNC path because BFFM_SETSELECTION doesn't support UNC paths in strings. --- ChangeLog | 6 ++++++ win/tkWinDialog.c | 47 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a16e729..ed275c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-12 Jeff Hobbs + + * win/tkWinDialog.c (ChooseDirectoryValidateProc): create a pidl + for -initialdir if we have a UNC path because BFFM_SETSELECTION + doesn't support UNC paths in strings. + 2004-02-10 Donal K. Fellows * library/msgs/eo.msg: Language support for Esperanto and Polish from diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 7d6c443..2b18d45 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.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: tkWinDialog.c,v 1.30.2.1 2003/07/18 19:51:35 hobbs Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.30.2.2 2004/02/13 01:26:41 hobbs Exp $ * */ @@ -1942,25 +1942,58 @@ ChooseDirectoryValidateProc ( SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM) selDir); // enable the OK button SendMessage(hwnd, BFFM_ENABLEOK, 0, (LPARAM) 1); - //EnableWindow(GetDlgItem(hwnd, IDOK), TRUE); SetCurrentDirectory(selDir); } else { // disable the OK button SendMessage(hwnd, BFFM_ENABLEOK, 0, (LPARAM) 0); - //EnableWindow(GetDlgItem(hwnd, IDOK), FALSE); } UpdateWindow(hwnd); return 1; - case BFFM_INITIALIZED: + case BFFM_INITIALIZED: { /* * Directory browser intializing - tell it where to start from, * user specified parameter. */ - SetCurrentDirectory((char *) lpData); - SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)lpData); - SendMessage(hwnd, BFFM_ENABLEOK, 0, (LPARAM) 1); + char *initDir = chooseDirSharedData->utfInitDir; + + SetCurrentDirectory(initDir); + if (*initDir == '\\') { + /* + * BFFM_SETSELECTION only understands UNC paths as pidls, + * so convert path to pidl using IShellFolder interface. + */ + LPMALLOC pMalloc; + LPSHELLFOLDER psfFolder; + + if (SUCCEEDED(SHGetMalloc(&pMalloc))) { + if (SUCCEEDED(SHGetDesktopFolder(&psfFolder))) { + LPITEMIDLIST pidlMain; + ULONG ulCount, ulAttr; + Tcl_DString ds; + + Tcl_UtfToExternalDString(TkWinGetUnicodeEncoding(), + initDir, -1, &ds); + if (SUCCEEDED(psfFolder->lpVtbl->ParseDisplayName( + psfFolder, hwnd, NULL, + (WCHAR *) Tcl_DStringValue(&ds), + &ulCount, &pidlMain, &ulAttr)) + && (pidlMain != NULL)) { + SendMessage(hwnd, BFFM_SETSELECTION, FALSE, + (LPARAM)pidlMain); + pMalloc->lpVtbl->Free(pMalloc, pidlMain); + } + psfFolder->lpVtbl->Release(psfFolder); + Tcl_DStringFree(&ds); + } + pMalloc->lpVtbl->Release(pMalloc); + } + } else { + SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)initDir); + } + SendMessage(hwnd, BFFM_ENABLEOK, 0, (LPARAM) 1); break; + } } return 0; -- cgit v0.12 From ad7029aac960220403a811dbf9e0332ed5381d05 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 13 Feb 2004 01:39:39 +0000 Subject: update HP-11 build libs setup --- unix/tcl.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 5b4ed48..db85ff9 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -469,6 +469,7 @@ AC_DEFUN(SC_ENABLE_THREADS, [ ac_saved_libs=$LIBS LIBS="$LIBS $THREADS_LIBS" AC_CHECK_FUNCS(pthread_attr_setstacksize) + AC_CHECK_FUNCS(pthread_atfork) LIBS=$ac_saved_libs AC_CHECK_FUNCS(readdir_r) else @@ -988,6 +989,12 @@ dnl AC_CHECK_TOOL(AR, ar) LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi + if test "$GCC" = "yes" ; then + SHLIB_LD="gcc -shared" + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS='' + CC_SEARCH_FLAGS='' + fi # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #EXTRA_CFLAGS="+DAportable" @@ -1001,7 +1008,7 @@ dnl AC_CHECK_TOOL(AR, ar) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD="gcc -shared" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='${LIBS}' LD_SEARCH_FLAGS='' CC_SEARCH_FLAGS='' ;; -- cgit v0.12 From 312b7394532e2daac24f96d5be3fc2b1918cd089 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 13 Feb 2004 01:43:05 +0000 Subject: simple code cleanup --- tests/window.test | 57 ++++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/tests/window.test b/tests/window.test index 51bacbc..9239914 100644 --- a/tests/window.test +++ b/tests/window.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: window.test,v 1.7 2002/11/14 17:30:20 mdejong Exp $ +# RCS: @(#) $Id: window.test,v 1.7.2.1 2004/02/13 01:43:05 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -87,11 +87,7 @@ test window-2.4 {Tk_DestroyWindow, cleanup half dead window at exit} \ bind . exit destroy . } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {}} @@ -104,11 +100,7 @@ test window-2.5 {Tk_DestroyWindow, cleanup half dead windows at exit} \ bind .t exit destroy .t } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {}} @@ -121,11 +113,7 @@ test window-2.6 {Tk_DestroyWindow, cleanup half dead windows at exit} \ bind .t exit destroy . } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {}} @@ -139,11 +127,7 @@ test window-2.7 {Tk_DestroyWindow, cleanup half dead windows at exit} \ bind .t.f exit destroy . } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {}} @@ -160,17 +144,13 @@ test window-2.8 {Tk_DestroyWindow, cleanup half dead windows at exit} \ bind .t1 {exit 0} destroy .t3 } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {}} -test window-2.9 {Tk_DestroyWindow, Destroy bindings - evaluated after exit} unixOrWin { +test window-2.9 {Tk_DestroyWindow, Destroy bindings evaluated after exit} \ + unixOrWin { set script [makeFile { toplevel .t1 toplevel .t2 @@ -179,18 +159,13 @@ test window-2.9 {Tk_DestroyWindow, Destroy bindings bind .t1 {puts "Destroy .t1" ; exit 0} destroy .t2 } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {Destroy .t2 Destroy .t1}} -test window-2.10 {Tk_DestroyWindow, Destroy binding - evaluated once} unixOrWin { +test window-2.10 {Tk_DestroyWindow, Destroy binding evaluated once} unixOrWin { set script [makeFile { update bind . { @@ -200,11 +175,7 @@ test window-2.10 {Tk_DestroyWindow, Destroy binding } destroy . } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 {Destroy .}} @@ -225,11 +196,7 @@ test window-2.11 {Tk_DestroyWindow, don't reanimate a half-dead window} \ bind .t2 {exit} destroy .t2 } script] - if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 - } else { - set error 0 - } + set error [catch {exec [interpreter] $script -geometry 10x10+0+0} msg] removeFile script list $error $msg } {0 YES} -- cgit v0.12 From 4e5ce2ab17562b7dd7e866e1e127d0f3f6c185c6 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 13 Feb 2004 01:44:01 +0000 Subject: update to patchlevel 8.4.6 --- ChangeLog | 8 + README | 4 +- generic/tk.h | 6 +- macosx/Wish.pbproj/project.pbxproj | 8 +- unix/configure | 391 +++++++++++++++++++++---------------- unix/configure.in | 4 +- unix/tk.spec | 6 +- win/configure | 2 +- win/configure.in | 4 +- 9 files changed, 251 insertions(+), 182 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed275c0..f964d78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2004-02-12 Jeff Hobbs + * README: update to patchlevel 8.4.6 + * generic/tk.h: + * macosx/Wish.pbproj/project.pbxproj: + * unix/configure, unix/configure.in, unix/tk.spec: + * win/configure, win/configure.in: + + * tests/window.test: simple code cleanup + * win/tkWinDialog.c (ChooseDirectoryValidateProc): create a pidl for -initialdir if we have a UNC path because BFFM_SETSELECTION doesn't support UNC paths in strings. diff --git a/README b/README index e5ae05d..b290c76 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.4.5 source distribution. + This is the Tk 8.4.6 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.39.2.5 2003/12/03 17:55:09 dgp Exp $ +RCS: @(#) $Id: README,v 1.39.2.6 2004/02/13 01:44:02 hobbs Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index 93bfd6d..8c01251 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74.2.5 2003/12/03 17:55:09 dgp Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.6 2004/02/13 01:44:02 hobbs Exp $ */ #ifndef _TK @@ -50,10 +50,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 4 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 5 +#define TK_RELEASE_SERIAL 6 #define TK_VERSION "8.4" -#define TK_PATCH_LEVEL "8.4.5.1" +#define TK_PATCH_LEVEL "8.4.6" /* * The following definitions set up the proper options for Macintosh diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index f2695a9..0a64e04 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1565,11 +1565,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType FMWK CFBundleShortVersionString - 8.4.5 + 8.4.6 CFBundleSignature WiSH CFBundleVersion - 8.4.5 + 8.4.6 "; @@ -2953,11 +2953,11 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright CFBundlePackageType APPL CFBundleShortVersionString - 8.4.5 + 8.4.6 CFBundleSignature WiSH CFBundleVersion - 8.4.5 + 8.4.6 "; diff --git a/unix/configure b/unix/configure index 3c1936a..bdea9f6 100755 --- a/unix/configure +++ b/unix/configure @@ -547,7 +547,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5.1" +TK_PATCH_LEVEL=".6" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" @@ -1445,16 +1445,71 @@ else fi done + for ac_func in pthread_atfork +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1452: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + LIBS=$ac_saved_libs for ac_func in readdir_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1453: checking for $ac_func" >&5 +echo "configure:1508: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1516,18 +1571,18 @@ done if test -z "$no_pipe"; then if test -n "$GCC"; then echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:1520: checking if the compiler understands -pipe" >&5 +echo "configure:1575: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1547,21 +1602,21 @@ fi echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:1551: checking for required early compiler flags" >&5 +echo "configure:1606: checking for required early compiler flags" >&5 tcl_flags="" if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -1569,7 +1624,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -1577,7 +1632,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:1581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -1603,14 +1658,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:1614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -1618,7 +1673,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -1626,7 +1681,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -1655,7 +1710,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:1659: checking for 64-bit integer type" >&5 +echo "configure:1714: checking for 64-bit integer type" >&5 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1663,14 +1718,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -1687,13 +1742,13 @@ rm -f conftest* : else cat > conftest.$ac_ext < int main() {exit(!(sizeof(${tcl_type_64bit}) > sizeof(long)));} EOF -if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_type_64bit=${tcl_type_64bit} else @@ -1722,13 +1777,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:1726: checking for struct dirent64" >&5 +echo "configure:1781: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1736,7 +1791,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:1740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -1757,13 +1812,13 @@ EOF echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6 echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:1761: checking for struct stat64" >&5 +echo "configure:1816: checking for struct stat64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -1771,7 +1826,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -1792,13 +1847,13 @@ EOF echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6 echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:1796: checking for off64_t" >&5 +echo "configure:1851: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -1806,7 +1861,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:1810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -1833,7 +1888,7 @@ EOF echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1837: checking how to build libraries" >&5 +echo "configure:1892: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -1866,7 +1921,7 @@ EOF # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1870: checking for $ac_word" >&5 +echo "configure:1925: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1898,7 +1953,7 @@ fi # Step 0.a: Enable 64 bit support? echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 -echo "configure:1902: checking if 64bit support is requested" >&5 +echo "configure:1957: checking if 64bit support is requested" >&5 # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then enableval="$enable_64bit" @@ -1918,7 +1973,7 @@ fi # Step 0.b: Enable Solaris 64 bit VIS support? echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:1922: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:1977: checking if 64bit Sparc VIS support is requested" >&5 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then enableval="$enable_64bit_vis" @@ -1942,7 +1997,7 @@ fi # there are a few systems, like Next, where this doesn't work. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -echo "configure:1946: checking system version (for dynamic loading)" >&5 +echo "configure:2001: checking system version (for dynamic loading)" >&5 if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else @@ -1968,7 +2023,7 @@ echo "configure:1946: checking system version (for dynamic loading)" >&5 # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1972: checking for dlopen in -ldl" >&5 +echo "configure:2027: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1976,7 +2031,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2035,7 +2090,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2039: checking for $ac_word" >&5 +echo "configure:2094: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2178,7 +2233,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2182: checking for gettimeofday in -lbsd" >&5 +echo "configure:2237: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2186,7 +2241,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2273,7 +2328,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2277: checking for shl_load in -ldld" >&5 +echo "configure:2332: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2281,7 +2336,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2324,6 +2379,12 @@ fi LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi + if test "$GCC" = "yes" ; then + SHLIB_LD="gcc -shared" + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS='' + CC_SEARCH_FLAGS='' + fi # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #EXTRA_CFLAGS="+DAportable" @@ -2337,7 +2398,7 @@ fi # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD="gcc -shared" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='${LIBS}' LD_SEARCH_FLAGS='' CC_SEARCH_FLAGS='' ;; @@ -2360,7 +2421,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2364: checking for shl_load in -ldld" >&5 +echo "configure:2425: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2368,7 +2429,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2506,17 +2567,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2510: checking for dld.h" >&5 +echo "configure:2571: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2581,17 +2642,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2585: checking for dld.h" >&5 +echo "configure:2646: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2649,17 +2710,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2653: checking for dlfcn.h" >&5 +echo "configure:2714: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2687,9 +2748,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2691: checking for ELF" >&5 +echo "configure:2752: checking for ELF" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3053: checking for ld accepts -Bexport flag" >&5 +echo "configure:3114: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -3106,9 +3167,9 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3110: checking sys/exec.h" >&5 +echo "configure:3171: checking sys/exec.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3126,7 +3187,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3144,9 +3205,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3148: checking a.out.h" >&5 +echo "configure:3209: checking a.out.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3164,7 +3225,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3182,9 +3243,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3186: checking sys/exec_aout.h" >&5 +echo "configure:3247: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3202,7 +3263,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3354,7 +3415,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3358: checking for build with symbols" >&5 +echo "configure:3419: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -3434,12 +3495,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:3438: checking for sin" >&5 +echo "configure:3499: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -3483,7 +3544,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:3487: checking for main in -lieee" >&5 +echo "configure:3548: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3491,14 +3552,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3529,7 +3590,7 @@ fi libbsd=no if test "`uname -s`" = "AIX" ; then echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:3533: checking for gettimeofday in -lbsd" >&5 +echo "configure:3594: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3537,7 +3598,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3579,9 +3640,9 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6 -echo "configure:3583: checking stdlib.h" >&5 +echo "configure:3644: checking stdlib.h" >&5 cat > conftest.$ac_ext < EOF @@ -3596,7 +3657,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3610,7 +3671,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -3642,16 +3703,16 @@ echo "$ac_t""$tk_ok" 1>&6 #-------------------------------------------------------------------- echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6 -echo "configure:3646: checking fd_set and sys/select" >&5 +echo "configure:3707: checking fd_set and sys/select" >&5 cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -3663,7 +3724,7 @@ fi rm -f conftest* if test $tk_ok = no; then cat > conftest.$ac_ext < EOF @@ -3695,12 +3756,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3699: checking for ANSI C header files" >&5 +echo "configure:3760: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3708,7 +3769,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3725,7 +3786,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3743,7 +3804,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3764,7 +3825,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3775,7 +3836,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3799,12 +3860,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3803: checking for mode_t" >&5 +echo "configure:3864: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3832,12 +3893,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3836: checking for pid_t" >&5 +echo "configure:3897: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3865,12 +3926,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3869: checking for size_t" >&5 +echo "configure:3930: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3898,12 +3959,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3902: checking for uid_t in sys/types.h" >&5 +echo "configure:3963: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3940,17 +4001,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3944: checking for $ac_hdr" >&5 +echo "configure:4005: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3977,12 +4038,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3981: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4042: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3991,7 +4052,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4017,16 +4078,16 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:4021: checking pw_gecos in struct pwd" >&5 +echo "configure:4082: checking pw_gecos in struct pwd" >&5 cat > conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:4030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -4059,7 +4120,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4063: checking for X" >&5 +echo "configure:4124: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4121,12 +4182,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4195,14 +4256,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4292,12 +4353,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -4317,15 +4378,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:4321: checking for X11 header files" >&5 +echo "configure:4382: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4361,7 +4422,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:4365: checking for X11 libraries" >&5 +echo "configure:4426: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -4381,7 +4442,7 @@ echo "configure:4365: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:4385: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:4446: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4389,7 +4450,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4474,7 +4535,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" #-------------------------------------------------------------------- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:4478: checking for main in -lXbsd" >&5 +echo "configure:4539: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4482,14 +4543,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4512,12 +4573,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4516: checking for connect" >&5 +echo "configure:4577: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4562,7 +4623,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4566: checking for main in -lsocket" >&5 +echo "configure:4627: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4570,14 +4631,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4603,12 +4664,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:4607: checking for accept" >&5 +echo "configure:4668: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -4653,12 +4714,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4657: checking for gethostbyname" >&5 +echo "configure:4718: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4699,7 +4760,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4703: checking for main in -lnsl" >&5 +echo "configure:4764: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4707,14 +4768,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4754,13 +4815,13 @@ LIBS="$LIBS$THREADS_LIBS" if test -d /usr/include/mit ; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:4758: checking MIT X libraries" >&5 +echo "configure:4819: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -4771,7 +4832,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -4798,12 +4859,12 @@ fi MATH_LIBS="" echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4802: checking for sin" >&5 +echo "configure:4863: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4847,7 +4908,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:4851: checking for main in -lieee" >&5 +echo "configure:4912: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4855,14 +4916,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4889,14 +4950,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4893: checking whether char is unsigned" >&5 +echo "configure:4954: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -4961,12 +5022,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4965: checking for strtod" >&5 +echo "configure:5026: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -5011,7 +5072,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:5015: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:5076: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5020,7 +5081,7 @@ else tcl_cv_strtod_buggy=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=1 else diff --git a/unix/configure.in b/unix/configure.in index 24bf085..317cda7 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.7 2003/12/03 17:55:10 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.8 2004/02/13 01:44:03 hobbs Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5.1" +TK_PATCH_LEVEL=".6" VERSION=${TK_VERSION} LOCALES="cs de el en en_gb es fr it nl ru" diff --git a/unix/tk.spec b/unix/tk.spec index 93e804d..2efd034 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.15.2.5 2003/12/03 17:55:11 dgp Exp $ +# $Id: tk.spec,v 1.15.2.6 2004/02/13 01:44:03 hobbs Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.4.5.1 +%define version 8.4.6 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: http://www.tcl.tk/ Packager: Carina Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.5.1 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.4.6 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure b/win/configure index 2dc5fe8..71fb6b0 100755 --- a/win/configure +++ b/win/configure @@ -536,7 +536,7 @@ fi TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5.1" +TK_PATCH_LEVEL=".6" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/configure.in b/win/configure.in index b93582c..e599cf3 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.49.2.8 2003/12/03 17:55:11 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.49.2.9 2004/02/13 01:44:03 hobbs Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -11,7 +11,7 @@ AC_PREREQ(2.13) TK_VERSION=8.4 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=4 -TK_PATCH_LEVEL=".5.1" +TK_PATCH_LEVEL=".6" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ -- cgit v0.12 From 4c899ca0787f4fc4e71eb83694c5ee85f5bfaa72 Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Sat, 14 Feb 2004 01:08:28 +0000 Subject: Applying Patch 112997, and hunting down a couple more places where we were still using Pascal interfaces. --- ChangeLog | 16 +++++++++ macosx/tkMacOSXDialog.c | 94 +++++++++++++++++++++++-------------------------- macosx/tkMacOSXMenu.c | 11 +++--- macosx/tkMacOSXWm.c | 30 ++++++++-------- 4 files changed, 81 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index f964d78..ab85052 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-02-13 Jim Ingham + + * tkMacOSXDialog.c (Tk_GetOpenFileObjCmd): Use CFStringRef for + title & message options, not pascal strings. + (Tk_GetSaveFileObjCmd): Ditto + (Tk_ChooseDirectoryObjCmd): Ditto + (NavServicesGetFile): Now that we get CFStrings, we don't need + to convert them here. + + * tkMacOSXMenu.c (TkMacOSXDispatchMenuEvent): Cleanup, we don't + need to handle the Apple Menu picks any more, but the code didn't + reflect that. + + * tkMacOSXWm.c (TkSetWMName): Use CFStrings for the Window Title + name, not Pascal strings. + 2004-02-12 Jeff Hobbs * README: update to patchlevel 8.4.6 diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 8da90f6..25883ce 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.4 2003/02/25 16:09:23 das Exp $ + * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.4.2.1 2004/02/14 01:08:28 wolfsuit Exp $ */ #include @@ -70,7 +70,7 @@ static void InitFileDialogs(); static int NavServicesGetFile(Tcl_Interp *interp, OpenFileData *ofd, AEDesc *initialDescPtr, unsigned char *initialFile, AEDescList *selectDescPtr, - StringPtr title, StringPtr message, int multiple, int isOpen); + CFStringRef title, CFStringRef message, int multiple, int isOpen); static int HandleInitialDirectory (Tcl_Interp *interp, char *initialFile, char *initialDir, FSRef *dirRef, @@ -254,7 +254,7 @@ Tk_GetOpenFileObjCmd( int i, result, multiple; OpenFileData ofd; Tk_Window parent; - Str255 message, title; + CFStringRef message, title; AEDesc initialDesc = {typeNull, NULL}; FSRef dirRef; AEDesc *initialPtr = NULL; @@ -280,8 +280,8 @@ Tk_GetOpenFileObjCmd( result = TCL_ERROR; parent = (Tk_Window) clientData; multiple = false; - title[0] = 0; - message[0] = 0; + title = NULL; + message = NULL; TkInitFileFilters(&ofd.fl); @@ -293,7 +293,6 @@ Tk_GetOpenFileObjCmd( char *choice; int index, choiceLen; char *string; - int srcRead, dstWrote; if (Tcl_GetIndexFromObj(interp, objv[i], openOptionStrings, "option", TCL_EXACT, &index) != TCL_OK) { @@ -327,10 +326,8 @@ Tk_GetOpenFileObjCmd( break; case OPEN_MESSAGE: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, choice, choiceLen, - 0, NULL, StrBody(message), 255, - &srcRead, &dstWrote, NULL); - message[0] = dstWrote; + message = CFStringCreateWithBytes(NULL, choice, choiceLen, + kCFStringEncodingUTF8, false); break; case OPEN_MULTIPLE: if (Tcl_GetBooleanFromObj(interp, objv[i + 1], &multiple) @@ -349,10 +346,8 @@ Tk_GetOpenFileObjCmd( break; case OPEN_TITLE: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, choice, choiceLen, - 0, NULL, StrBody(title), 255, - &srcRead, &dstWrote, NULL); - title[0] = dstWrote; + title = CFStringCreateWithBytes(NULL, choice, choiceLen, + kCFStringEncodingUTF8, false); break; } } @@ -374,6 +369,12 @@ Tk_GetOpenFileObjCmd( TkFreeFileFilters(&ofd.fl); AEDisposeDesc(&initialDesc); AEDisposeDesc(&selectDesc); + if (title != NULL) { + CFRelease(title); + } + if (message != NULL) { + CFRelease(message); + } return result; } @@ -407,7 +408,7 @@ Tk_GetSaveFileObjCmd( AEDesc initialDesc = {typeNull, NULL}; AEDesc *initialPtr = NULL; FSRef dirRef; - Str255 title, message; + CFStringRef title, message; OpenFileData ofd; static CONST char *saveOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", @@ -425,8 +426,8 @@ Tk_GetSaveFileObjCmd( result = TCL_ERROR; parent = (Tk_Window) clientData; StrLength(initialFile) = 0; - title[0] = 0; - message[0] = 0; + title = NULL; + message = NULL; for (i = 1; i < objc; i += 2) { char *choice; @@ -473,10 +474,8 @@ Tk_GetSaveFileObjCmd( break; case SAVE_MESSAGE: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, choice, choiceLen, - 0, NULL, StrBody(message), 255, - &srcRead, &dstWrote, NULL); - StrLength(message) = (unsigned char) dstWrote; + message = CFStringCreateWithBytes(NULL, choice, choiceLen, + kCFStringEncodingUTF8, false); break; case SAVE_PARENT: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); @@ -488,10 +487,8 @@ Tk_GetSaveFileObjCmd( break; case SAVE_TITLE: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, choice, choiceLen, - 0, NULL, StrBody(title), 255, - &srcRead, &dstWrote, NULL); - StrLength(title) = (unsigned char) dstWrote; + title = CFStringCreateWithBytes(NULL, choice, choiceLen, + kCFStringEncodingUTF8, false); break; } } @@ -508,6 +505,12 @@ Tk_GetSaveFileObjCmd( end: AEDisposeDesc(&initialDesc); + if (title != NULL) { + CFRelease(title); + } + if (message != NULL) { + CFRelease(message); + } return result; } @@ -543,8 +546,7 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv) AEDesc initialDesc = {typeNull, NULL}; AEDesc *initialPtr = NULL; FSRef dirRef; - Str255 message, title; - int srcRead, dstWrote; + CFStringRef message, title; OpenFileData ofd; static CONST char *chooseOptionStrings[] = { "-initialdir", "-message", "-mustexist", "-parent", "-title", NULL @@ -564,8 +566,8 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv) } result = TCL_ERROR; parent = (Tk_Window) clientData; - title[0] = 0; - message[0] = 0; + title = NULL; + message = NULL; for (i = 1; i < objc; i += 2) { char *choice; @@ -593,10 +595,8 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv) break; case CHOOSE_MESSAGE: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, choice, choiceLen, - 0, NULL, StrBody(message), 255, - &srcRead, &dstWrote, NULL); - StrLength(message) = (unsigned char) dstWrote; + message = CFStringCreateWithBytes(NULL, choice, choiceLen, + kCFStringEncodingUTF8, false); break; case CHOOSE_PARENT: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); @@ -608,10 +608,8 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv) break; case CHOOSE_TITLE: choice = Tcl_GetStringFromObj(objv[i + 1], &choiceLen); - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, choice, choiceLen, - 0, NULL, StrBody(title), 255, - &srcRead, &dstWrote, NULL); - StrLength(title) = (unsigned char) dstWrote; + title = CFStringCreateWithBytes(NULL, choice, choiceLen, + kCFStringEncodingUTF8, false); break; } } @@ -628,6 +626,12 @@ Tk_ChooseDirectoryObjCmd(clientData, interp, objc, objv) end: AEDisposeDesc(&initialDesc); + if (title != NULL) { + CFRelease(title); + } + if (message != NULL) { + CFRelease(message); + } return result; } @@ -720,8 +724,8 @@ NavServicesGetFile( AEDesc *initialDescPtr, unsigned char *initialFile, AEDescList *selectDescPtr, - StringPtr title, - StringPtr message, + CFStringRef title, + CFStringRef message, int multiple, int isOpen) { @@ -785,22 +789,14 @@ NavServicesGetFile( diagOptions.optionFlags += kNavSupportPackages; diagOptions.clientName = CFStringCreateWithCString(NULL, "Wish", encoding); - if (message == NULL) { - diagOptions.message = NULL; - } else { - diagOptions.message = CFStringCreateWithPascalString(NULL, message, encoding); - } + diagOptions.message = message; + diagOptions.windowTitle = title; if ((initialFile != NULL) && (initialFile[0] != 0)) { diagOptions.saveFileName = CFStringCreateWithPascalString(NULL, initialFile, encoding); } else { diagOptions.saveFileName = NULL; } - if (title == NULL) { - diagOptions.windowTitle = NULL; - } else { - diagOptions.windowTitle = CFStringCreateWithPascalString(NULL, title, encoding); - } diagOptions.actionButtonLabel = NULL; diagOptions.cancelButtonLabel = NULL; diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 2180bf9..eec9c77 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.2 2003/08/12 08:49:39 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.3 2004/02/14 01:08:28 wolfsuit Exp $ */ #include "tkMacOSXInt.h" #include "tkMenuButton.h" @@ -1044,7 +1044,6 @@ ReconfigureIndividualMenu( int count; int index; TkMenuEntry *mePtr; - Str255 itemText; int parentDisabled = 0; for (mePtr = menuPtr->menuRefPtr->parentEntryPtr; mePtr != NULL; @@ -2158,9 +2157,11 @@ TkMacOSXDispatchMenuEvent( TkMenu *menuPtr = (TkMenu *) Tcl_GetHashValue(commandEntryPtr); if ((currentAppleMenuID == menuID) && (index > menuPtr->numEntries + 1)) { - Str255 itemText; - - GetMenuItemText(GetMenuHandle(menuID), index, itemText); + /* + * We don't need to do anything here, the standard + * Application event handler will open the built-in + * Apple menu item for us. + */ result = TCL_OK; } else { struct MenuCommandHandlerData *data diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index aa00e3a..6973213 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.1 2003/09/26 16:19:52 cc_benny Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.2 2004/02/14 01:08:29 wolfsuit Exp $ */ #include @@ -4269,29 +4269,27 @@ TkSetWMName( TkWindow *winPtr, Tk_Uid titleUid) { - Str255 pTitle; + CFStringRef title; WindowRef macWin; - int destWrote; if (Tk_IsEmbedded(winPtr)) { return; } - Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, titleUid, - strlen(titleUid), 0, NULL, - (char *) &pTitle[1], - 255, NULL, &destWrote, NULL); /* Internalize native */ - pTitle[0] = destWrote; + + if (strlen(titleUid) > 0) { + title = CFStringCreateWithBytes(NULL, titleUid, strlen(titleUid), + kCFStringEncodingUTF8, false); + } else { + title = NULL; + } macWin = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); - /* - * FIXME: Convert this to SetWindowTitleWithCFString, we should - * use CFStrings and not pascal strings wherever they are supported, - * since at some point there will be encodings that can't be supported - * with the pascal string interfaces. - */ - - SetWTitle( macWin, pTitle); + SetWindowTitleWithCFString(macWin, title); + + if (title != NULL) { + CFRelease(title); + } } -- cgit v0.12 From 22f577bfa564c60c562e1e0720624585dbc69e30 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 14 Feb 2004 01:54:48 +0000 Subject: * win/tkWinFont.c (Tk_MeasureChars): backport fixes to bold/italic font handling. [Patch 852669] [Bug 478568] * tests/textDisp.test: added test for the font measurement problem. --- ChangeLog | 7 ++ tests/textDisp.test | 26 ++++- win/tkWinFont.c | 303 +++++++++++++++++++++++++++------------------------- 3 files changed, 191 insertions(+), 145 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab85052..efd14ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-02-13 Jeff Hobbs + + * win/tkWinFont.c (Tk_MeasureChars): backport fixes to bold/italic + font handling. [Patch 852669] [Bug 478568] + * tests/textDisp.test: added test for the font measurement + problem. + 2004-02-13 Jim Ingham * tkMacOSXDialog.c (Tk_GetOpenFileObjCmd): Use CFStringRef for diff --git a/tests/textDisp.test b/tests/textDisp.test index 14b3b4a..aa0bdef 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: textDisp.test,v 1.8 2002/11/22 23:25:20 hobbs Exp $ +# RCS: @(#) $Id: textDisp.test,v 1.8.2.1 2004/02/14 01:54:49 hobbs Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -2869,6 +2869,30 @@ test textDisp-29.3 {miscellaneous: lines wrap but are still too long} {fonts} { list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] } {{0.536667 1} 300x50+-156+18 {}} +test textDisp-33.5 {bold or italic fonts} {winOnly} { + destroy .tt + pack [text .tt -wrap char -font {{MS Sans Serif} 15}] + font create no -family [lindex [.tt cget -font] 0] -size 24 + font create bi -family [lindex [.tt cget -font] 0] -size 24 + font configure bi -weight bold -slant italic + .tt tag configure bi -font bi + .tt tag configure no -font no + .tt insert end abcd no efgh bi ijkl\n no + update + set bb {} + for {set i 0} {$i < 12} {incr i 4} { + lappend bb [lindex [.tt bbox 1.$i] 0] + } + foreach {a b c} $bb {} + unset bb + if {($b - $a) * 1.5 < ($c - $b)} { + set result "italic font has much too much space" + } else { + set result "italic font measurement ok" + } +} {italic font measurement ok} +destroy .tt + deleteWindows option clear diff --git a/win/tkWinFont.c b/win/tkWinFont.c index acdd28f..09c9b86 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinFont.c,v 1.17 2003/02/26 02:47:05 hobbs Exp $ + * RCS: @(#) $Id: tkWinFont.c,v 1.17.2.1 2004/02/14 01:54:49 hobbs Exp $ */ #include "tkWinInt.h" @@ -591,27 +591,34 @@ Tk_MeasureChars( * ignored. */ int flags, /* Various flag bits OR-ed together: * TK_PARTIAL_OK means include the last char - * which only partially fit on this line. + * which only partially fits on this line. * TK_WHOLE_WORDS means stop on a word * boundary, if possible. - * TK_AT_LEAST_ONE means return at least one - * character even if no characters fit. */ + * TK_AT_LEAST_ONE means return at least one + * character (or at least the first partial + * word in case TK_WHOLE_WORDS is also set) + * even if no characters (words) fit. */ int *lengthPtr) /* Filled with x-location just after the * terminating character. */ { HDC hdc; HFONT oldFont; WinFont *fontPtr; - int curX, curByte; + int curX; + Tcl_UniChar ch; + SIZE size; + int moretomeasure; + FontFamily *familyPtr; + Tcl_DString runString; + SubFont *thisSubFontPtr; SubFont *lastSubFontPtr; + CONST char *p, *end, *next, *start; - /* - * According to Microsoft tech support, Windows does not use kerning - * or fractional character widths when displaying text on the screen. - * So that means we can safely measure individual characters or spans - * of characters and add up the widths w/o any "off-by-one-pixel" - * errors. - */ + + if (numBytes == 0) { + *lengthPtr = 0; + return 0; + } fontPtr = (WinFont *) tkfont; @@ -619,161 +626,165 @@ Tk_MeasureChars( lastSubFontPtr = &fontPtr->subFontArray[0]; oldFont = SelectObject(hdc, lastSubFontPtr->hFont); - if (numBytes == 0) { - curX = 0; - curByte = 0; - } else if (maxLength < 0) { - Tcl_UniChar ch; - SIZE size; - FontFamily *familyPtr; - Tcl_DString runString; - SubFont *thisSubFontPtr; - CONST char *p, *end, *next; - - /* - * A three step process: - * 1. Find a contiguous range of characters that can all be - * represented by a single screen font. - * 2. Convert those chars to the encoding of that font. - * 3. Measure converted chars. - */ - - curX = 0; - end = source + numBytes; - for (p = source; p < end; ) { - next = p + Tcl_UtfToUniChar(p, &ch); - thisSubFontPtr = FindSubFontForChar(fontPtr, ch); - if (thisSubFontPtr != lastSubFontPtr) { - familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternalDString(familyPtr->encoding, source, - (int) (p - source), &runString); - (*familyPtr->getTextExtentPoint32Proc)(hdc, - Tcl_DStringValue(&runString), - Tcl_DStringLength(&runString) >> familyPtr->isWideFont, - &size); - curX += size.cx; - Tcl_DStringFree(&runString); - lastSubFontPtr = thisSubFontPtr; - source = p; + /* + * A three step process: + * 1. Find a contiguous range of characters that can all be + * represented by a single screen font. + * 2. Convert those chars to the encoding of that font. + * 3. Measure converted chars. + */ - SelectObject(hdc, lastSubFontPtr->hFont); + moretomeasure = 0; + curX = 0; + start = source; + end = start + numBytes; + for (p = start; p < end; ) { + next = p + Tcl_UtfToUniChar(p, &ch); + thisSubFontPtr = FindSubFontForChar(fontPtr, ch); + if (thisSubFontPtr != lastSubFontPtr) { + familyPtr = lastSubFontPtr->familyPtr; + Tcl_UtfToExternalDString(familyPtr->encoding, start, + (int) (p - start), &runString); + size.cx = 0; + (*familyPtr->getTextExtentPoint32Proc)(hdc, + Tcl_DStringValue(&runString), + Tcl_DStringLength(&runString) >> familyPtr->isWideFont, + &size); + Tcl_DStringFree(&runString); + if (maxLength >= 0 && (curX+size.cx) > maxLength) { + moretomeasure = 1; + break; } - p = next; + curX += size.cx; + lastSubFontPtr = thisSubFontPtr; + start = p; + + SelectObject(hdc, lastSubFontPtr->hFont); } + p = next; + } + + if (!moretomeasure) { + /* + * We get here if the previous loop was just finished + * normally, without a break. Just measure the last run and + * that's it. + */ + familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternalDString(familyPtr->encoding, source, - (int) (p - source), &runString); + Tcl_UtfToExternalDString(familyPtr->encoding, start, + (int) (p - start), &runString); + size.cx = 0; (*familyPtr->getTextExtentPoint32Proc)(hdc, Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont, &size); - curX += size.cx; - Tcl_DStringFree(&runString); - curByte = numBytes; - } else { - Tcl_UniChar ch; - SIZE size; - char buf[16]; - FontFamily *familyPtr; - SubFont *thisSubFontPtr; - CONST char *term, *end, *p, *next; - int newX, termX, sawNonSpace, dstWrote; + Tcl_DStringFree(&runString); + if (maxLength >= 0 && (curX+size.cx) > maxLength) { + moretomeasure = 1; + } else { + curX += size.cx; + p = end; + } + } + if (moretomeasure) { /* - * How many chars will fit in the space allotted? - * This first version may be inefficient because it measures - * every character individually. There is a function call that - * can measure multiple characters at once and return the - * offset of each of them, but it only works on NT, even though - * the documentation claims it works for 95. - * TODO: verify that GetTextExtentExPoint is still broken in '95, and - * possibly use it for NT anyway since it should be much faster and - * more accurate. + * We get here if the measurement of the last run was over the + * maxLength limit. We need to restart this run and do it + * char by char, but always in context with the previous text + * to account for kerning (especially italics). */ - next = source + Tcl_UtfToUniChar(source, &ch); - newX = curX = termX = 0; - - term = source; - end = source + numBytes; - - sawNonSpace = (ch > 255) || !isspace(ch); - for (p = source; ; ) { - if (ch < BASE_CHARS) { - newX += fontPtr->widths[ch]; - } else { - thisSubFontPtr = FindSubFontForChar(fontPtr, ch); - if (thisSubFontPtr != lastSubFontPtr) { - SelectObject(hdc, thisSubFontPtr->hFont); - lastSubFontPtr = thisSubFontPtr; - } - familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternal(NULL, familyPtr->encoding, p, - (int) (next - p), 0, NULL, buf, sizeof(buf), NULL, - &dstWrote, NULL); - (*familyPtr->getTextExtentPoint32Proc)(hdc, buf, - dstWrote >> familyPtr->isWideFont, &size); - newX += size.cx; - } - if (newX > maxLength) { + char buf[16]; + int dstWrote; + int lastSize = 0; + + familyPtr = lastSubFontPtr->familyPtr; + Tcl_DStringInit(&runString); + for (p = start; p < end; ) { + next = p + Tcl_UtfToUniChar(p, &ch); + Tcl_UtfToExternal(NULL, familyPtr->encoding, p, + (int) (next - p), 0, NULL, buf, sizeof(buf), NULL, + &dstWrote, NULL); + Tcl_DStringAppend(&runString,buf,dstWrote); + size.cx = 0; + (*familyPtr->getTextExtentPoint32Proc)(hdc, + Tcl_DStringValue(&runString), + Tcl_DStringLength(&runString) >> familyPtr->isWideFont, + &size); + if ((curX+size.cx) > maxLength) { break; } - curX = newX; + lastSize = size.cx; p = next; - if (p >= end) { - term = end; - termX = curX; - break; - } - - next += Tcl_UtfToUniChar(next, &ch); - if ((ch < 256) && isspace(ch)) { - if (sawNonSpace) { - term = p; - termX = curX; - sawNonSpace = 0; - } - } else { - sawNonSpace = 1; - } } + Tcl_DStringFree(&runString); - /* - * P points to the first character that doesn't fit in the desired - * span. Use the flags to figure out what to return. - */ + /* + * "p" points to the first character that doesn't fit in the + * desired span. Look at the flags to figure out whether to + * include this next character. + */ - if ((flags & TK_PARTIAL_OK) && (p < end) && (curX < maxLength)) { - /* - * Include the first character that didn't quite fit in the desired - * span. The width returned will include the width of that extra - * character. - */ + if ((p < end) + && (((flags & TK_PARTIAL_OK) && (curX != maxLength)) + || ((p == source) && (flags & TK_AT_LEAST_ONE) + && (curX == 0)))) { - curX = newX; - p += Tcl_UtfToUniChar(p, &ch); - } - if ((flags & TK_AT_LEAST_ONE) && (term == source) && (p < end)) { - term = p; - termX = curX; - if (term == source) { - term += Tcl_UtfToUniChar(term, &ch); - termX = newX; - } - } else if ((p >= end) || !(flags & TK_WHOLE_WORDS)) { - term = p; - termX = curX; - } + /* + * Include the first character that didn't quite fit in + * the desired span. The width returned will include the + * width of that extra character. + */ - curX = termX; - curByte = (int) (term - source); + p = next; + curX += size.cx; + } else { + curX += lastSize; + } } SelectObject(hdc, oldFont); ReleaseDC(fontPtr->hwnd, hdc); + if ((flags & TK_WHOLE_WORDS) && (p < end)) { + + /* + * Scan the string for the last word break and than repeat the + * whole procedure without the maxLength limit or any flags. + */ + + CONST char *lastWordBreak = NULL; + Tcl_UniChar ch2; + + end = p; + p = source; + ch = 0; + while (p < end) { + next = p + Tcl_UtfToUniChar(p, &ch2); + if ((ch != ' ') && (ch2 == ' ')) { + lastWordBreak = p; + } + p = next; + ch = ch2; + } + + if (lastWordBreak != NULL) { + return Tk_MeasureChars( + tkfont, source, lastWordBreak-source, -1, 0, lengthPtr); + } else { + if (flags & TK_AT_LEAST_ONE) { + p = end; + } else { + p = source; + curX = 0; + } + } + } + *lengthPtr = curX; - return curByte; + return p - source; } /* @@ -841,7 +852,7 @@ Tk_DrawChars( SIZE size; if (twdPtr->type != TWD_BITMAP) { - panic("unexpected drawable type in stipple"); + Tcl_Panic("unexpected drawable type in stipple"); } /* @@ -976,9 +987,11 @@ MultiFontTextOut( Tcl_DString runString; CONST char *p, *end, *next; SubFont *lastSubFontPtr, *thisSubFontPtr; + TEXTMETRIC tm; lastSubFontPtr = &fontPtr->subFontArray[0]; oldFont = SelectObject(hdc, lastSubFontPtr->hFont); + GetTextMetrics(hdc, &tm); end = source + numBytes; for (p = source; p < end; ) { @@ -989,7 +1002,7 @@ MultiFontTextOut( familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, (int) (p - source), &runString); - (*familyPtr->textOutProc)(hdc, x, y, + (*familyPtr->textOutProc)(hdc, x-(tm.tmOverhang/2), y, Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); (*familyPtr->getTextExtentPoint32Proc)(hdc, @@ -1002,6 +1015,7 @@ MultiFontTextOut( lastSubFontPtr = thisSubFontPtr; source = p; SelectObject(hdc, lastSubFontPtr->hFont); + GetTextMetrics(hdc, &tm); } p = next; } @@ -1009,7 +1023,8 @@ MultiFontTextOut( familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, (int) (p - source), &runString); - (*familyPtr->textOutProc)(hdc, x, y, Tcl_DStringValue(&runString), + (*familyPtr->textOutProc)(hdc, x-(tm.tmOverhang/2), y, + Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); Tcl_DStringFree(&runString); } -- cgit v0.12 From 304822dcdcdc1a1445448a983ff16a5e6c8b4fc5 Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Mon, 16 Feb 2004 00:42:33 +0000 Subject: Backport Mac OS X specific fixes from TOT. See ChangeLog for details. In tk_getOpenFile filters, handle the case where you have a Macintosh file type and the files have no filetype. Fix various formatting nits. --- ChangeLog | 76 +++- generic/tkWindow.c | 4 +- macosx/tkMacOSXAppInit.c | 4 +- macosx/tkMacOSXButton.c | 84 ++--- macosx/tkMacOSXClipboard.c | 11 +- macosx/tkMacOSXColor.c | 36 +- macosx/tkMacOSXDebug.c | 32 +- macosx/tkMacOSXDialog.c | 498 ++++++++++++++++++++++++-- macosx/tkMacOSXDraw.c | 10 +- macosx/tkMacOSXEvent.c | 26 +- macosx/tkMacOSXFont.c | 18 +- macosx/tkMacOSXHLEvents.c | 7 +- macosx/tkMacOSXKeyEvent.c | 2 +- macosx/tkMacOSXKeyboard.c | 812 ++++++++++++++++++++++++++----------------- macosx/tkMacOSXMenu.c | 45 ++- macosx/tkMacOSXMenubutton.c | 88 ++--- macosx/tkMacOSXMouseEvent.c | 51 ++- macosx/tkMacOSXNotify.c | 10 +- macosx/tkMacOSXPort.h | 5 +- macosx/tkMacOSXScale.c | 30 +- macosx/tkMacOSXScrlbr.c | 6 +- macosx/tkMacOSXSubwindows.c | 6 +- macosx/tkMacOSXWindowEvent.c | 2 +- macosx/tkMacOSXWm.c | 10 +- 24 files changed, 1291 insertions(+), 582 deletions(-) diff --git a/ChangeLog b/ChangeLog index efd14ee..b06da65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,73 @@ +2004-02-15 Jim Ingham + + Backport Mac OS X specific fixes from TOT: + + * macosx/tkMacOSXKeyboard.c: General cleanup. Add support for + [event generate]. [Bug #860454] - [Benjamin Riefenstahl] + * macosx/tkMacOSXKeyboard.c: Add PowerBook keycode 0x34 as . + [Benjamin Riefenstahl] + + * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. This + version is clearer, and works helps keep the mouse better pinned to the + scrollbar. I also removed the glitch where the scrollbar would jump get + its middle over the mouse when you first moved it. + + * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): + add unicode clipboard support. [Patch #840107] (senn) + + * macosx/tkMacOSXDialog.c (NavServicesGetFile): Minor cleanups. + * (OpenFileFilterProc): Handle FSRef's as well as FSSpec's in the input + file. Also convert the FSSpec filename to an C-string before passing + to MatchOneFile. [bug 517600] + * (MatchOneFile): Require the input filename to be a C-string, not a + pascal string. + + * macosx/tkMacOSXDialog.c (MatchOneType): If the Macintosh filetype + is 0, then automatically pass the fileType check. + + * macosx/tkMacOSXButton.c (TkpDisplayButton): Use the tk text + drawing for checkbuttons & radiobuttons as well as for labels. + * macosx/tkMacOSXEvent.c (XSync): New function, need to implement + this so drawing will get flushed in "update idletasks". + * tkMacOSXPort.h: convert #define of XSync to function def'n. + + * generic/tkWindow.c: + * macosx/tkMacOSXDialog.c: added native tk_messageBox command, + (Tk_MessageBoxObjCmd) for MacOS X platform. [Vince Darley] + + * macosx/tkMacOSXMenu.c: corrected encoding conversion for + torn-off menu entries (but many other display problems still + exist with these) [Vince Darley] + + * macosx/tkMacOSXMouseEvent.c: improved handling of events in the + presence of grabs, particularly activation events. [Vince Darley] + + * macosx/tkMacOSXColor.c (GetControlPartColor): Use + the ThemeBrushes to get the control text color for + buttons. + + * tkMacOSXAppInit.c: Formatting cleanups. + * tkMacOSXButton.c: Ditto + * tkMacOSXClipboard.c: Ditto + * tkMacOSXDebug.c: Ditto + * tkMacOSXDialog.c: Ditto + * tkMacOSXDraw.c: Ditto + * tkMacOSXEvent.c: Ditto + * tkMacOSXFont.c: Ditto + * tkMacOSXHLEvents.c: Ditto + * tkMacOSXInit.c: Ditto + * tkMacOSXInt.h + * tkMacOSXKeyEvent.c: Ditto + * tkMacOSXMenu.c: Ditto + * tkMacOSXMenubutton.c: Ditto + * tkMacOSXMouseEvent.c: Ditto + * tkMacOSXNotify.c: Ditto + * tkMacOSXScale.c: Ditto + * tkMacOSXScrlbr.c: Ditto + * tkMacOSXSubwindows.c: Ditto + * tkMacOSXWindowEvent.c: Ditto + * tkMacOSXWm.c: Ditto + 2004-02-13 Jeff Hobbs * win/tkWinFont.c (Tk_MeasureChars): backport fixes to bold/italic @@ -7,18 +77,18 @@ 2004-02-13 Jim Ingham - * tkMacOSXDialog.c (Tk_GetOpenFileObjCmd): Use CFStringRef for + * macosx/tkMacOSXDialog.c (Tk_GetOpenFileObjCmd): Use CFStringRef for title & message options, not pascal strings. (Tk_GetSaveFileObjCmd): Ditto (Tk_ChooseDirectoryObjCmd): Ditto (NavServicesGetFile): Now that we get CFStrings, we don't need to convert them here. - * tkMacOSXMenu.c (TkMacOSXDispatchMenuEvent): Cleanup, we don't + * macosx/tkMacOSXMenu.c (TkMacOSXDispatchMenuEvent): Cleanup, we don't need to handle the Apple Menu picks any more, but the code didn't reflect that. - * tkMacOSXWm.c (TkSetWMName): Use CFStrings for the Window Title + * macosx/tkMacOSXWm.c (TkSetWMName): Use CFStrings for the Window Title name, not Pascal strings. 2004-02-12 Jeff Hobbs diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 4fc47fd..7efee6d 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.56.2.1 2003/07/16 22:54:26 hobbs Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.56.2.2 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkPort.h" @@ -142,7 +142,7 @@ static TkCmd commands[] = { {"tk_getOpenFile", NULL, Tk_GetOpenFileObjCmd, 0, 1}, {"tk_getSaveFile", NULL, Tk_GetSaveFileObjCmd, 0, 1}, #endif -#ifdef __WIN32__ +#if defined(__WIN32__) || defined(MAC_OSX_TK) {"tk_messageBox", NULL, Tk_MessageBoxObjCmd, 0, 1}, #endif {"update", NULL, Tk_UpdateObjCmd, 1, 1}, diff --git a/macosx/tkMacOSXAppInit.c b/macosx/tkMacOSXAppInit.c index ec141d0..151c68e 100644 --- a/macosx/tkMacOSXAppInit.c +++ b/macosx/tkMacOSXAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.4 2002/10/21 04:37:34 das Exp $ + * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.4.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include #include @@ -133,7 +133,7 @@ main(argc, argv) } #endif - textEncoding=GetApplicationTextEncoding(); + textEncoding = GetApplicationTextEncoding(); /* * Now add the scripts folder to the auto_path. diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index dc9f405..9cd2994 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.4 2003/10/10 20:20:47 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.5 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkButton.h" @@ -149,16 +149,16 @@ TkpCreateButton( macButtonPtr = (MacButton *) ckalloc(sizeof(MacButton)); Tk_CreateEventHandler(tkwin, ActivateMask, ButtonEventProc, (ClientData) macButtonPtr); - macButtonPtr->id=bCount++; - macButtonPtr->usingControl=0; - macButtonPtr->flags=0; - macButtonPtr->userPaneBackground.red=0; - macButtonPtr->userPaneBackground.green=0; - macButtonPtr->userPaneBackground.blue=~0; - macButtonPtr->userPane=NULL; - macButtonPtr->control=NULL; - macButtonPtr->controlTitle[0]= - macButtonPtr->controlTitle[1]=0; + macButtonPtr->id = bCount++; + macButtonPtr->usingControl = 0; + macButtonPtr->flags = 0; + macButtonPtr->userPaneBackground.red = 0; + macButtonPtr->userPaneBackground.green = 0; + macButtonPtr->userPaneBackground.blue = ~0; + macButtonPtr->userPane = NULL; + macButtonPtr->control = NULL; + macButtonPtr->controlTitle[0] = 0; + macButtonPtr->controlTitle[1] = 0; macButtonPtr->picParams.version = -2; macButtonPtr->picParams.hRes = 0x00480000; macButtonPtr->picParams.vRes = 0x00480000; @@ -222,11 +222,15 @@ TkpDisplayButton( wasUsingControl = macButtonPtr->usingControl; if (TkMacOSXComputeDrawParams(butPtr, &drawParams) ) { - macButtonPtr->usingControl=1; - macButtonPtr->useTkText=DEFAULT_USE_TK_TEXT; + macButtonPtr->usingControl = 1; + if (butPtr->type == TYPE_BUTTON) { + macButtonPtr->useTkText = 0; + } else { + macButtonPtr->useTkText = 1; + } } else { - macButtonPtr->usingControl=0; - macButtonPtr->useTkText=1; + macButtonPtr->usingControl = 0; + macButtonPtr->useTkText = 1; } /* @@ -817,14 +821,14 @@ TkMacOSXInitControl ( * Set up the user pane */ - initiallyVisible=false; - initialValue=kControlSupportsEmbedding| + initiallyVisible = false; + initialValue = kControlSupportsEmbedding| kControlHasSpecialBackground; - minValue=0; - maxValue=1; - procID=kControlUserPaneProc; - controlReference=(SInt32)mbPtr; - mbPtr->userPane=NewControl(mbPtr->windowRef, + minValue = 0; + maxValue = 1; + procID = kControlUserPaneProc; + controlReference = (SInt32)mbPtr; + mbPtr->userPane = NewControl(mbPtr->windowRef, paneRect, "\p", initiallyVisible, initialValue, @@ -838,7 +842,7 @@ TkMacOSXInitControl ( return 1; } - if ((status=EmbedControl(mbPtr->userPane,rootControl))!=noErr) { + if ((status=EmbedControl(mbPtr->userPane,rootControl)) != noErr) { fprintf(stderr,"Failed to embed user pane control %d\n", status); return 1; } @@ -846,9 +850,9 @@ TkMacOSXInitControl ( SetUserPaneSetUpSpecialBackgroundProc(mbPtr->userPane, UserPaneBackgroundProc); SetUserPaneDrawProc(mbPtr->userPane,UserPaneDraw); - initiallyVisible=false; + initiallyVisible = false; TkMacOSXComputeControlParams(butPtr,&mbPtr->params); - mbPtr->control=NewControl(mbPtr->windowRef, + mbPtr->control = NewControl(mbPtr->windowRef, cntrRect, "\p", initiallyVisible, mbPtr->params.initialValue, @@ -867,7 +871,7 @@ TkMacOSXInitControl ( return 1; } - mbPtr->flags|=(1 + 2); + mbPtr->flags |= (1 + 2); return 0; } @@ -905,28 +909,26 @@ TkMacOSXDrawControl( TkWindow * winPtr; Rect paneRect; Rect cntrRect; - int hilitePart = -1; - - winPtr=(TkWindow *)butPtr->tkwin; + winPtr = (TkWindow *)butPtr->tkwin; paneRect.left = winPtr->privatePtr->xOff; paneRect.top = winPtr->privatePtr->yOff; paneRect.right = paneRect.left + Tk_Width(butPtr->tkwin); paneRect.bottom = paneRect.top + Tk_Height(butPtr->tkwin); - cntrRect=paneRect; + cntrRect = paneRect; /* - cntrRect.left+=butPtr->inset; - cntrRect.top+=butPtr->inset; - cntrRect.right-=butPtr->inset; - cntrRect.bottom-=butPtr->inset; + cntrRect.left += butPtr->inset; + cntrRect.top += butPtr->inset; + cntrRect.right -= butPtr->inset; + cntrRect.bottom -= butPtr->inset; */ - cntrRect.left+=DEF_INSET_LEFT; - cntrRect.top+=DEF_INSET_TOP; - cntrRect.right-=DEF_INSET_RIGHT; - cntrRect.bottom-=DEF_INSET_BOTTOM; + cntrRect.left += DEF_INSET_LEFT; + cntrRect.top += DEF_INSET_TOP; + cntrRect.right -= DEF_INSET_RIGHT; + cntrRect.bottom -= DEF_INSET_BOTTOM; /* * The control has been previously initialised @@ -1135,7 +1137,7 @@ SetupBevelButton( ClosePicture(); tkPictureIsOpen = 0; - if ( (err=SetControlData(controlHandle, kControlButtonPart, + if ((err = SetControlData(controlHandle, kControlButtonPart, kControlBevelButtonContentTag, sizeof(ControlButtonContentInfo), (char *) &mbPtr->bevelButtonContent)) != noErr ) { @@ -1163,7 +1165,7 @@ SetupBevelButton( theAlignment = kControlBevelButtonAlignCenter; } - if ((err=SetControlData(controlHandle, kControlButtonPart, + if ((err = SetControlData(controlHandle, kControlButtonPart, kControlBevelButtonGraphicAlignTag, sizeof(ControlButtonGraphicAlignment), (char *) &theAlignment)) != noErr ) { @@ -1183,7 +1185,7 @@ SetupBevelButton( } else if (butPtr->compound == COMPOUND_RIGHT) { thePlacement = kControlBevelButtonPlaceToLeftOfGraphic; } - if ((err=SetControlData(controlHandle, kControlButtonPart, + if ((err = SetControlData(controlHandle, kControlButtonPart, kControlBevelButtonTextPlaceTag, sizeof(ControlButtonTextPlacement), (char *) &thePlacement)) != noErr ) { diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c index 3c083e1..acfd94c 100644 --- a/macosx/tkMacOSXClipboard.c +++ b/macosx/tkMacOSXClipboard.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.2.2.2 2003/11/11 18:21:09 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.2.2.3 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkInt.h" @@ -66,7 +66,7 @@ TkSelGetSelection( * Get the scrap from the Macintosh global clipboard. */ - err=GetCurrentScrap(&scrapRef); + err = GetCurrentScrap(&scrapRef); if (err != noErr) { Tcl_AppendResult(interp, Tk_GetAtomName(tkwin, selection), " GetCurrentScrap failed.", (char *) NULL); @@ -340,8 +340,11 @@ TkSuspendClipboard() ClearCurrentScrap(); GetCurrentScrap(&scrapRef); - Tcl_UtfToExternalDString(TkMacOSXCarbonEncoding, buffer, length, &encodedText); - PutScrapFlavor(scrapRef, 'TEXT', 0, Tcl_DStringLength(&encodedText), Tcl_DStringValue(&encodedText) ); + Tcl_UtfToExternalDString(TkMacOSXCarbonEncoding, buffer, + length, &encodedText); + PutScrapFlavor(scrapRef, 'TEXT', 0, + Tcl_DStringLength(&encodedText), + Tcl_DStringValue(&encodedText) ); Tcl_DStringFree(&encodedText); /* diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index 492f098..d634bdd 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXColor.c,v 1.2 2002/08/31 06:12:29 das Exp $ + * RCS: @(#) $Id: tkMacOSXColor.c,v 1.2.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include @@ -330,8 +330,9 @@ TkpGetColorByValue( * GetControlPartColor -- * * Given a part number this function will return the standard - * system default color for that part. It does this by looking - * in the system's 'cctb' resource. + * system default color for that part. On MacOS X this uses the + * Theme Brushes to find the active color, though for now, only + * the "Text Color" is supported. * * Results: * True if a color is found, false otherwise. @@ -348,24 +349,21 @@ GetControlPartColor( short part, /* Part code. */ RGBColor *macColor) /* Pointer to Mac color. */ { -/* Stubbed out for OS X - short index; - CCTabHandle ccTab; - - if (defaultAuxCtlHandle == NULL) { - GetAuxiliaryControlRecord(NULL, &defaultAuxCtlHandle); - } - ccTab = (**defaultAuxCtlHandle).acCTable; - if(ccTab && (ResError() == noErr)) { - for(index = 0; index <= (**ccTab).ctSize; index++) { - if((**ccTab).ctTable[index].value == part) { - *macColor = (**ccTab).ctTable[index].rgb; - return true; + int retVal = false; + OSErr err; + + switch (part) { + case cTextColor: + err = GetThemeTextColor(kThemeTextColorPushButtonActive, 32, + true, macColor); + if (err == noErr) { + retVal = true; } - } + break; + default: + retVal = false; } -*/ - return false; + return retVal; } /* diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c index 53997e8..674d5a3 100644 --- a/macosx/tkMacOSXDebug.c +++ b/macosx/tkMacOSXDebug.c @@ -260,7 +260,7 @@ CarbonEventToAscii(EventRef eventRef, char * buf) strcat(buf, " "); buf += strlen(buf); while (list->names && (!names) ) { - if (eventClass==list->c) { + if (eventClass == list->c) { names = list -> names; } else { list++; @@ -269,9 +269,9 @@ CarbonEventToAscii(EventRef eventRef, char * buf) if (names) { found = 0; while (names->name && !found) { - if (eventKind==names->kind) { + if (eventKind == names->kind) { sprintf(buf, "%-20s", names->name); - found=1; + found = 1; } else { names++; } @@ -302,11 +302,11 @@ char * CarbonEventKindToAscii(EventRef eventRef, char * buf ) } } if (names) { - found=0; + found = 0; while ( names->name && !found ) { - if (eventKind==names->kind) { + if (eventKind == names->kind) { sprintf(buf,"%s",names->name); - found=1; + found = 1; } else { names++; } @@ -326,17 +326,17 @@ char * ClassicEventToAscii(EventRecord * eventPtr, char * buf ) int found = 0; names = classicEventNames; while ( names -> name && !found ) - if (eventPtr->what==names->kind) { + if (eventPtr->what == names->kind) { int * iPtr; char cBuf[8]; - iPtr=( int *)&cBuf; + iPtr=(int *) &cBuf; *iPtr = eventPtr->message; cBuf[4] = 0; sprintf(buf, "%-16s %08x %04x %s", names->name, (int) eventPtr->message, eventPtr->modifiers, cBuf); - found=1; + found = 1; } else { names++; } @@ -358,8 +358,8 @@ void printPoint(char * tag, Point * p ) void printRect(char * tag, Rect * r ) { fprintf(stderr,"%s %4d %4d %4d %4d (%dx%d)\n", - tag,r->left,r->top,r->right,r->bottom, - r->right-r->left+1,r->bottom-r->top+1 ); + tag, r->left, r->top, r->right, r->bottom, + r->right - r->left + 1, r->bottom - r->top + 1); } void printRegion(char * tag, RgnHandle rgn ) @@ -373,7 +373,7 @@ void printWindowTitle(char * tag, WindowRef window ) { Str255 title; GetWTitle(window,title); - title [ title[0] + 1 ] = 0; + title [title[0] + 1] = 0; fprintf(stderr, "%s %s\n", tag, title +1 ); } @@ -402,7 +402,7 @@ TkMacOSXMenuMessageToAscii(int msg, char * s) { MsgName * msgNamePtr; for (msgNamePtr = msgNames;msgNamePtr->name;) { - if (msgNamePtr->msg==msg) { + if (msgNamePtr->msg == msg) { strcpy(s,msgNamePtr->name); return s; } else { @@ -428,9 +428,9 @@ char * MouseTrackingResultToAscii(MouseTrackingResult r, char * buf) { -1, NULL } }; MsgName * namePtr; - for (namePtr=trackingNames;namePtr->name;namePtr++) { - if (namePtr->msg==r) { - strcpy(buf,namePtr->name); + for (namePtr = trackingNames; namePtr->name; namePtr++) { + if (namePtr->msg == r) { + strcpy(buf, namePtr->name); return buf; } } diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 25883ce..074dca6 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.4.2.1 2004/02/14 01:08:28 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.4.2.2 2004/02/16 00:42:34 wolfsuit Exp $ */ #include @@ -58,6 +58,18 @@ typedef struct _OpenFileData { } OpenFileData; +/* + * The following structure is used in the tk_messageBox + * implementation. + */ +typedef struct { + WindowRef windowRef; + int buttonIndex; +} CallbackUserData; + + +static OSStatus AlertHandler _ANSI_ARGS_(( EventHandlerCallRef callRef, + EventRef eventRef, void *userData )); static Boolean MatchOneType _ANSI_ARGS_((StringPtr fileNamePtr, OSType fileType, OpenFileData *myofdPtr, FileFilter *filterPtr)); static pascal Boolean OpenFileFilterProc(AEDesc* theItem, void* info, @@ -747,11 +759,11 @@ NavServicesGetFile( diagOptions.location.v = -1; diagOptions.optionFlags = kNavDontAutoTranslate + kNavDontAddTranslateItems; - if (multiple) { diagOptions.optionFlags += kNavAllowMultipleFiles; } - + diagOptions.modality = kWindowModalityAppModal; + if (ofdPtr != NULL && ofdPtr->usePopup) { FileFilter *filterPtr; @@ -775,7 +787,7 @@ NavServicesGetFile( filterPtr->name, encoding); } diagOptions.popupExtension = CFArrayCreate(NULL, - (const void **)menuItemNames, ofdPtr->fl.numFilters, NULL);; + (const void **) menuItemNames, ofdPtr->fl.numFilters, NULL); } else { diagOptions.optionFlags += kNavNoTypePopup; diagOptions.popupExtension = NULL; @@ -815,7 +827,7 @@ NavServicesGetFile( openFileFilterUPP, ofdPtr, &dialogRef); - if (err!=noErr){ + if (err != noErr) { fprintf(stderr,"NavCreateGetFileDialog failed, %d\n", err ); dialogRef = NULL; } @@ -857,7 +869,7 @@ NavServicesGetFile( * Most commands assume that the file dialogs return a single * item, not a list. So only build a list if multiple is true... */ - if (err==noErr) { + if (err == noErr) { if (multiple) { theResult = Tcl_NewListObj(0, NULL); } else { @@ -867,7 +879,7 @@ NavServicesGetFile( err = memFullErr; } } - if (theReply.validRecord && err==noErr) { + if (theReply.validRecord && err == noErr) { AEDesc resultDesc; long count; Tcl_DString fileName; @@ -962,7 +974,7 @@ NavServicesGetFile( if (menuItemNames) { int i; - for (i=0;i < ofdPtr->fl.numFilters;i++) { + for (i = 0;i < ofdPtr->fl.numFilters; i++) { CFRelease(menuItemNames[i]); } ckfree((void *)menuItemNames); @@ -981,30 +993,59 @@ OpenFileFilterProc( NavFilterModes filterMode ) { OpenFileData *ofdPtr = (OpenFileData *) callBackUD; + if (!ofdPtr || !ofdPtr->usePopup) { return true; } else { if (ofdPtr->fl.numFilters == 0) { return true; } else { - - if ( theItem->descriptorType == typeFSS ) { - NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*)info; + if ((theItem->descriptorType == typeFSS) + || (theItem->descriptorType = typeFSRef)) { + NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo *) info; + char fileName[256]; int result; if ( !theInfo->isFolder ) { OSType fileType; StringPtr fileNamePtr; + Tcl_DString fileNameDString; int i; FileFilter *filterPtr; - fileType = theInfo->fileAndFolder.fileInfo.finderInfo.fdType; - HLock((Handle)theItem->dataHandle); - fileNamePtr = (((FSSpec *) *theItem->dataHandle)->name); + fileType = + theInfo->fileAndFolder.fileInfo.finderInfo.fdType; + Tcl_DStringInit (&fileNameDString); + if (theItem->descriptorType == typeFSS) { + int len; + fileNamePtr = (((FSSpec *) *theItem->dataHandle)->name); + len = fileNamePtr[0]; + strncpy(fileName, fileNamePtr + 1, len); + fileName[len] = '\0'; + fileNamePtr = fileName; + + } else if (theItem->descriptorType = typeFSRef) { + OSStatus err; + FSRef *theRef = (FSRef *) *theItem->dataHandle; + HFSUniStr255 uniFileName; + err = FSGetCatalogInfo (theRef, kFSCatInfoNone, NULL, + &uniFileName, NULL, NULL); + + if (err == noErr) { + Tcl_UniCharToUtfDString ( + (Tcl_UniChar *) uniFileName.unicode, + uniFileName.length, + &fileNameDString); + fileNamePtr = Tcl_DStringValue(&fileNameDString); + } else { + fileNamePtr = NULL; + } + } if (ofdPtr->usePopup) { i = ofdPtr->curType; - for (filterPtr = ofdPtr->fl.filters; filterPtr && i > 0; i--) { + for (filterPtr = ofdPtr->fl.filters; + filterPtr && i > 0; i--) { filterPtr = filterPtr->next; } if (filterPtr) { @@ -1015,9 +1056,11 @@ OpenFileFilterProc( } } else { /* - * We are not using the popup menu. In this case, the file is - * considered matched if it matches any of the file filters. + * We are not using the popup menu. In this case, the + * file is considered matched if it matches any of + * the file filters. */ + result = UNMATCHED; for (filterPtr = ofdPtr->fl.filters; filterPtr; filterPtr = filterPtr->next) { @@ -1029,7 +1072,7 @@ OpenFileFilterProc( } } - HUnlock((Handle)theItem->dataHandle); + Tcl_DStringFree (&fileNameDString); return (result == MATCHED); } else { return true; @@ -1086,7 +1129,7 @@ OpenEventProc( static Boolean MatchOneType( StringPtr fileNamePtr, /* Name of the file */ - OSType fileType, /* Type of the file */ + OSType fileType, /* Type of the file, 0 means there was no specified type. */ OpenFileData * ofdPtr, /* Information about this file dialog */ FileFilter * filterPtr) /* Match the file described by pb against * this filter */ @@ -1110,7 +1153,8 @@ MatchOneType( * considered an error. */ - for (clausePtr=filterPtr->clauses; clausePtr; clausePtr=clausePtr->next) { + for (clausePtr = filterPtr->clauses; clausePtr; + clausePtr = clausePtr->next) { int macMatched = 0; int globMatched = 0; GlobPattern * globPtr; @@ -1123,18 +1167,13 @@ MatchOneType( macMatched = 1; } - for (globPtr=clausePtr->patterns; globPtr; globPtr=globPtr->next) { - char filename[256]; - int len; - char * p, *q, *ext; + for (globPtr = clausePtr->patterns; globPtr; + globPtr = globPtr->next) { + char *q, *ext; if (fileNamePtr == NULL) { continue; } - p = (char*)(fileNamePtr); - len = p[0]; - strncpy(filename, p+1, len); - filename[len] = '\0'; ext = globPtr->pattern; if (ext[0] == '\0') { @@ -1142,7 +1181,8 @@ MatchOneType( * We don't want any extensions: OK if the filename doesn't * have "." in it */ - for (q=filename; *q; q++) { + + for (q = fileNamePtr; *q; q++) { if (*q == '.') { goto glob_unmatched; } @@ -1150,7 +1190,7 @@ MatchOneType( goto glob_matched; } - if (Tcl_StringMatch(filename, ext)) { + if (Tcl_StringMatch(fileNamePtr, ext)) { goto glob_matched; } else { goto glob_unmatched; @@ -1164,14 +1204,24 @@ MatchOneType( break; } - for (mfPtr=clausePtr->macTypes; mfPtr; mfPtr=mfPtr->next) { + for (mfPtr = clausePtr->macTypes; mfPtr; mfPtr = mfPtr->next) { if (fileType == mfPtr->type) { macMatched = 1; break; } } - if (globMatched && macMatched) { + /* + * On Mac OS X, it is not uncommon for files to have NO + * file type. But folks with Tcl code on Classic MacOS pretty + * much assume that a generic file will have type TEXT. So + * if we were strict about matching types when the source file + * had NO type set, they would have to add another rule always + * with no fileType. To avoid that, we pass the macMatch side + * of the test if no fileType is set. + */ + + if (globMatched && (macMatched || (fileType == 0))) { return MATCHED; } } @@ -1209,7 +1259,7 @@ TkAboutDlg() return; } - windowRef=GetDialogWindow(aboutDlog); + windowRef = GetDialogWindow(aboutDlog); SelectWindow(windowRef); while (itemHit != 1) { @@ -1222,3 +1272,385 @@ TkAboutDlg() return; } + +/* + *---------------------------------------------------------------------- + * + * Tk_MessageBoxObjCmd -- + * + * Implements the tk_messageBox in native Mac OS X style. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * none + * + *---------------------------------------------------------------------- + */ + +int +Tk_MessageBoxObjCmd( + ClientData clientData, /* Main window associated with interpreter. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *CONST objv[]) /* Argument objects. */ +{ + Tk_Window tkwin = (Tk_Window) clientData; + AlertStdCFStringAlertParamRec paramCFStringRec; + AlertType alertType; + DialogRef dialogRef; + CFStringRef messageTextCF = NULL; + CFStringRef finemessageTextCF = NULL; + OSErr osError; + SInt16 itemHit; + Boolean haveDefaultOption = false; + Boolean haveParentOption = false; + char *str; + int index; + int defaultButtonIndex; + int defaultNativeButtonIndex; /* 1, 2, 3: right to left. */ + int typeIndex; + int i; + int indexDefaultOption; + int result = TCL_OK; + + static CONST char *movableAlertStrings[] = { + "-default", /* "-finemessage", */ "-icon", + "-message", "-parent", + "-title", "-type", + (char *)NULL + }; + static CONST char *movableTypeStrings[] = { + "abortretryignore", "ok", + "okcancel", "retrycancel", + "yesno", "yesnocancel", + (char *)NULL + }; + static CONST char *movableButtonStrings[] = { + "abort", "retry", "ignore", + "ok", "cancel", "yes", "no", + (char *)NULL + }; + static CONST char *movableIconStrings[] = { + "error", "info", "question", "warning", + (char *)NULL + }; + enum movableAlertOptions { + ALERT_DEFAULT, /* ALERT_FINEMESSAGE, */ ALERT_ICON, + ALERT_MESSAGE, ALERT_PARENT, + ALERT_TITLE, ALERT_TYPE + }; + enum movableTypeOptions { + TYPE_ABORTRETRYIGNORE, TYPE_OK, + TYPE_OKCANCEL, TYPE_RETRYCANCEL, + TYPE_YESNO, TYPE_YESNOCANCEL + }; + enum movableButtonOptions { + TEXT_ABORT, TEXT_RETRY, TEXT_IGNORE, + TEXT_OK, TEXT_CANCEL, TEXT_YES, TEXT_NO + }; + enum movableIconOptions { + ICON_ERROR, ICON_INFO, ICON_QUESTION, ICON_WARNING + }; + + /* + * Need to map from 'movableButtonStrings' and its corresponding integer index, + * to the native button index, which is 1, 2, 3, from right to left. + * This is necessary to do for each separate '-type' of button sets. + */ + + short buttonIndexAndTypeToNativeButtonIndex[][7] = { + /* abort retry ignore ok cancel yes no */ + {1, 2, 3, 0, 0, 0, 0}, /* abortretryignore */ + {0, 0, 0, 1, 0, 0, 0}, /* ok */ + {0, 0, 0, 1, 2, 0, 0}, /* okcancel */ + {0, 1, 0, 0, 2, 0, 0}, /* retrycancel */ + {0, 0, 0, 0, 0, 1, 2}, /* yesno */ + {0, 0, 0, 0, 3, 1, 2}, /* yesnocancel */ + }; + + /* + * Need also the inverse mapping, from native button (1, 2, 3) to the + * descriptive button text string index. + */ + + short nativeButtonIndexAndTypeToButtonIndex[][4] = { + {-1, 0, 1, 2}, /* abortretryignore */ + {-1, 3, 0, 0}, /* ok */ + {-1, 3, 4, 0}, /* okcancel */ + {-1, 1, 4, 0}, /* retrycancel */ + {-1, 5, 6, 0}, /* yesno */ + {-1, 5, 6, 4}, /* yesnocancel */ + }; + + alertType = kAlertPlainAlert; + typeIndex = TYPE_OK; + + GetStandardAlertDefaultParams( ¶mCFStringRec, kStdCFStringAlertVersionOne ); + paramCFStringRec.movable = true; + paramCFStringRec.helpButton = false; + paramCFStringRec.defaultButton = kAlertStdAlertOKButton; + + for (i = 1; i < objc; i += 2) { + int iconIndex; + char *string; + + if (Tcl_GetIndexFromObj( interp, objv[i], movableAlertStrings, "option", + TCL_EXACT, &index ) != TCL_OK) { + result = TCL_ERROR; + goto end; + } + if (i + 1 == objc) { + string = Tcl_GetStringFromObj( objv[i], NULL ); + Tcl_AppendResult(interp, "value for \"", string, "\" missing", + (char *) NULL); + result = TCL_ERROR; + goto end; + } + + switch (index) { + + case ALERT_DEFAULT: + + /* + * Need to postpone processing of this option until we are + * sure to know the '-type' as well. + */ + + haveDefaultOption = true; + indexDefaultOption = i; + break; + +/* case ALERT_FINEMESSAGE: + str = Tcl_GetStringFromObj( objv[i + 1], NULL ); + finemessageTextCF = CFStringCreateWithCString( NULL, str, kCFStringEncodingUTF8 ); + break; +*/ + case ALERT_ICON: + /* not sure about UTF translation here... */ + if (Tcl_GetIndexFromObj( interp, objv[i + 1], movableIconStrings, + "value", TCL_EXACT, &iconIndex ) != TCL_OK) { + result = TCL_ERROR; + goto end; + } + switch (iconIndex) { + case ICON_ERROR: + alertType = kAlertStopAlert; + break; + case ICON_INFO: + alertType = kAlertNoteAlert; + break; + case ICON_QUESTION: + alertType = kAlertCautionAlert; + break; + case ICON_WARNING: + alertType = kAlertCautionAlert; + break; + } + break; + + case ALERT_MESSAGE: + str = Tcl_GetStringFromObj( objv[i + 1], NULL ); + messageTextCF = CFStringCreateWithCString( NULL, str, kCFStringEncodingUTF8 ); + break; + + case ALERT_PARENT: + str = Tcl_GetStringFromObj( objv[i + 1], NULL ); + tkwin = Tk_NameToWindow( interp, str, tkwin ); + if (tkwin == NULL) { + result = TCL_ERROR; + goto end; + } + haveParentOption = true; + break; + + case ALERT_TITLE: + break; + + case ALERT_TYPE: + /* not sure about UTF translation here... */ + if (Tcl_GetIndexFromObj( interp, objv[i + 1], movableTypeStrings, + "value", TCL_EXACT, &typeIndex ) != TCL_OK) { + result = TCL_ERROR; + goto end; + } + switch (typeIndex) { + case TYPE_ABORTRETRYIGNORE: + paramCFStringRec.defaultText = CFSTR("Abort"); + paramCFStringRec.cancelText = CFSTR("Retry"); + paramCFStringRec.otherText = CFSTR("Ignore"); + break; + case TYPE_OK: + paramCFStringRec.defaultText = CFSTR("OK"); + break; + case TYPE_OKCANCEL: + paramCFStringRec.defaultText = CFSTR("OK"); + paramCFStringRec.cancelText = CFSTR("Cancel"); + break; + case TYPE_RETRYCANCEL: + paramCFStringRec.defaultText = CFSTR("Retry"); + paramCFStringRec.cancelText = CFSTR("Cancel"); + break; + case TYPE_YESNO: + paramCFStringRec.defaultText = CFSTR("Yes"); + paramCFStringRec.cancelText = CFSTR("No"); + break; + case TYPE_YESNOCANCEL: + paramCFStringRec.defaultText = CFSTR("Yes"); + paramCFStringRec.cancelText = CFSTR("No"); + paramCFStringRec.otherText = CFSTR("Cancel"); + break; + } + break; + } + } + + if (haveDefaultOption) { + + /* + * Any '-default' option needs to know the '-type' option, which is why + * we do this here. + */ + + str = Tcl_GetStringFromObj( objv[indexDefaultOption + 1], NULL ); + if (Tcl_GetIndexFromObj( interp, objv[indexDefaultOption + 1], + movableButtonStrings, "value", TCL_EXACT, + &defaultButtonIndex ) != TCL_OK) { + result = TCL_ERROR; + goto end; + } + + /* Need to map from "ok" etc. to 1, 2, 3, right to left. */ + + defaultNativeButtonIndex = + buttonIndexAndTypeToNativeButtonIndex[typeIndex][defaultButtonIndex]; + if (defaultNativeButtonIndex == 0) { + Tcl_SetObjResult( interp, + Tcl_NewStringObj( "Illegel default option", -1 )); + result = TCL_ERROR; + goto end; + } + paramCFStringRec.defaultButton = defaultNativeButtonIndex; + } + SetThemeCursor( kThemeArrowCursor ); + + if (haveParentOption) { + TkWindow *winPtr; + MacDrawable *macWin; + WindowRef windowRef; + EventTargetRef notifyTarget; + EventHandlerUPP handler; + CallbackUserData data; + const EventTypeSpec kEvents[] = { + {kEventClassCommand, kEventProcessCommand} + }; + + winPtr = (TkWindow *) tkwin; + + /* + * Create the underlying Mac window for this Tk window. + */ + + macWin = (MacDrawable *) winPtr->window; + windowRef = GetWindowFromPort( TkMacOSXGetDrawablePort((Drawable) macWin) ); + notifyTarget = GetWindowEventTarget( windowRef ); + osError = CreateStandardSheet( alertType, messageTextCF, + finemessageTextCF, ¶mCFStringRec, + notifyTarget, &dialogRef ); + if(osError != noErr) { + result = TCL_ERROR; + goto end; + } + data.windowRef = windowRef; + data.buttonIndex = 1; + handler = NewEventHandlerUPP( AlertHandler ); + InstallEventHandler(notifyTarget, handler, + GetEventTypeCount(kEvents), + kEvents, &data, NULL ); + osError = ShowSheetWindow( GetDialogWindow(dialogRef), windowRef ); + if(osError != noErr) { + result = TCL_ERROR; + goto end; + } + osError = RunAppModalLoopForWindow( windowRef ); + + itemHit = data.buttonIndex; + DisposeEventHandlerUPP( handler ); + } else { + osError = CreateStandardAlert( alertType, messageTextCF, + finemessageTextCF, ¶mCFStringRec, &dialogRef ); + if(osError != noErr) { + result = TCL_ERROR; + goto end; + } + osError = RunStandardAlert( dialogRef, NULL, &itemHit ); + } + if(osError == noErr) { + int ind; + + /* + * Map 'itemHit' (1, 2, 3) to descriptive text string. + */ + + ind = nativeButtonIndexAndTypeToButtonIndex[typeIndex][itemHit]; + Tcl_SetObjResult( interp, + Tcl_NewStringObj( movableButtonStrings[ind], -1 )); + } else { + result = TCL_ERROR; + } + + end: + if (finemessageTextCF != NULL) { + CFRelease( finemessageTextCF ); + } + if (messageTextCF != NULL) { + CFRelease( messageTextCF ); + } + return result; +} + +/* + *---------------------------------------------------------------------- + * + * AlertHandler -- + * + * Carbon event handler for the Standard Sheet dialog. + * + * Results: + * OSStatus if event handled or not. + * + * Side effects: + * May set userData. + * + *---------------------------------------------------------------------- + */ + +static OSStatus +AlertHandler( EventHandlerCallRef callRef, EventRef eventRef, void *userData ) +{ + OSStatus result = eventNotHandledErr; + HICommand cmd; + CallbackUserData *dataPtr = (CallbackUserData *) userData; + + GetEventParameter( eventRef, kEventParamDirectObject, typeHICommand, + NULL, sizeof(cmd), NULL, &cmd ); + switch (cmd.commandID) { + case kHICommandOK: + dataPtr->buttonIndex = 1; + result = noErr; + break; + case kHICommandCancel: + dataPtr->buttonIndex = 2; + result = noErr; + break; + case kHICommandOther: + dataPtr->buttonIndex = 3; + result = noErr; + break; + } + if (result == noErr) { + result = QuitAppModalLoopForWindow( dataPtr->windowRef ); + } + return result; +} diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 3edcfe9..13d746c 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2 2002/08/31 06:12:29 das Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkInt.h" @@ -289,8 +289,8 @@ XCopyPlane( * Case 2: transparent bitmaps. If it's color we ignore * the forecolor. */ - pm=GetPortPixMap(srcPort); - if (GetPixDepth(pm)== 1) { + pm = GetPortPixMap(srcPort); + if (GetPixDepth(pm) == 1) { tmode = srcOr; } else { tmode = transparent; @@ -453,7 +453,7 @@ XFillRectangles( Drawable d, /* Draw on this. */ GC gc, /* Use this GC. */ XRectangle *rectangles, /* Rectangle array. */ - int n_rectangels) /* Number of rectangles. */ + int n_rectangles) /* Number of rectangles. */ { MacDrawable *macWin = (MacDrawable *) d; CGrafPtr saveWorld; @@ -472,7 +472,7 @@ XFillRectangles( TkMacOSXSetUpGraphicsPort(gc, destPort); - for (i=0; ixOff + rectangles[i].x); theRect.top = (short) (macWin->yOff + rectangles[i].y); theRect.right = (short) (theRect.left + rectangles[i].width); diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c index f0448e6..838c0a9 100644 --- a/macosx/tkMacOSXEvent.c +++ b/macosx/tkMacOSXEvent.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.3 2003/02/19 19:27:46 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.3.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include @@ -69,10 +69,20 @@ tkMacOSXFlushWindows () if (QDIsPortBuffered(portPtr)) { QDFlushPortBuffer(portPtr, NULL); } - wRef=GetNextWindow(wRef); + wRef = GetNextWindow(wRef); } } + + +int +XSync (Display *display, Bool flag) +{ + tkMacOSXFlushWindows(); + display->request++; + return 0; +} + /* *---------------------------------------------------------------------- * @@ -133,8 +143,8 @@ TkMacOSXProcessAppleEvent(TkMacOSXEvent * eventPtr, MacEventStatus * statusPtr) EventRecord eventRecord; if (ConvertEventRefToEventRecord(eventPtr->eventRef, &eventRecord )) { - err=TkMacOSXDoHLEvent(&eventRecord); - if (err!=noErr) { + err = TkMacOSXDoHLEvent(&eventRecord); + if (err != noErr) { char buf1 [ 256 ]; char buf2 [ 256 ]; fprintf(stderr, @@ -243,7 +253,7 @@ ReceiveAndProcessEvent() * into this routine, and are guaranteed to have one waiting. */ - err=ReceiveNextEvent(0, NULL, kEventDurationNoWait, + err = ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &macEvent.eventRef); if (err != noErr) { return err; @@ -254,10 +264,10 @@ ReceiveAndProcessEvent() TkMacOSXProcessEvent(&macEvent,&eventStatus); if (!eventStatus.stopProcessing) { if (!targetRef) { - targetRef=GetEventDispatcherTarget(); + targetRef = GetEventDispatcherTarget(); } - err= SendEventToEventTarget(macEvent.eventRef,targetRef); + err = SendEventToEventTarget(macEvent.eventRef,targetRef); if (err != noErr #if !TK_MAC_DEBUG && err != eventNotHandledErr @@ -265,7 +275,7 @@ ReceiveAndProcessEvent() ) { fprintf(stderr, "RCNE SendEventToEventTarget (%s) failed, %d\n", - CarbonEventToAscii(macEvent.eventRef,buf ),err); + CarbonEventToAscii(macEvent.eventRef, buf),err); } } ReleaseEvent(macEvent.eventRef); diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 1a6556c..875e1a3 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.3 2002/10/16 19:44:05 das Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.3.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include @@ -1166,7 +1166,7 @@ TkMacOSXIsCharacterMissing( fm.device = 0; fm.numer.h = fm.numer.v = fm.denom.h = fm.denom.v = 1; - fmOutPtr=FMSwapFont(&fm); + fmOutPtr = FMSwapFont(&fm); fprintf(stderr,"fmOut %08x, handle %08x\n", (int)fmOutPtr, fmOutPtr->fontHandle); #if !defined(UNIVERSAL_INTERFACES_VERSION) || (UNIVERSAL_INTERFACES_VERSION < 0x0300) @@ -1749,13 +1749,13 @@ FontMapLoadPage( * For some reason, FMSwapFont alywas returns a structure where the returned font handle * is NULL. Until we figure this one out, assume all characters are allowed */ - fmOut=FMSwapFont(&fm); - fHandle=fmOut->fontHandle; - isMultiByteFont=subFontPtr->familyPtr->isMultiByteFont; + fmOut = FMSwapFont(&fm); + fHandle = fmOut->fontHandle; + isMultiByteFont = subFontPtr->familyPtr->isMultiByteFont; #ifndef MAC_OSX_TK GetResInfo(fHandle, &theID, &theType, theName); fprintf ( stderr, "ResError() %d, %x\n", ResError (), fHandle ); - if (theType=='sfnt') { + if (theType == 'sfnt') { #endif /* * Found an outline font which has very complex font record. @@ -2241,7 +2241,7 @@ int TkMacOSXUseAntialiasedText(interp, enable) static UInt32 (*swaptextflags)(UInt32) = NULL; if(!initialized) { - NSSymbol nsSymbol=NULL; + NSSymbol nsSymbol = NULL; if(NSIsSymbolNameDefinedWithHint("_QDSwapTextFlags", "QD")) { nsSymbol = NSLookupAndBindSymbolWithHint("_QDSwapTextFlags", "QD"); } else if(NSIsSymbolNameDefinedWithHint("_SwapQDTextFlags", "QD")) { @@ -2267,9 +2267,9 @@ int TkMacOSXUseAntialiasedText(interp, enable) Tcl_ResetResult(interp); } } - if(swaptextflags) { + if (swaptextflags) { swaptextflags(enable ? kQDUseCGTextRendering | kQDUseCGTextMetrics - : kQDUseTrueTypeScalerGlyphs); + : kQDUseTrueTypeScalerGlyphs); TkMacOSXAntialiasedTextEnabled = enable; return TCL_OK; } else { diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index ac167f2..47907fd 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.5.2.1 2003/05/13 02:42:57 das Exp $ + * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.5.2.2 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkMacOSXPort.h" @@ -329,10 +329,11 @@ ScriptHandler (const AppleEvent * event, AppleEvent * reply, long handlerRefcon) else { AEGetDescData(&theDesc,data,size); data [ size ] = 0; - for (i=0; i #include "tkMacOSXInt.h" #include "tkMacOSXEvent.h" /* TkMacOSXKeycodeToUnicode() FIXME: That - * function should probably move here */ + * function should probably move here. */ + +/* + * A couple of simple definitions to make code a bit more self-explaining. + * + * For the assignments of Mod1==alt==command and Mod2==meta==option, see also + * tkMacOSXMouseEvent.c. + */ + +#define LATIN1_MAX 255 +#define MAC_KEYCODE_MAX 0x7F +#define MAC_KEYCODE_MASK 0x7F +#define ALT_MASK Mod1Mask +#define OPTION_MASK Mod2Mask + + +/* + * Tables enumerating the special keys defined on Mac keyboards. These are + * necessary for correct keysym mappings for all keys where the keysyms are + * not identical with their ASCII or Latin-1 code points. + */ typedef struct { - int keycode; /* Macintosh keycode */ - KeySym keysym; /* X windows Keysym */ + int keycode; /* Macintosh keycode. */ + KeySym keysym; /* X windows keysym. */ } KeyInfo; /* @@ -30,61 +50,73 @@ typedef struct { * * 0x34, XK_Return - Powerbooks use this and some keymaps define it. * + * 0x4C, XK_Return - XFree86 and Apple's X11 call this one XK_KP_Enter. + * * 0x47, XK_Clear - This key is NumLock when used on PCs, but Mac - * applications don't use it like that. + * applications don't use it like that, nor does Apple's X11. * * All other keycodes are taken from the published ADB keyboard layouts. */ static KeyInfo keyArray[] = { - {0x4C, XK_Return}, - {0x24, XK_Return}, - {0x34, XK_Return}, - {0x33, XK_BackSpace}, - {0x75, XK_Delete}, - {0x30, XK_Tab}, - {0x74, XK_Page_Up}, - {0x79, XK_Page_Down}, - {0x73, XK_Home}, - {0x77, XK_End}, - {0x7B, XK_Left}, - {0x7C, XK_Right}, - {0x7E, XK_Up}, - {0x7D, XK_Down}, - {0x72, XK_Help}, - {0x35, XK_Escape}, - {0x47, XK_Clear}, - {0, 0} + {0x24, XK_Return}, + {0x30, XK_Tab}, + {0x33, XK_BackSpace}, + {0x34, XK_Return}, + {0x35, XK_Escape}, + + {0x47, XK_Clear}, + {0x4C, XK_Return}, + + {0x72, XK_Help}, + {0x73, XK_Home}, + {0x74, XK_Page_Up}, + {0x75, XK_Delete}, + {0x77, XK_End}, + {0x79, XK_Page_Down}, + + {0x7B, XK_Left}, + {0x7C, XK_Right}, + {0x7D, XK_Down}, + {0x7E, XK_Up}, + + {0, 0} }; -static KeyInfo vituralkeyArray[] = { - {122, XK_F1}, - {120, XK_F2}, - {99, XK_F3}, - {118, XK_F4}, - {96, XK_F5}, - {97, XK_F6}, - {98, XK_F7}, - {100, XK_F8}, - {101, XK_F9}, - {109, XK_F10}, - {103, XK_F11}, - {111, XK_F12}, - {105, XK_F13}, - {107, XK_F14}, - {113, XK_F15}, - {0, 0} +static KeyInfo virtualkeyArray[] = { + {122, XK_F1}, + {120, XK_F2}, + {99, XK_F3}, + {118, XK_F4}, + {96, XK_F5}, + {97, XK_F6}, + {98, XK_F7}, + {100, XK_F8}, + {101, XK_F9}, + {109, XK_F10}, + {103, XK_F11}, + {111, XK_F12}, + {105, XK_F13}, + {107, XK_F14}, + {113, XK_F15}, + {0, 0} }; static int initialized = 0; -static Tcl_HashTable keycodeTable; /* keyArray hashed by keycode value. */ -static Tcl_HashTable vkeyTable; /* vituralkeyArray hashed by virtual - keycode value. */ +static Tcl_HashTable keycodeTable; /* keyArray hashed by keycode value. */ +static Tcl_HashTable vkeyTable; /* virtualkeyArray hashed by virtual + * keycode value. */ + +static int latin1Table[LATIN1_MAX+1]; /* Reverse mapping table for + * controls, ASCII and Latin-1. */ /* * Prototypes for static functions used in this file. */ -static void InitKeyMaps _ANSI_ARGS_((void)); + +static void InitKeyMaps (void); +static void InitLatin1Table(Display *display); +static int XKeysymToMacKeycode(Display *display, KeySym keysym); /* @@ -92,13 +124,17 @@ static void InitKeyMaps _ANSI_ARGS_((void)); * * InitKeyMaps -- * - * Creates hash tables used by some of the functions in this file. + * Creates hash tables used by some of the functions in this file. + * + * FIXME: As keycodes are defined to be in the limited range 0-127, it + * would be easier and more efficient to use directly initialized plain + * arrays and drop this function. * * Results: - * None. + * None. * * Side effects: - * Allocates memory & creates some hash tables. + * Allocates memory & creates some hash tables. * *---------------------------------------------------------------------- */ @@ -109,18 +145,18 @@ InitKeyMaps() Tcl_HashEntry *hPtr; KeyInfo *kPtr; int dummy; - + Tcl_InitHashTable(&keycodeTable, TCL_ONE_WORD_KEYS); for (kPtr = keyArray; kPtr->keycode != 0; kPtr++) { - hPtr = Tcl_CreateHashEntry(&keycodeTable, (char *) kPtr->keycode, - &dummy); - Tcl_SetHashValue(hPtr, kPtr->keysym); + hPtr = Tcl_CreateHashEntry(&keycodeTable, (char *) kPtr->keycode, + &dummy); + Tcl_SetHashValue(hPtr, kPtr->keysym); } Tcl_InitHashTable(&vkeyTable, TCL_ONE_WORD_KEYS); - for (kPtr = vituralkeyArray; kPtr->keycode != 0; kPtr++) { - hPtr = Tcl_CreateHashEntry(&vkeyTable, (char *) kPtr->keycode, - &dummy); - Tcl_SetHashValue(hPtr, kPtr->keysym); + for (kPtr = virtualkeyArray; kPtr->keycode != 0; kPtr++) { + hPtr = Tcl_CreateHashEntry(&vkeyTable, (char *) kPtr->keycode, + &dummy); + Tcl_SetHashValue(hPtr, kPtr->keysym); } initialized = 1; } @@ -128,16 +164,92 @@ InitKeyMaps() /* *---------------------------------------------------------------------- * + * InitLatin1Table -- + * + * Creates a simple table to be used for mapping from keysyms to + * keycodes. Always needs to be called before using latin1Table, + * because the keyboard layout may have changed, and than the table must + * be re-computed. + * + * Results: + * None. + * + * Side effects: + * Sets the global latin1Table. + * + *---------------------------------------------------------------------- + */ + +static void +InitLatin1Table( + Display *display) +{ + static Boolean latin1_initialized = false; + static SInt16 lastKeyLayoutID = -1; + + SInt16 keyScript; + SInt16 keyLayoutID; + + keyScript = GetScriptManagerVariable(smKeyScript); + keyLayoutID = GetScriptVariable(keyScript,smScriptKeys); + + if (!latin1_initialized || (lastKeyLayoutID != keyLayoutID)) { + int keycode; + KeySym keysym; + int state; + int modifiers; + + latin1_initialized = true; + lastKeyLayoutID = keyLayoutID; + + memset(latin1Table, 0, sizeof(latin1Table)); + + /* + * In the common X11 implementations, a keymap has four columns + * "plain", "Shift", "Mode_switch" and "Mode_switch + Shift". We + * don't use "Mode_switch", but we use "Option" instead. (This is + * similar to Apple's X11 implementation, where "Mode_switch" is used + * as an alias for "Option".) + * + * So here we go through all 4 columns of the keymap and find all + * Latin-1 compatible keycodes. We go through the columns + * back-to-front from the more exotic columns to the more simple, so + * that simple keycode-modifier combinations are preferred in the + * resulting table. + */ + + for (state = 3; state >= 0; state--) { + modifiers = 0; + if (state & 1) { + modifiers |= shiftKey; + } + if (state & 2) { + modifiers |= optionKey; + } + + for (keycode = 0; keycode <= MAC_KEYCODE_MAX; keycode++) { + keysym = XKeycodeToKeysym(display,keycode<<16,state); + if (keysym <= LATIN1_MAX) { + latin1Table[keysym] = keycode | modifiers; + } + } + } + } +} + +/* + *---------------------------------------------------------------------- + * * XKeycodeToKeysym -- * - * Translate from a system-dependent keycode to a - * system-independent keysym. + * Translate from a system-dependent keycode to a system-independent + * keysym. * * Results: - * Returns the translated keysym, or NoSymbol on failure. + * Returns the translated keysym, or NoSymbol on failure. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -146,68 +258,61 @@ KeySym XKeycodeToKeysym( Display* display, KeyCode keycode, - int index) + int index) { register Tcl_HashEntry *hPtr; - int c; - int virtualKey; int newKeycode; UniChar newChar; + (void) display; /*unused*/ + if (!initialized) { - InitKeyMaps(); - } - if (keycode == 0) { - /* - * This means we had a pure modifier keypress or - * something similar which is a TO DO. - */ - return NoSymbol; - } - - virtualKey = keycode >> 16; - c = (keycode) & 0xffff; - if (c > 255) { - return NoSymbol; + InitKeyMaps(); } /* - * When determining what keysym to produce we first check to see if - * the key is a function key. We then check to see if the character - * is another non-printing key. Finally, we return the key syms - * for all ASCII chars. + * When determining what keysym to produce we first check to see if the + * key is a function key. We then check to see if the character is + * another non-printing key. Finally, we return the key syms for all + * ASCII and Latin-1 chars. */ - if (c == 0x10) { - hPtr = Tcl_FindHashEntry(&vkeyTable, (char *) virtualKey); - if (hPtr != NULL) { + + newKeycode = keycode >> 16; + + if ((keycode & 0xFFFF) == 0x10) { + hPtr = Tcl_FindHashEntry(&vkeyTable, (char *) newKeycode); + if (hPtr != NULL) { return (KeySym) Tcl_GetHashValue(hPtr); - } + } } - hPtr = Tcl_FindHashEntry(&keycodeTable, (char *) virtualKey); + hPtr = Tcl_FindHashEntry(&keycodeTable, (char *) newKeycode); if (hPtr != NULL) { - return (KeySym) Tcl_GetHashValue(hPtr); + return (KeySym) Tcl_GetHashValue(hPtr); } /* - * Recompute the character based on the Shift key only. - * TODO: The index may also specify the NUM_LOCK. + * Add in the Mac modifier flags for shift and option. */ - newKeycode = virtualKey; - if (index & 0x01) { - newKeycode += 0x0200; + + if (index & 1) { + newKeycode |= shiftKey; + } + if (index & 2) { + newKeycode |= optionKey; } newChar = 0; TkMacOSXKeycodeToUnicode( - &newChar, 1, kEventRawKeyDown, - newKeycode & 0x00FF, newKeycode & 0xFF00, NULL); + &newChar, 1, kEventRawKeyDown, + newKeycode & 0x00FF, newKeycode & 0xFF00, NULL); /* * X11 keysyms are identical to Unicode for ASCII and Latin-1. Give up * for other characters for now. */ - if (newChar >= XK_space && newChar <= 0x255) { - return newChar; + + if ((newChar >= XK_space) && (newChar <= LATIN1_MAX)) { + return newChar; } return NoSymbol; @@ -218,24 +323,24 @@ XKeycodeToKeysym( * * TkpGetString -- * - * Retrieve the string equivalent for the given keyboard event. + * Retrieve the string equivalent for the given keyboard event. * * Results: - * Returns the UTF string. + * Returns the UTF string. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ char * TkpGetString( - TkWindow *winPtr, /* Window where event occurred: needed to - * get input context. */ - XEvent *eventPtr, /* X keyboard event. */ - Tcl_DString *dsPtr) /* Uninitialized or empty string to hold - * result. */ + TkWindow *winPtr, /* Window where event occurred: Needed to get + * input context. */ + XEvent *eventPtr, /* X keyboard event. */ + Tcl_DString *dsPtr) /* Uninitialized or empty string to hold + * result. */ { (void) winPtr; /*unused*/ Tcl_DStringInit(dsPtr); @@ -247,13 +352,13 @@ TkpGetString( * * XGetModifierMapping -- * - * Fetch the current keycodes used as modifiers. + * Fetch the current keycodes used as modifiers. * * Results: - * Returns a new modifier map. + * Returns a new modifier map. * * Side effects: - * Allocates a new modifier map data structure. + * Allocates a new modifier map data structure. * *---------------------------------------------------------------------- */ @@ -264,6 +369,13 @@ XGetModifierMapping( { XModifierKeymap * modmap; + (void) display; /*unused*/ + + /* + * MacOSX doesn't use the key codes for the modifiers for anything, and + * we don't generate them either. So there is no modifier map. + */ + modmap = (XModifierKeymap *) ckalloc(sizeof(XModifierKeymap)); modmap->max_keypermod = 0; modmap->modifiermap = NULL; @@ -275,14 +387,13 @@ XGetModifierMapping( * * XFreeModifiermap -- * - * Deallocate a modifier map that was created by - * XGetModifierMapping. + * Deallocate a modifier map that was created by XGetModifierMapping. * * Results: - * None. + * None. * * Side effects: - * Frees the datastructure referenced by modmap. + * Frees the datastructure referenced by modmap. * *---------------------------------------------------------------------- */ @@ -292,7 +403,7 @@ XFreeModifiermap( XModifierKeymap *modmap) { if (modmap->modifiermap != NULL) { - ckfree((char *) modmap->modifiermap); + ckfree((char *) modmap->modifiermap); } ckfree((char *) modmap); } @@ -302,16 +413,16 @@ XFreeModifiermap( * * XKeysymToString, XStringToKeysym -- * - * These X window functions map Keysyms to strings & strings to - * keysyms. However, Tk already does this for the most common keysyms. - * Therefor, these functions only need to support keysyms that will be - * specific to the Macintosh. Currently, there are none. + * These X window functions map keysyms to strings & strings to keysyms. + * However, Tk already does this for the most common keysyms. + * Therefore, these functions only need to support keysyms that will be + * specific to the Macintosh. Currently, there are none. * * Results: - * None. + * None. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -325,7 +436,7 @@ XKeysymToString( KeySym XStringToKeysym( - const char* string) + const char* string) { return NoSymbol; } @@ -333,19 +444,83 @@ XStringToKeysym( /* *---------------------------------------------------------------------- * + * XKeysymToMacKeycode -- + * + * An internal function like XKeysymToKeycode but only generating the + * Mac specific keycode plus the modifiers Shift and Option. + * + * Results: + * A Mac keycode with the actual keycode in the low byte and Mac-style + * modifier bits in the high byte. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +XKeysymToMacKeycode( + Display *display, + KeySym keysym) +{ + if (keysym <= LATIN1_MAX) { + + /* + * Handle keysyms in the Latin-1 range where keysym and Unicode + * character code point are the same. + */ + + InitLatin1Table(display); + return latin1Table[keysym]; + + } else { + + /* + * Handle special keys from our exception tables. Don't mind if this + * is slow, neither the test suite nor [event generate] need to be + * optimized (we hope). + */ + + KeyInfo *kPtr; + + for (kPtr = keyArray; kPtr->keycode != 0; kPtr++) { + if (kPtr->keysym == keysym) { + return kPtr->keycode; + } + } + for (kPtr = virtualkeyArray; kPtr->keycode != 0; kPtr++) { + if (kPtr->keysym == keysym) { + return kPtr->keycode; + } + } + + /* + * For other keysyms (not Latin-1 and not special keys), we'd need a + * generic keysym-to-unicode table. We don't have that, so we give + * up here. + */ + + return 0; + } +} + +/* + *---------------------------------------------------------------------- + * * XKeysymToKeycode -- * - * The function XKeysymToKeycode is only used by tkTest.c and - * currently only implementes the support for keys used in the - * Tk test suite. - * FIXME - This is no longer true. This function is now used in - * "event generate" so we really should make it work. + * The function XKeysymToKeycode takes an X11 keysym and converts it + * into a Mac keycode. It is in the stubs table for compatibility but + * not used anywhere in the core. * * Results: - * None. + * A 32 bit keycode with the the mac keycode (without modifiers) in the + * higher 16 bits of the keycode and the ASCII or Latin-1 code in the + * lower 8 bits of the keycode. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -355,9 +530,28 @@ XKeysymToKeycode( Display* display, KeySym keysym) { - KeyCode keycode = 0; - char virtualKeyCode = 0; + int macKeycode = XKeysymToMacKeycode(display, keysym); + KeyCode result; + /* + * See also TkpSetKeycodeAndState. The 0x0010 magic is used in + * XKeycodeToKeysym. For special keys like XK_Return the lower 8 bits of + * the keysym are usually a related ASCII control code. + */ + + if ((keysym >= XK_F1) && (keysym <= XK_F35)) { + result = 0x0010; + } else { + result = 0x00FF & keysym; + } + result |= (macKeycode & MAC_KEYCODE_MASK) << 16; + + return result; +} + +/* +NB: Keep this commented code for a moment for reference. + if ((keysym >= XK_space) && (XK_asciitilde)) { if (keysym == 'a') { virtualKeyCode = 0x00; @@ -375,54 +569,72 @@ XKeysymToKeycode( virtualKeyCode = 0x24; keysym = '\r'; } - keycode = keysym + (virtualKeyCode <<16); + keycode = keysym + (virtualKeyCode <<16); } return keycode; -} +*/ /* - * When mapping from a keysym to a keycode, need - * information about the modifier state that should be used - * so that when they call XKeycodeToKeysym taking into - * account the xkey.state, they will get back the original - * keysym. + *---------------------------------------------------------------------- + * + * TkpSetKeycodeAndState -- + * + * The function TkpSetKeycodeAndState takes a keysym and fills in the + * appropriate members of an XEvent. It is similar to XKeysymToKeycode, + * but it also sets the modifier mask in the XEvent. It is used by + * [event generate] and it is in the stubs table. + * + * Results: + * Fills an XEvent, sets the member xkey.keycode with a keycode + * formatted the same as XKeysymToKeycode and the member xkey.state with + * the modifiers implied by the keysym. Also fills in xkey.trans_chars, + * so that the actual characters can be retrieved later. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ void -TkpSetKeycodeAndState(tkwin, keySym, eventPtr) - Tk_Window tkwin; - KeySym keySym; - XEvent *eventPtr; +TkpSetKeycodeAndState( + Tk_Window tkwin, + KeySym keysym, + XEvent *eventPtr) { - Display *display; - int state; - KeyCode keycode; - - display = Tk_Display(tkwin); - - if (keySym == NoSymbol) { - keycode = 0; + if (keysym == NoSymbol) { + eventPtr->xkey.keycode = 0; } else { - keycode = XKeysymToKeycode(display, keySym); - } - if (keycode != 0) { - for (state = 0; state < 4; state++) { - if (XKeycodeToKeysym(display, keycode, state) == keySym) { - if (state & 1) { - eventPtr->xkey.state |= ShiftMask; - } - if (state & 2) { - TkDisplay *dispPtr; - - dispPtr = ((TkWindow *) tkwin)->dispPtr; - eventPtr->xkey.state |= dispPtr->modeModMask; - } - break; - } - } + Display *display = Tk_Display(tkwin); + int macKeycode = XKeysymToMacKeycode(display, keysym); + + /* + * See also XKeysymToKeycode. + */ + + if ((keysym >= XK_F1) && (keysym <= XK_F35)) { + eventPtr->xkey.keycode = 0x0010; + } else { + eventPtr->xkey.keycode = 0x00FF & keysym; + } + eventPtr->xkey.keycode |= (macKeycode & MAC_KEYCODE_MASK) << 16; + + if (shiftKey & macKeycode) { + eventPtr->xkey.state |= ShiftMask; + } + if (optionKey & macKeycode) { + eventPtr->xkey.state |= OPTION_MASK; + } + + if (keysym <= LATIN1_MAX) { + int done; + done = Tcl_UniCharToUtf(keysym,eventPtr->xkey.trans_chars); + eventPtr->xkey.trans_chars[done] = 0; + } else { + eventPtr->xkey.trans_chars[0] = 0; + } } - eventPtr->xkey.keycode = keycode; } /* @@ -430,105 +642,132 @@ TkpSetKeycodeAndState(tkwin, keySym, eventPtr) * * TkpGetKeySym -- * - * Given an X KeyPress or KeyRelease event, map the - * keycode in the event into a KeySym. + * Given an X KeyPress or KeyRelease event, map the keycode in the event + * into a keysym. * * Results: - * The return value is the KeySym corresponding to - * eventPtr, or NoSymbol if no matching Keysym could be - * found. + * The return value is the keysym corresponding to eventPtr, or NoSymbol + * if no matching keysym could be found. * * Side effects: - * In the first call for a given display, keycode-to- - * KeySym maps get loaded. + * In the first call for a given display, keycode-to-keysym maps get + * loaded. * *---------------------------------------------------------------------- */ KeySym -TkpGetKeySym(dispPtr, eventPtr) - TkDisplay *dispPtr; /* Display in which to - * map keycode. */ - XEvent *eventPtr; /* Description of X event. */ +TkpGetKeySym( + TkDisplay *dispPtr, /* Display in which to map keycode. */ + XEvent *eventPtr) /* Description of X event. */ { KeySym sym; int index; /* - * Refresh the mapping information if it's stale + * Refresh the mapping information if it's stale. */ if (dispPtr->bindInfoStale) { - TkpInitKeymapInfo(dispPtr); + TkpInitKeymapInfo(dispPtr); } /* - * Figure out which of the four slots in the keymap vector to - * use for this key. Refer to Xlib documentation for more info - * on how this computation works. + * Handle pure modifier keys specially. We use -1 as a signal for + * this. + */ + + if (eventPtr->xany.send_event == -1) { + int modifier = eventPtr->xkey.keycode; + if (modifier == cmdKey) { + return XK_Alt_L; + } else if (modifier == shiftKey) { + return XK_Shift_L; + } else if (modifier == alphaLock) { + return XK_Caps_Lock; + } else if (modifier == optionKey) { + return XK_Meta_L; + } else if (modifier == controlKey) { + return XK_Control_L; + } else if (modifier == rightShiftKey) { + return XK_Shift_R; + } else if (modifier == rightOptionKey) { + return XK_Meta_R; + } else if (modifier == rightControlKey) { + return XK_Control_R; + } else { + + /* + * If we get here, we probably need to implement something new. + */ + + return NoSymbol; + } + } + + /* + * Figure out which of the four slots in the keymap vector to use for + * this key. Refer to Xlib documentation for more info on how this + * computation works. (Note: We use "Option" in keymap columns 2 and 3 + * where other implementations have "Mode_switch".) */ index = 0; - if (eventPtr->xkey.state & dispPtr->modeModMask) { - index = 2; + + /* + * We want Option key combinations to use their base chars as keysyms, so + * we ignore the option modifier here. + */ + +#if 0 + if (eventPtr->xkey.state & OPTION_MASK) { + index |= 2; } +#endif + if ((eventPtr->xkey.state & ShiftMask) - || ((dispPtr->lockUsage != LU_IGNORE) - && (eventPtr->xkey.state & LockMask))) { - index += 1; - } - if (eventPtr->xany.send_event == -1) { - /* We use -1 as a special signal for a pure modifier */ - int modifier = eventPtr->xkey.keycode; - if (modifier == cmdKey) { - return XK_Alt_L; - } else if (modifier == shiftKey) { - return XK_Shift_L; - } else if (modifier == alphaLock) { - return XK_Caps_Lock; - } else if (modifier == optionKey) { - return XK_Meta_L; - } else if (modifier == controlKey) { - return XK_Control_L; - } else if (modifier == rightShiftKey) { - return XK_Shift_R; - } else if (modifier == rightOptionKey) { - return XK_Meta_R; - } else if (modifier == rightControlKey) { - return XK_Control_R; - } else { - /* If we get here, we probably need to implement something new */ - return NoSymbol; - } + || (/* (dispPtr->lockUsage != LU_IGNORE) + && */ (eventPtr->xkey.state & LockMask))) { + index |= 1; } + + /* + * First try of the actual translation. + */ + sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, index); /* - * Special handling: if the key was shifted because of Lock, but - * lock is only caps lock, not shift lock, and the shifted keysym - * isn't upper-case alphabetic, then switch back to the unshifted - * keysym. + * Special handling: If the key was shifted because of Lock, but lock is + * only caps lock, not shift lock, and the shifted keysym isn't + * upper-case alphabetic, then switch back to the unshifted keysym. */ if ((index & 1) && !(eventPtr->xkey.state & ShiftMask) - && (dispPtr->lockUsage == LU_CAPS)) { - if (!(((sym >= XK_A) && (sym <= XK_Z)) - || ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) - || ((sym >= XK_Ooblique) && (sym <= XK_Thorn)))) { - index &= ~1; - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, - index); - } + /*&& (dispPtr->lockUsage == LU_CAPS)*/ ) { + + /* + * FIXME: Keysyms are only identical to Unicode for ASCII and + * Latin-1, so we can't use Tcl_UniCharIsUpper() for keysyms outside + * that range. This may be a serious problem here. + */ + + if ((sym == NoSymbol) || (sym > LATIN1_MAX) + || !Tcl_UniCharIsUpper(sym)) { + index &= ~1; + sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, + index); + } } /* - * Another bit of special handling: if this is a shifted key and there - * is no keysym defined, then use the keysym for the unshifted key. + * Another bit of special handling: If this is a shifted key and there is + * no keysym defined, then use the keysym for the unshifted key. */ if ((index & 1) && (sym == NoSymbol)) { - sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, - index & ~1); + sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, + index & ~1); } return sym; } @@ -538,127 +777,48 @@ TkpGetKeySym(dispPtr, eventPtr) * * TkpInitKeymapInfo -- * - * This procedure is invoked to scan keymap information - * to recompute stuff that's important for binding, such - * as the modifier key (if any) that corresponds to "mode - * switch". + * This procedure is invoked to scan keymap information to recompute + * stuff that's important for binding, such as the modifier key (if any) + * that corresponds to the "Mode_switch" keysym. * * Results: - * None. + * None. * * Side effects: - * Keymap-related information in dispPtr is updated. + * Keymap-related information in dispPtr is updated. * *-------------------------------------------------------------- */ void -TkpInitKeymapInfo(dispPtr) - TkDisplay *dispPtr; /* Display for which to recompute keymap - * information. */ +TkpInitKeymapInfo( + TkDisplay *dispPtr) /* Display for which to recompute keymap + * information. */ { - XModifierKeymap *modMapPtr; - KeyCode *codePtr; - KeySym keysym; - int count, i, j, max, arraySize; -#define KEYCODE_ARRAY_SIZE 20 - dispPtr->bindInfoStale = 0; - modMapPtr = XGetModifierMapping(dispPtr->display); - - /* - * Check the keycodes associated with the Lock modifier. If - * any of them is associated with the XK_Shift_Lock modifier, - * then Lock has to be interpreted as Shift Lock, not Caps Lock. - */ - - dispPtr->lockUsage = LU_IGNORE; - codePtr = modMapPtr->modifiermap + modMapPtr->max_keypermod*LockMapIndex; - for (count = modMapPtr->max_keypermod; count > 0; count--, codePtr++) { - if (*codePtr == 0) { - continue; - } - keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0); - if (keysym == XK_Shift_Lock) { - dispPtr->lockUsage = LU_SHIFT; - break; - } - if (keysym == XK_Caps_Lock) { - dispPtr->lockUsage = LU_CAPS; - break; - } - } /* - * Look through the keycodes associated with modifiers to see if - * the the "mode switch", "meta", or "alt" keysyms are associated - * with any modifiers. If so, remember their modifier mask bits. + * Behaviours that are variable on X11 are defined constant on MacOSX. + * lockUsage is only used above in TkpGetKeySym(), nowhere else + * currently. There is no offical "Mode_switch" key. */ + dispPtr->lockUsage = LU_CAPS; dispPtr->modeModMask = 0; - dispPtr->metaModMask = 0; - dispPtr->altModMask = 0; - codePtr = modMapPtr->modifiermap; - max = 8*modMapPtr->max_keypermod; - for (i = 0; i < max; i++, codePtr++) { - if (*codePtr == 0) { - continue; - } - keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0); - if (keysym == XK_Mode_switch) { - dispPtr->modeModMask |= ShiftMask << (i/modMapPtr->max_keypermod); - } - if ((keysym == XK_Meta_L) || (keysym == XK_Meta_R)) { - dispPtr->metaModMask |= ShiftMask << (i/modMapPtr->max_keypermod); - } - if ((keysym == XK_Alt_L) || (keysym == XK_Alt_R)) { - dispPtr->altModMask |= ShiftMask << (i/modMapPtr->max_keypermod); - } - } + dispPtr->altModMask = ALT_MASK; + dispPtr->metaModMask = OPTION_MASK; /* - * Create an array of the keycodes for all modifier keys. + * MacOSX doesn't use the keycodes for the modifiers for anything, and we + * don't generate them either (the keycodes actually given in the + * simulated modifier events are bogus). So there is no modifier map. + * If we ever want to simulate real modifier keycodes, the list will be + * constant in the Carbon implementation. */ if (dispPtr->modKeyCodes != NULL) { - ckfree((char *) dispPtr->modKeyCodes); + ckfree((char *) dispPtr->modKeyCodes); } dispPtr->numModKeyCodes = 0; - arraySize = KEYCODE_ARRAY_SIZE; - dispPtr->modKeyCodes = (KeyCode *) ckalloc((unsigned) - (KEYCODE_ARRAY_SIZE * sizeof(KeyCode))); - for (i = 0, codePtr = modMapPtr->modifiermap; i < max; i++, codePtr++) { - if (*codePtr == 0) { - continue; - } - - /* - * Make sure that the keycode isn't already in the array. - */ - - for (j = 0; j < dispPtr->numModKeyCodes; j++) { - if (dispPtr->modKeyCodes[j] == *codePtr) { - goto nextModCode; - } - } - if (dispPtr->numModKeyCodes >= arraySize) { - KeyCode *new; - - /* - * Ran out of space in the array; grow it. - */ - - arraySize *= 2; - new = (KeyCode *) ckalloc((unsigned) - (arraySize * sizeof(KeyCode))); - memcpy((VOID *) new, (VOID *) dispPtr->modKeyCodes, - (dispPtr->numModKeyCodes * sizeof(KeyCode))); - ckfree((char *) dispPtr->modKeyCodes); - dispPtr->modKeyCodes = new; - } - dispPtr->modKeyCodes[dispPtr->numModKeyCodes] = *codePtr; - dispPtr->numModKeyCodes++; - nextModCode: continue; - } - XFreeModifiermap(modMapPtr); + dispPtr->modKeyCodes = NULL; } diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index eec9c77..5ae94a7 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.3 2004/02/14 01:08:28 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.4 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkMacOSXInt.h" #include "tkMenuButton.h" @@ -262,7 +262,7 @@ static void DrawTearoffEntry _ANSI_ARGS_((TkMenu *menuPtr, TkMenuEntry *mePtr, Drawable d, GC gc, Tk_Font tkfont, CONST Tk_FontMetrics *fmPtr, int x, int y, int width, int height)); -static void EventuallyInvokeMenu (ClientData data); +static void EventuallyInvokeMenu (ClientData data); static void GetEntryText _ANSI_ARGS_((TkMenuEntry *mePtr, Tcl_DString *dStringPtr)); static void GetMenuAccelGeometry _ANSI_ARGS_((TkMenu *menuPtr, @@ -1039,7 +1039,7 @@ ReconfigureIndividualMenu( int base) /* The last index that we do not want * touched. 0 for normal menus; * # of system help menu items - * for help menus. */ + * for help menus. */ { int count; int index; @@ -1954,7 +1954,7 @@ TkpSetMainMenubar( WindowRef macWindowPtr; WindowRef frontNonFloating; - winPort=TkMacOSXGetDrawablePort(winPtr->window); + winPort = TkMacOSXGetDrawablePort(winPtr->window); if (!winPort) { return; } @@ -2076,7 +2076,7 @@ TkpSetWindowMenuBar( listPtr->menuPtr = menuPtr; } } - + static void /* *---------------------------------------------------------------------- @@ -2105,7 +2105,7 @@ EventuallyInvokeMenu (ClientData data) TkInvokeMenu(realData->menuPtr->interp, realData->menuPtr, realData->index); } - + /* *---------------------------------------------------------------------- * @@ -2141,10 +2141,10 @@ TkMacOSXDispatchMenuEvent( helpMenuName); ckfree(helpMenuName); if ((helpMenuRef != NULL) && (helpMenuRef->menuPtr != NULL)) { - MenuRef outHelpMenu; - MenuItemIndex itemIndex; - int newIndex; - HMGetHelpMenu(&outHelpMenu, &itemIndex); + MenuRef outHelpMenu; + MenuItemIndex itemIndex; + int newIndex; + HMGetHelpMenu(&outHelpMenu, &itemIndex); newIndex = index - itemIndex; result = TkInvokeMenu(currentMenuBarInterp, helpMenuRef->menuPtr, newIndex); @@ -2182,7 +2182,7 @@ TkMacOSXDispatchMenuEvent( } return result; } - + /* *---------------------------------------------------------------------- * @@ -3429,6 +3429,8 @@ DrawMenuEntryLabel( GDHandle saveDevice; GWorldPtr destPort; #ifdef USE_ATSU + int xLocation; + int yLocation; int runLengths; CFStringRef stringRef; ATSUTextLayout textLayout; @@ -3455,7 +3457,8 @@ DrawMenuEntryLabel( tag = kATSUSizeTag; valueSize = sizeof(fixedSize); valuePtr = &fixedSize; - if ((err=ATSUSetAttributes(style, 1, &tag, &valueSize, &valuePtr))!= noErr) { + err = ATSUSetAttributes(style, 1, &tag, &valueSize, &valuePtr); + if (err != noErr) { fprintf(stderr,"ATSUSetAttributes failed,%d\n", err ); } @@ -3464,7 +3467,8 @@ DrawMenuEntryLabel( tag = kATSUFontTag; valueSize = sizeof(fontID); valuePtr = &fontID; - if ((err=ATSUSetAttributes(style, 1, &tag, &valueSize, &valuePtr))!= noErr) { + err = ATSUSetAttributes(style, 1, &tag, &valueSize, &valuePtr); + if (err != noErr) { fprintf(stderr,"ATSUSetAttributes failed,%d\n", err ); } @@ -3474,12 +3478,15 @@ DrawMenuEntryLabel( #ifdef USE_ATSU runLengths = 1; length = Tcl_DStringLength(&itemTextDString); - stringRef = CFStringCreateWithCString(NULL, Tcl_DStringValue(&itemTextDString), GetApplicationTextEncoding()); + stringRef = CFStringCreateWithCString(NULL, Tcl_DStringValue(&itemTextDString), + kCFStringEncodingUTF8); if (!stringRef) { fprintf(stderr,"CFStringCreateWithCString failed\n"); } - if ((err=ATSUCreateTextLayoutWithTextPtr(CFStringGetCharactersPtr(stringRef), 0, length, length, - 1, &runLengths, &style, &textLayout)) != noErr) { + err = ATSUCreateTextLayoutWithTextPtr(CFStringGetCharactersPtr(stringRef), + 0, length, length, + 1, &runLengths, &style, &textLayout) + if (err != noErr) { fprintf(stderr,"ATSUCreateTextLayoutWithTextPtr failed, %d\n", err); return; } @@ -3496,11 +3503,11 @@ DrawMenuEntryLabel( TkMacOSXSetUpGraphicsPort(gc, destPort); MoveTo((short) leftEdge, (short) baseline); - Tcl_UtfToExternalDString(NULL, Tcl_DStringValue(&itemTextDString), + Tcl_UtfToExternalDString(TkMacOSXCarbonEncoding, Tcl_DStringValue(&itemTextDString), Tcl_DStringLength(&itemTextDString), &convertedTextDString); #ifdef USE_ATSU - xLocation = leftEdge<<16; - yLocation = baseline<<16; + xLocation = leftEdge << 16; + yLocation = baseline << 16; ATSUDrawText(textLayout,kATSUFromTextBeginning, kATSUToTextEnd, xLocation, yLocation); ATSUDisposeTextLayout(textLayout); CFRelease(stringRef); diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index 52b239c..64a14a1 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.2 2002/08/31 06:12:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.2.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include @@ -187,18 +187,18 @@ TkpDisplayMenuButton( SetGWorld(dstPort, NULL); TkMacOSXSetUpClippingRgn(Tk_WindowId(tkwin)); - winPtr=(TkWindow *)butPtr->tkwin; - paneRect.left=winPtr->privatePtr->xOff; - paneRect.top=winPtr->privatePtr->yOff; - paneRect.right=paneRect.left+Tk_Width(butPtr->tkwin)-1; - paneRect.bottom=paneRect.top+Tk_Height(butPtr->tkwin)-1; + winPtr = (TkWindow *)butPtr->tkwin; + paneRect.left = winPtr->privatePtr->xOff; + paneRect.top = winPtr->privatePtr->yOff; + paneRect.right = paneRect.left+Tk_Width(butPtr->tkwin)-1; + paneRect.bottom = paneRect.top+Tk_Height(butPtr->tkwin)-1; - cntrRect=paneRect; + cntrRect = paneRect; - cntrRect.left+=butPtr->inset; - cntrRect.top+=butPtr->inset; - cntrRect.right-=butPtr->inset; - cntrRect.bottom-=butPtr->inset; + cntrRect.left += butPtr->inset; + cntrRect.top += butPtr->inset; + cntrRect.right -= butPtr->inset; + cntrRect.bottom -= butPtr->inset; if (mbPtr->userPane) { MenuButtonControlParams params; @@ -246,7 +246,8 @@ TkpDisplayMenuButton( } if ((titleChanged||styleChanged) && titleParams .len) { if (hasImageOrBitmap) { - if ((err=SetControlFontStyle(mbPtr->control,&titleParams.style))!=noErr) { + err = SetControlFontStyle(mbPtr->control,&titleParams.style); + if (err !=noErr) { fprintf(stderr,"SetControlFontStyle failed %d\n", err); return; } @@ -284,10 +285,11 @@ TkpDisplayMenuButton( ClosePicture(); tkPictureIsOpen = 0; - if ( (err=SetControlData(mbPtr->control, kControlButtonPart, + err = SetControlData(mbPtr->control, kControlButtonPart, kControlBevelButtonContentTag, sizeof(ControlButtonContentInfo), - (char *) &mbPtr->bevelButtonContent)) != noErr ) { + (char *) &mbPtr->bevelButtonContent); + if (err != noErr) { fprintf(stderr,"SetControlData BevelButtonContent failed, %d\n", err ); } switch (butPtr->anchor) { @@ -320,10 +322,11 @@ TkpDisplayMenuButton( break; } - if ((err=SetControlData(mbPtr->control, kControlButtonPart, + err = SetControlData(mbPtr->control, kControlButtonPart, kControlBevelButtonGraphicAlignTag, sizeof(ControlButtonGraphicAlignment), - (char *) &theAlignment)) != noErr ) { + (char *) &theAlignment); + if (err != noErr ) { fprintf(stderr,"SetControlData BevelButtonGraphicAlign failed, %d\n", err ); } } @@ -449,7 +452,7 @@ TkpComputeMenuButtonGeometry(mbPtr) if (mbPtr->indicatorOn) { mm = WidthMMOfScreen(Tk_Screen(mbPtr->tkwin)); pixels = WidthOfScreen(Tk_Screen(mbPtr->tkwin)); - mbPtr->indicatorHeight= kTriangleHeight; + mbPtr->indicatorHeight = kTriangleHeight; mbPtr->indicatorWidth = kTriangleWidth + kTriangleMargin; width += mbPtr->indicatorWidth; } else { @@ -604,31 +607,32 @@ MenuButtonInitControl ( int length; Str255 itemText; - rootControl=TkMacOSXGetRootControl(Tk_WindowId(butPtr->tkwin)); - mbPtr->windowRef=GetWindowFromPort(TkMacOSXGetDrawablePort(Tk_WindowId(butPtr->tkwin))); + rootControl = TkMacOSXGetRootControl(Tk_WindowId(butPtr->tkwin)); + mbPtr->windowRef = GetWindowFromPort(TkMacOSXGetDrawablePort(Tk_WindowId(butPtr->tkwin))); /* * Set up the user pane */ initiallyVisible = false; initialValue = kControlSupportsEmbedding| - kControlHasSpecialBackground; + kControlHasSpecialBackground; minValue = 0; maxValue = 1; procID = kControlUserPaneProc; controlReference = (SInt32)mbPtr; - mbPtr->userPane=NewControl(mbPtr->windowRef, - paneRect, "\p", - initiallyVisible, - initialValue, - minValue, - maxValue, - procID, - controlReference ); + mbPtr->userPane = NewControl(mbPtr->windowRef, + paneRect, "\p", + initiallyVisible, + initialValue, + minValue, + maxValue, + procID, + controlReference ); if (!mbPtr->userPane) { fprintf(stderr,"Failed to create user pane control\n"); return 1; } - if ((status=EmbedControl(mbPtr->userPane,rootControl))!=noErr) { + status = EmbedControl(mbPtr->userPane,rootControl); + if (status != noErr) { fprintf(stderr,"Failed to embed user pane control %d\n", status); return 1; } @@ -651,7 +655,8 @@ MenuButtonInitControl ( fprintf(stderr,"failed to create control of type %d : line %d\n",mbPtr->params.procID, __LINE__); return 1; } - if ((err=EmbedControl(mbPtr->control,mbPtr->userPane)) != noErr ) { + err = EmbedControl(mbPtr->control,mbPtr->userPane); + if (err != noErr ) { fprintf(stderr,"failed to embed control of type %d,%d\n",procID, err); return 1; } @@ -662,35 +667,36 @@ MenuButtonInitControl ( SetControlTitleWithCFString(mbPtr->control, cf); CFRelease(cf); if (mbPtr->titleParams.len) { - if ((err=SetControlFontStyle(mbPtr->control,&mbPtr->titleParams.style))!=noErr) { + err = SetControlFontStyle(mbPtr->control,&mbPtr->titleParams.style); + if (err !=noErr) { fprintf(stderr,"SetControlFontStyle failed %d\n", err); return 1; } } } else { - CFStringRef cf; + CFStringRef cf; err = TkMacOSXGetNewMenuID(mbPtr->info.interp, (TkMenu *)mbPtr, 0, &menuID); if (err != TCL_OK) { return err; } length = strlen(Tk_PathName(mbPtr->info.tkwin)); memmove(&itemText[1], Tk_PathName(mbPtr->info.tkwin), - (length > 230) ? 230 : length); + (length > 230) ? 230 : length); itemText[0] = (length > 230) ? 230 : length; if (!(mbPtr->menuRef = NewMenu(menuID,itemText))) { return 1; } - cf = CFStringCreateWithCString(NULL, - mbPtr->titleParams.title, kCFStringEncodingUTF8); + cf = CFStringCreateWithCString(NULL, + mbPtr->titleParams.title, kCFStringEncodingUTF8); AppendMenuItemText(mbPtr->menuRef, "\px"); if (cf != NULL) { SetMenuItemTextWithCFString(mbPtr->menuRef, 1, cf); CFRelease(cf); } err = SetControlData(mbPtr->control, - kControlNoPart, - kControlPopupButtonMenuRefTag, - sizeof(mbPtr->menuRef), &mbPtr->menuRef); + kControlNoPart, + kControlPopupButtonMenuRefTag, + sizeof(mbPtr->menuRef), &mbPtr->menuRef); SetControlMinimum(mbPtr->control, 1); SetControlMaximum(mbPtr->control, 1); SetControlValue(mbPtr->control, 1); @@ -723,9 +729,9 @@ OSErr SetUserPaneDrawProc ( ControlUserPaneDrawUPP myControlUserPaneDrawUPP; myControlUserPaneDrawUPP = NewControlUserPaneDrawUPP(upp); return SetControlData (control, - kControlNoPart, kControlUserPaneDrawProcTag, - sizeof(myControlUserPaneDrawUPP), - (Ptr) &myControlUserPaneDrawUPP); + kControlNoPart, kControlUserPaneDrawProcTag, + sizeof(myControlUserPaneDrawUPP), + (Ptr) &myControlUserPaneDrawUPP); } /* diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 2516ef8..150519c 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -156,12 +156,13 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) medPtr->state |= Mod2Mask; /* option key */ } if (eventPtr->eKind == kEventMouseDown - || eventPtr->eKind== kEventMouseDragged ) { + || eventPtr->eKind == kEventMouseDragged ) { EventMouseButton mouseButton; - if ((status=GetEventParameter(eventPtr->eventRef, - kEventParamMouseButton, - typeMouseButton, NULL, - sizeof(mouseButton), NULL,&mouseButton)) != noErr ) { + status = GetEventParameter(eventPtr->eventRef, + kEventParamMouseButton, + typeMouseButton, NULL, + sizeof(mouseButton), NULL,&mouseButton); + if (status != noErr ) { fprintf (stderr, "Failed to retrieve mouse button, %d\n", status); statusPtr->err = 1; return 0; @@ -169,7 +170,7 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) medPtr->state |= 1 << ((mouseButton-1)+8); } - medPtr->windowPart= FindWindow(where, &medPtr->whichWin); + medPtr->windowPart = FindWindow(where, &medPtr->whichWin); window = TkMacOSXGetXWindow(medPtr->whichWin); if (medPtr->whichWin != NULL && window == None) { return 0; @@ -193,10 +194,11 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) window, medPtr->state); } if (eventPtr->eKind == kEventMouseWheelMoved) { - if ((status=GetEventParameter(eventPtr->eventRef, - kEventParamMouseWheelDelta, - typeLongInteger, NULL, - sizeof(medPtr->delta), NULL,&medPtr->delta)) != noErr ) { + status = GetEventParameter(eventPtr->eventRef, + kEventParamMouseWheelDelta, + typeLongInteger, NULL, + sizeof(medPtr->delta), NULL,&medPtr->delta); + if (status != noErr ) { fprintf (stderr, "Failed to retrieve mouse wheel delta, %d\n", status); statusPtr->err = 1; @@ -233,23 +235,26 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) } } - if (medPtr->whichWin && eventPtr->eKind==kEventMouseDown) { + if (medPtr->whichWin && eventPtr->eKind == kEventMouseDown) { ProcessSerialNumber frontPsn, ourPsn; Boolean flag; - if ((err=GetFrontProcess(&frontPsn))!=noErr) { + err = GetFrontProcess(&frontPsn); + if (err != noErr) { fprintf(stderr, "GetFrontProcess failed, %d\n", err); statusPtr->err = 1; return 1; } GetCurrentProcess(&ourPsn); - if ((err=SameProcess(&frontPsn, &ourPsn, &flag))!=noErr) { + err = SameProcess(&frontPsn, &ourPsn, &flag); + if (err != noErr) { fprintf(stderr, "SameProcess failed, %d\n", err); statusPtr->err = 1; return 1; } else { if (!flag) { - if ((err=SetFrontProcess(&ourPsn)) != noErr) { + err = SetFrontProcess(&ourPsn); + if (err != noErr) { fprintf(stderr,"SetFrontProcess failed,%d\n", err); statusPtr->err = 1; return 1; @@ -271,11 +276,25 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) if (!(TkpIsWindowFloating(medPtr->whichWin)) && (medPtr->whichWin != medPtr->activeNonFloating)) { Tk_Window grabWin = TkMacOSXGetCapture(); + if ((grabWin == NULL)) { + int grabState = TkGrabState((TkWindow*)tkwin); + if (grabState != TK_GRAB_NONE && grabState != TK_GRAB_IN_TREE) { + /* Now we want to set the focus to the local grabWin */ + TkMacOSXSetEatButtonUp(true); + grabWin = (Tk_Window) (((TkWindow*)tkwin)->dispPtr->grabWinPtr); + BringWindowForward(GetWindowFromPort(TkMacOSXGetDrawablePort(((TkWindow*)grabWin)->window))); + statusPtr->stopProcessing = 1; + return false; + } + } if ((grabWin != NULL) && (grabWin != tkwin)) { TkWindow * tkw, * grb; tkw = (TkWindow *)tkwin; grb = (TkWindow *)grabWin; - SysBeep(1); + /* Now we want to set the focus to the global grabWin */ + TkMacOSXSetEatButtonUp(true); + BringWindowForward(GetWindowFromPort(TkMacOSXGetDrawablePort(((TkWindow*)grabWin)->window))); + statusPtr->stopProcessing = 1; return false; } @@ -470,7 +489,7 @@ HandleInCollapse(WindowRef win) static int GeneratePollingEvents(MouseEventData * medPtr) { - Tk_Window tkwin, rootwin, grabWin, topPtr; + Tk_Window tkwin, rootwin, grabWin; Window window; int local_x, local_y; TkDisplay *dispPtr; diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 0d0764f..4a87b64 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.5 2002/09/26 17:07:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.5.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tclInt.h" @@ -1155,11 +1155,11 @@ TkMacOSXCreateFakeEvent () EventTime eTime; EventRef eventRef; EventAttributes flags; - eClass=kEventClassWish; + eClass = kEventClassWish; eKind = 0xffff; - eTime =GetLastUserEventTime() + 0.001; - flags=kEventAttributeUserEvent; - if (CreateEvent(NULL,eClass,eKind,eTime,flags,&eventRef)!=noErr) { + eTime = GetLastUserEventTime() + 0.001; + flags = kEventAttributeUserEvent; + if (CreateEvent(NULL,eClass,eKind,eTime,flags,&eventRef) != noErr) { fprintf(stderr,"CreateEvent failed\n"); return NULL; } diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h index 8f9d2be..dcb8359 100644 --- a/macosx/tkMacOSXPort.h +++ b/macosx/tkMacOSXPort.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXPort.h,v 1.3 2002/09/26 17:07:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXPort.h,v 1.3.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #ifndef _TKMACPORT @@ -159,9 +159,10 @@ extern int strncasecmp _ANSI_ARGS_((CONST char *s1, #define XNoOp(display) {display->request++;} #define XUngrabServer(display) #define XSynchronize(display, bool) {display->request++;} -#define XSync(display, bool) {display->request++;} #define XVisualIDFromVisual(visual) (visual->visualid) +int XSync(Display *display, Bool discard); + /* * The following functions are not used on the Mac, so we stub them out. */ diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c index 3c00610..9022387 100644 --- a/macosx/tkMacOSXScale.c +++ b/macosx/tkMacOSXScale.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXScale.c,v 1.2 2002/08/31 06:12:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXScale.c,v 1.2.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkScale.h" @@ -152,7 +152,7 @@ TkpDisplayScale(clientData) SInt16 maxValue; SInt16 procID; SInt32 controlReference; - Boolean initiallyVisible=true; + Boolean initiallyVisible = true; fprintf(stderr,"TkpDisplayScale\n"); scalePtr->flags &= ~REDRAW_PENDING; @@ -206,8 +206,8 @@ TkpDisplayScale(clientData) * Set up port for drawing Macintosh control. */ macDraw = (MacDrawable *) Tk_WindowId(tkwin); - destPort=TkMacOSXGetDrawablePort(Tk_WindowId(tkwin)); - windowRef=GetWindowFromPort(destPort); + destPort = TkMacOSXGetDrawablePort(Tk_WindowId(tkwin)); + windowRef = GetWindowFromPort(destPort); GetGWorld(&saveWorld, &saveDevice); SetGWorld(destPort, NULL); TkMacOSXSetUpClippingRgn(Tk_WindowId(tkwin)); @@ -217,16 +217,16 @@ TkpDisplayScale(clientData) */ if (macScalePtr->scaleHandle == NULL) { fprintf(stderr,"Initialising scale\n"); - r.left=macDraw->xOff; - r.top=macDraw->yOff; - r.right=macDraw->xOff+Tk_Width(tkwin) - scalePtr->inset; - r.bottom=macDraw->yOff+Tk_Height(tkwin) - scalePtr->inset; - - initialValue=scalePtr->value; - minValue=scalePtr->toValue; - maxValue=scalePtr->fromValue; - procID=kControlSliderProc; - controlReference=(SInt32) macScalePtr; + r.left = macDraw->xOff; + r.top = macDraw->yOff; + r.right = macDraw->xOff+Tk_Width(tkwin) - scalePtr->inset; + r.bottom = macDraw->yOff+Tk_Height(tkwin) - scalePtr->inset; + + initialValue = scalePtr->value; + minValue = scalePtr->toValue; + maxValue = scalePtr->fromValue; + procID = kControlSliderProc; + controlReference = (SInt32) macScalePtr; macScalePtr->scaleHandle = NewControl(windowRef, &r, "\p", initiallyVisible, initialValue,minValue,maxValue, procID, controlReference); @@ -234,7 +234,7 @@ TkpDisplayScale(clientData) /* * If we are foremost than make us active. */ - if (windowRef==FrontWindow()) { + if (windowRef == FrontWindow()) { macScalePtr->flags |= ACTIVE; } } diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index f7e40e5..778b447 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.1 2003/12/17 18:08:29 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.2 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkScrollbar.h" @@ -637,7 +637,7 @@ ThumbActionProc() NULL, &trackingResult); - if ((err==noErr) + if ((err == noErr) && ((trackingResult == kMouseTrackingMouseDragged) || (trackingResult == kMouseTrackingMouseMoved))) { /* @@ -681,7 +681,7 @@ ThumbActionProc() Tcl_GlobalEval(interp, cmdString.string); Tcl_Release((ClientData) interp); } - } while ((err==noErr) && trackingResult!=kMouseTrackingMouseReleased ); + } while ((err == noErr) && trackingResult != kMouseTrackingMouseReleased); Tcl_DStringFree(&cmdString); return; diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 380725f..1d881cf 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2 2002/08/31 06:12:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2.2.1 2004/02/16 00:42:34 wolfsuit Exp $ */ #include "tkInt.h" @@ -898,8 +898,8 @@ TkMacOSXInvalidateWindow( WindowRef windowRef; CGrafPtr grafPtr; - grafPtr=TkMacOSXGetDrawablePort((Drawable)macWin); - windowRef=GetWindowFromPort(grafPtr); + grafPtr = TkMacOSXGetDrawablePort((Drawable)macWin); + windowRef = GetWindowFromPort(grafPtr); if (flag == TK_WINDOW_ONLY) { InvalWindowRgn(windowRef,macWin->clipRgn); diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index af3619b..f718d08 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -235,7 +235,7 @@ GenerateUpdateEvent(Window window) GetRegionBounds(visRgn,&bounds); bounds.right -= bounds.left; bounds.bottom -= bounds.top; - bounds.left= + bounds.left = 0; bounds.top=0; RectRgn(visRgn, &bounds); GenerateUpdates(visRgn, winPtr); diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 6973213..4a5203b 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.2 2004/02/14 01:08:29 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.3 2004/02/16 00:42:34 wolfsuit Exp $ */ #include @@ -5029,7 +5029,7 @@ TkMacOSXUnregisterMacWindow( if (!windowHashInit) { panic("TkMacOSXUnregisterMacWindow: unmapping before inited"); } - entryPtr=Tcl_FindHashEntry(&windowTable,(char *) macWinPtr); + entryPtr = Tcl_FindHashEntry(&windowTable,(char *) macWinPtr); if (!entryPtr) { fprintf(stderr,"Unregister:failed to find window %08x\n", (int) macWinPtr ); @@ -5253,15 +5253,15 @@ TkMacOSXWindowOffset( if (!strucRgn) { if(!(strucRgn = NewRgn())) { - err=MemError(); + err = MemError(); } } if (!contRgn) { if(!(contRgn = NewRgn())) { - err=MemError(); + err = MemError(); } } - if (err==noErr) { + if (err == noErr) { GetWindowRegion(wRef, kWindowStructureRgn, strucRgn); GetWindowRegion(wRef, kWindowContentRgn, contRgn); GetRegionBounds(strucRgn,&strucRect); -- cgit v0.12 From 6b8cb98d74ed7563290ff2fe719b4694ef5de02c Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Mon, 16 Feb 2004 23:09:23 +0000 Subject: This gets the scroll wheel working for listboxes and text widgets for Mac OS X. It also changes the model to route scrollwheel events to the window under the pointer, not the focus window on X (and only on X). That is the correct behavior for Mac OS X. --- ChangeLog | 23 +++++++++++++++++++---- generic/tkEvent.c | 7 ++++++- library/listbox.tcl | 13 ++++++++++--- library/text.tcl | 13 ++++++++++--- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index b06da65..11c7232 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2004-02-16 Jim Ingham + + Fix for MouseWheel Events (from Daniel Steffen): + + * generic/tkEvent.c (Tk_HandleEvent): On Mac OS X, don't route + MouseWheel events to the Focus window. They are sent to the + window under the pointer on X (and the GenerateMouseWheelEvent + already got this right.) + * library/listbox.tcl: On Mac OS, don't use the magic 120 + divisor that is used on Windows. We may come up with a cleaner + way to do this for the TOT, but this is simple and will do for the + 8.4 branch. + * library/text.tcl: Ditto. + 2004-02-15 Jim Ingham Backport Mac OS X specific fixes from TOT: @@ -7,10 +21,11 @@ * macosx/tkMacOSXKeyboard.c: Add PowerBook keycode 0x34 as . [Benjamin Riefenstahl] - * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. This - version is clearer, and works helps keep the mouse better pinned to the - scrollbar. I also removed the glitch where the scrollbar would jump get - its middle over the mouse when you first moved it. + * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. + This version is clearer, and works helps keep the mouse better + pinned to the scrollbar. I also removed the glitch where the + scrollbar would jump get its middle over the mouse when you first + moved it. * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): add unicode clipboard support. [Patch #840107] (senn) diff --git a/generic/tkEvent.c b/generic/tkEvent.c index f3b61d6..117f873 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.17.2.1 2003/07/19 01:03:25 hobbs Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.17.2.2 2004/02/16 23:09:25 wolfsuit Exp $ */ #include "tkPort.h" @@ -838,7 +838,12 @@ Tk_HandleEvent(eventPtr) * available on the Windows version of Tk. */ +#ifdef MAC_OSX_TK + /* MouseWheel events are not focus specific on Mac OS X */ + if (mask & (KeyPressMask|KeyReleaseMask)) { +#else if (mask & (KeyPressMask|KeyReleaseMask|MouseWheelMask)) { +#endif winPtr->dispPtr->lastEventTime = eventPtr->xkey.time; winPtr = TkFocusKeyEvent(winPtr, eventPtr); if (winPtr == NULL) { diff --git a/library/listbox.tcl b/library/listbox.tcl index ff3b549..dcc3cde 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk listbox widgets # and provides procedures that help in implementing those bindings. # -# RCS: @(#) $Id: listbox.tcl,v 1.13 2002/08/31 06:12:28 das Exp $ +# RCS: @(#) $Id: listbox.tcl,v 1.13.2.1 2004/02/16 23:09:25 wolfsuit Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -179,8 +179,15 @@ bind Listbox { # someone could use the "event generate" command to produce one # on other platforms. -bind Listbox { - %W yview scroll [expr {- (%D / 120) * 4}] units +if {[string equal [tk windowingsystem] "classic"] + || [string equal [tk windowingsystem] "aqua"]} { + bind Listbox { + %W yview scroll [expr {- (%D)}] units + } +} else { + bind Listbox { + %W yview scroll [expr {- (%D / 120) * 4}] units + } } if {[string equal "x11" [tk windowingsystem]]} { diff --git a/library/text.tcl b/library/text.tcl index eb227c2..85d83f1 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk text widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: text.tcl,v 1.24 2002/08/31 06:12:28 das Exp $ +# RCS: @(#) $Id: text.tcl,v 1.24.2.1 2004/02/16 23:09:25 wolfsuit Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -458,8 +458,15 @@ set ::tk::Priv(prevPos) {} # someone could use the "event generate" command to produce one # on other platforms. -bind Text { - %W yview scroll [expr {- (%D / 120) * 4}] units +if {[string equal [tk windowingsystem] "classic"] + || [string equal [tk windowingsystem] "aqua"]} { + bind Text { + %W yview scroll [expr {- (%D)}] units + } +} else { + bind Text { + %W yview scroll [expr {- (%D / 120) * 4}] units + } } if {[string equal "x11" [tk windowingsystem]]} { -- cgit v0.12 From 53542ad7b74ce909809d9e560c25ab6d946d8f78 Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Mon, 16 Feb 2004 23:20:01 +0000 Subject: Update the docs for the Mac OS X MouseWheel changes. --- ChangeLog | 1 + doc/bind.n | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11c7232..b8ffd76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ way to do this for the TOT, but this is simple and will do for the 8.4 branch. * library/text.tcl: Ditto. + * doc/bind.n: Update the docs to reflect the changes. 2004-02-15 Jim Ingham diff --git a/doc/bind.n b/doc/bind.n index 5704ba7..1238641 100644 --- a/doc/bind.n +++ b/doc/bind.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bind.n,v 1.7 2002/09/30 09:35:39 dkf Exp $ +'\" RCS: @(#) $Id: bind.n,v 1.7.2.1 2004/02/16 23:20:02 wolfsuit Exp $ '\" .so man.macros .TH bind n 8.0 Tk "Tk Built-In Commands" @@ -199,16 +199,18 @@ substitutions you would make when binding to these events. Some mice on the Windows platform support a mouse wheel which is used for scrolling documents without using the scrollbars. By rolling the wheel, the system will generate \fBMouseWheel\fR events that the -application can use to scroll. Like \fBKey\fR events the event is -always routed to the window that currently has focus. When the event +application can use to scroll. On Windows, the event is +always routed to the window that currently has focus. On Mac OS X, +the event is routed to the window under the pointer. When the event is received you can use the \fB%D\fR substitution to get the \fIdelta\fR field for the event which is a integer value of motion that the mouse wheel has moved. The smallest value for which the system will report is defined by the OS. On Windows 95 & 98 machines this value is at least 120 before it is reported. However, higher -resolution devices may be available in the future. The sign of the -value determines which direction your widget should scroll. Positive -values should scroll up and negative values should scroll down. +resolution devices may be available in the future. On Mac OS X, the value is +not scaled by 120, but a value of 1 corresponds to roughly one text line. +The sign of the value determines which direction your widget should scroll. +Positive values should scroll up and negative values should scroll down. .VE .PP The last part of a long event specification is \fIdetail\fR. In the -- cgit v0.12 From 064b39544a3a47938062584c49ae51439b08dc80 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 17 Feb 2004 07:17:17 +0000 Subject: * macosx/tkMacOSXMouseEvent.c: fixed modifiers for MouseWheel events. * library/listbox.tcl: * library/text.tcl: * library/scrlbar.tcl: on Mac OS, add bindings for MouseWheel with modifiers, according to platform convention: Option increases scrolling speed 10 fold; Space scrolls horizontally. * macosx/Wish.pbproj/project.pbxproj: * macosx/tkAboutDlg.r: changed year in copyright strings to 2004. --- ChangeLog | 13 +++++++++++++ library/listbox.tcl | 11 ++++++++++- library/scrlbar.tcl | 17 ++++++++++++++++- library/text.tcl | 11 ++++++++++- macosx/Wish.pbproj/project.pbxproj | 2 +- macosx/tkAboutDlg.r | 4 ++-- macosx/tkMacOSXMouseEvent.c | 1 + 7 files changed, 53 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8ffd76..fc96a7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-02-17 Daniel Steffen + + * macosx/tkMacOSXMouseEvent.c: fixed modifiers for MouseWheel events. + + * library/listbox.tcl: + * library/text.tcl: + * library/scrlbar.tcl: on Mac OS, add bindings for MouseWheel with + modifiers, according to platform convention: + Option increases scrolling speed 10 fold; Space scrolls horizontally. + + * macosx/Wish.pbproj/project.pbxproj: + * macosx/tkAboutDlg.r: changed year in copyright strings to 2004. + 2004-02-16 Jim Ingham Fix for MouseWheel Events (from Daniel Steffen): diff --git a/library/listbox.tcl b/library/listbox.tcl index dcc3cde..b2abe11 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk listbox widgets # and provides procedures that help in implementing those bindings. # -# RCS: @(#) $Id: listbox.tcl,v 1.13.2.1 2004/02/16 23:09:25 wolfsuit Exp $ +# RCS: @(#) $Id: listbox.tcl,v 1.13.2.2 2004/02/17 07:17:17 das Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -184,6 +184,15 @@ if {[string equal [tk windowingsystem] "classic"] bind Listbox { %W yview scroll [expr {- (%D)}] units } + bind Listbox { + %W yview scroll [expr {-10 * (%D)}] units + } + bind Listbox { + %W xview scroll [expr {- (%D)}] units + } + bind Listbox { + %W xview scroll [expr {-10 * (%D)}] units + } } else { bind Listbox { %W yview scroll [expr {- (%D / 120) * 4}] units diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index b31686d..49cd1b6 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk scrollbar widgets. # It also provides procedures that help in implementing the bindings. # -# RCS: @(#) $Id: scrlbar.tcl,v 1.10 2002/08/31 06:12:28 das Exp $ +# RCS: @(#) $Id: scrlbar.tcl,v 1.10.2.1 2004/02/17 07:17:17 das Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -130,6 +130,21 @@ bind Scrollbar { tk::ScrollToPos %W 1 } } +if {[string equal [tk windowingsystem] "classic"] + || [string equal [tk windowingsystem] "aqua"]} { + bind Scrollbar { + tk::ScrollByUnits %W v [expr {- (%D)}] + } + bind Scrollbar { + tk::ScrollByUnits %W v [expr {-10 * (%D)}] + } + bind Scrollbar { + tk::ScrollByUnits %W h [expr {- (%D)}] + } + bind Scrollbar { + tk::ScrollByUnits %W h [expr {-10 * (%D)}] + } +} # tk::ScrollButtonDown -- # This procedure is invoked when a button is pressed in a scrollbar. # It changes the way the scrollbar is displayed and takes actions diff --git a/library/text.tcl b/library/text.tcl index 85d83f1..8509892 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk text widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: text.tcl,v 1.24.2.1 2004/02/16 23:09:25 wolfsuit Exp $ +# RCS: @(#) $Id: text.tcl,v 1.24.2.2 2004/02/17 07:17:17 das Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -463,6 +463,15 @@ if {[string equal [tk windowingsystem] "classic"] bind Text { %W yview scroll [expr {- (%D)}] units } + bind Text { + %W yview scroll [expr {-10 * (%D)}] units + } + bind Text { + %W xview scroll [expr {- (%D)}] units + } + bind Text { + %W xview scroll [expr {-10 * (%D)}] units + } } else { bind Text { %W yview scroll [expr {- (%D / 120) * 4}] units diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 0a64e04..0d7992c 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -1552,7 +1552,7 @@ CFBundleExecutable Tk CFBundleGetInfoString - Tk Library 8.4, Copyright © 2003 Tcl Core Team. + Tk Library 8.4, Copyright © 2004 Tcl Core Team. MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright © 2001-2002, Apple Computer, Inc. CFBundleIconFile diff --git a/macosx/tkAboutDlg.r b/macosx/tkAboutDlg.r index aebdac7..29860ec 100644 --- a/macosx/tkAboutDlg.r +++ b/macosx/tkAboutDlg.r @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkAboutDlg.r,v 1.3.2.1 2003/05/13 02:42:57 das Exp $ + * RCS: @(#) $Id: tkAboutDlg.r,v 1.3.2.2 2004/02/17 07:17:18 das Exp $ */ /* @@ -48,7 +48,7 @@ resource 'DITL' (128, "About Box", purgeable) { {200, 147, 220, 217}, Button {enabled, "Ok"}, { 20, 108, 180, 344}, StaticText {disabled, "Tcl " TCL_PATCH_LEVEL " & Tk " TK_PATCH_LEVEL "\n\n" - "© 2003 Tcl Core Team." "\n\n" + "© 2004 Tcl Core Team." "\n\n" "Jim Ingham & Ian Reid" "\n" "© 2001-2002 Apple Computer, Inc." "\n\n" "Jim Ingham & Ray Johnson" "\n" diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 150519c..cab8a93 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -608,6 +608,7 @@ GenerateMouseWheelEvent(MouseEventData * medPtr) winPtr = ( TkWindow *)tkwin; xEvent.type = MouseWheelEvent; xEvent.xkey.keycode = medPtr->delta; + xEvent.xbutton.state = TkMacOSXButtonKeyState(); xEvent.xany.serial = LastKnownRequestProcessed(winPtr->display); xEvent.xany.send_event = false; xEvent.xany.display = winPtr->display; -- cgit v0.12 From aeab42b5655550a2e4e88327209f0e9983ec3ac4 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 17 Feb 2004 13:44:18 +0000 Subject: Minor doc fix --- doc/GetUid.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/GetUid.3 b/doc/GetUid.3 index b3b0be5..7582f72 100644 --- a/doc/GetUid.3 +++ b/doc/GetUid.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetUid.3,v 1.2 1998/09/14 18:22:51 stanton Exp $ +'\" RCS: @(#) $Id: GetUid.3,v 1.2.26.1 2004/02/17 13:44:18 dkf Exp $ '\" .so man.macros .TH Tk_GetUid 3 "" Tk "Tk Library Procedures" @@ -16,7 +16,7 @@ Tk_GetUid, Tk_Uid \- convert from string to unique identifier .nf \fB#include \fR .sp -\fB#typedef char *Tk_Uid\fR +\fBtypedef char *Tk_Uid\fR .sp Tk_Uid \fBTk_GetUid\fR(\fIstring\fR) -- cgit v0.12 From c49c4e020d5dc8fa1e8986a49ddd523d9530fb96 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 17 Feb 2004 13:47:18 +0000 Subject: Thought about the doc-fix a bit more and decided to remove the typedef line instead; you'd never type it to use a Tk_Uid, after all... --- doc/GetUid.3 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/GetUid.3 b/doc/GetUid.3 index 7582f72..f3bcefb 100644 --- a/doc/GetUid.3 +++ b/doc/GetUid.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetUid.3,v 1.2.26.1 2004/02/17 13:44:18 dkf Exp $ +'\" RCS: @(#) $Id: GetUid.3,v 1.2.26.2 2004/02/17 13:47:18 dkf Exp $ '\" .so man.macros .TH Tk_GetUid 3 "" Tk "Tk Library Procedures" @@ -16,8 +16,6 @@ Tk_GetUid, Tk_Uid \- convert from string to unique identifier .nf \fB#include \fR .sp -\fBtypedef char *Tk_Uid\fR -.sp Tk_Uid \fBTk_GetUid\fR(\fIstring\fR) .SH ARGUMENTS -- cgit v0.12 From c2e084899ebb336c2d7a02a59efa39ac42d78ba4 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Feb 2004 20:40:40 +0000 Subject: * tests/imgPhoto.test (imgPhoto-16.1): Corrected incorrect variable name [Bug 899010]. --- ChangeLog | 5 +++++ tests/imgPhoto.test | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc96a7a..61bfdd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-17 Don Porter + + * tests/imgPhoto.test (imgPhoto-16.1): Corrected incorrect + variable name [Bug 899010]. + 2004-02-17 Daniel Steffen * macosx/tkMacOSXMouseEvent.c: fixed modifiers for MouseWheel events. diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 72724d3..b568477 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -9,7 +9,7 @@ # # Author: Paul Mackerras (paulus@cs.anu.edu.au) # -# RCS: @(#) $Id: imgPhoto.test,v 1.15.2.1 2004/02/09 14:40:31 dkf Exp $ +# RCS: @(#) $Id: imgPhoto.test,v 1.15.2.2 2004/02/17 20:40:41 dgp Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -663,7 +663,7 @@ test imgPhoto-15.1 {photo images can fail to allocate memory gracefully} \ test imgPhoto-16.1 {copying to self doesn't access freed memory} { # Bug 877950 makes this crash when trying to copy out of a deallocated area - set photo [image create photo] + set i [image create photo] $i put red -to 0 0 1000 1000 $i copy $i -from 0 0 1000 1000 -to 500 0 image delete $i -- cgit v0.12 From 88a41b518bc46f423b68d2062d3efb1530ae1cda Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 18 Feb 2004 02:17:18 +0000 Subject: * generic/tkBind.c (HandleEventGenerate): only modify root[xy] with [xy] when they haven't been otherwise set. --- ChangeLog | 25 +++++++++++++++---------- generic/tkBind.c | 35 ++++++++++++++++++++++++----------- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61bfdd2..bbb5dcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-17 Jeff Hobbs + + * generic/tkBind.c (HandleEventGenerate): only modify root[xy] + with [xy] when they haven't been otherwise set. + 2004-02-17 Don Porter * tests/imgPhoto.test (imgPhoto-16.1): Corrected incorrect @@ -35,22 +40,22 @@ Backport Mac OS X specific fixes from TOT: - * macosx/tkMacOSXKeyboard.c: General cleanup. Add support for + * macosx/tkMacOSXKeyboard.c: General cleanup. Add support for [event generate]. [Bug #860454] - [Benjamin Riefenstahl] * macosx/tkMacOSXKeyboard.c: Add PowerBook keycode 0x34 as . [Benjamin Riefenstahl] - * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. + * macosx/tkMacOSXScrlbr.c: Reworking Vince's fix to [Bug 842952]. This version is clearer, and works helps keep the mouse better pinned to the scrollbar. I also removed the glitch where the scrollbar would jump get its middle over the mouse when you first moved it. - * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): - add unicode clipboard support. [Patch #840107] (senn) + * macosx/tkMacOSXClipboard.c (TkSuspendClipboard, TkSelGetSelection): + add unicode clipboard support. [Patch #840107] (senn) - * macosx/tkMacOSXDialog.c (NavServicesGetFile): Minor cleanups. - * (OpenFileFilterProc): Handle FSRef's as well as FSSpec's in the input + * macosx/tkMacOSXDialog.c (NavServicesGetFile): Minor cleanups. + * (OpenFileFilterProc): Handle FSRef's as well as FSSpec's in the input file. Also convert the FSSpec filename to an C-string before passing to MatchOneFile. [bug 517600] * (MatchOneFile): Require the input filename to be a C-string, not a @@ -59,8 +64,8 @@ * macosx/tkMacOSXDialog.c (MatchOneType): If the Macintosh filetype is 0, then automatically pass the fileType check. - * macosx/tkMacOSXButton.c (TkpDisplayButton): Use the tk text - drawing for checkbuttons & radiobuttons as well as for labels. + * macosx/tkMacOSXButton.c (TkpDisplayButton): Use the tk text + drawing for checkbuttons & radiobuttons as well as for labels. * macosx/tkMacOSXEvent.c (XSync): New function, need to implement this so drawing will get flushed in "update idletasks". * tkMacOSXPort.h: convert #define of XSync to function def'n. @@ -69,14 +74,14 @@ * macosx/tkMacOSXDialog.c: added native tk_messageBox command, (Tk_MessageBoxObjCmd) for MacOS X platform. [Vince Darley] - * macosx/tkMacOSXMenu.c: corrected encoding conversion for + * macosx/tkMacOSXMenu.c: corrected encoding conversion for torn-off menu entries (but many other display problems still exist with these) [Vince Darley] * macosx/tkMacOSXMouseEvent.c: improved handling of events in the presence of grabs, particularly activation events. [Vince Darley] - * macosx/tkMacOSXColor.c (GetControlPartColor): Use + * macosx/tkMacOSXColor.c (GetControlPartColor): Use the ThemeBrushes to get the control text color for buttons. diff --git a/generic/tkBind.c b/generic/tkBind.c index d77718a..13e6cea 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.28 2003/02/28 15:55:33 dkf Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.28.2.1 2004/02/18 02:17:18 hobbs Exp $ */ #include "tkPort.h" @@ -3406,6 +3406,11 @@ HandleEventGenerate(interp, mainWin, objc, objv) event.xcreatewindow.window = event.xany.window; } + if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) { + event.xkey.x_root = -1; + event.xkey.y_root = -1; + } + /* * Process the remaining arguments to fill in additional fields * of the event. @@ -3771,17 +3776,21 @@ HandleEventGenerate(interp, mainWin, objc, objv) break; } case EVENT_X: { - int rootX, rootY; - if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number) != TCL_OK) { return TCL_ERROR; } - Tk_GetRootCoords(tkwin, &rootX, &rootY); - rootX += number; if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) { event.xkey.x = number; - event.xkey.x_root = rootX; + /* + * Only modify rootx as well if it hasn't been changed. + */ + if (event.xkey.x_root == -1) { + int rootX, rootY; + + Tk_GetRootCoords(tkwin, &rootX, &rootY); + event.xkey.x_root = rootX + number; + } } else if (flags & EXPOSE) { event.xexpose.x = number; } else if (flags & (CREATE|CONFIG|GRAVITY)) { @@ -3794,17 +3803,21 @@ HandleEventGenerate(interp, mainWin, objc, objv) break; } case EVENT_Y: { - int rootX, rootY; - if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr, &number) != TCL_OK) { return TCL_ERROR; } - Tk_GetRootCoords(tkwin, &rootX, &rootY); - rootY += number; if (flags & (KEY_BUTTON_MOTION_VIRTUAL|CROSSING)) { event.xkey.y = number; - event.xkey.y_root = rootY; + /* + * Only modify rooty as well if it hasn't been changed. + */ + if (event.xkey.y_root == -1) { + int rootX, rootY; + + Tk_GetRootCoords(tkwin, &rootX, &rootY); + event.xkey.y_root = rootY + number; + } } else if (flags & EXPOSE) { event.xexpose.y = number; } else if (flags & (CREATE|CONFIG|GRAVITY)) { -- cgit v0.12 From 65aade6bfeead87badb9a2e0c40635bce209538e Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 18 Feb 2004 02:17:48 +0000 Subject: note 8.4.6 tag point --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index bbb5dcc..67ef7cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-02-17 Jeff Hobbs + *** 8.4.6 TAGGED FOR RELEASE *** + * generic/tkBind.c (HandleEventGenerate): only modify root[xy] with [xy] when they haven't been otherwise set. -- cgit v0.12 From c65b9b4c74b0c66f1c7988049adcaa1370c95f97 Mon Sep 17 00:00:00 2001 From: pspjuth Date: Wed, 18 Feb 2004 20:10:33 +0000 Subject: Fixed a bug in grid geometry calculations for a shrinking grid. [Bug 899246] --- ChangeLog | 6 ++++++ generic/tkGrid.c | 30 ++++++++++++++---------------- tests/grid.test | 28 ++++++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67ef7cc..8d4aa50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-18 Peter Spjuth + + * tests/grid.test: + * generic/tkGrid.c: Fixed a bug in grid geometry calculations for + a shrinking grid. [Bug 899246] + 2004-02-17 Jeff Hobbs *** 8.4.6 TAGGED FOR RELEASE *** diff --git a/generic/tkGrid.c b/generic/tkGrid.c index f5c3503..7624537 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.25 2002/10/10 21:07:51 pspjuth Exp $ + * RCS: @(#) $Id: tkGrid.c,v 1.25.2.1 2004/02/18 20:10:34 pspjuth Exp $ */ #include "tkInt.h" @@ -1271,7 +1271,7 @@ AdjustOffsets(size, slots, slotPtr) int diff; /* Extra pixels needed to add to the layout. */ int totalWeight = 0; /* Sum of the weights for all the slots. */ int weight = 0; /* Sum of the weights so far. */ - int minSize = 0; /* Minimum possible layout size. */ + int minSize; /* Minimum possible layout size. */ int newDiff; /* The most pixels that can be added on * the current pass. */ @@ -1290,7 +1290,7 @@ AdjustOffsets(size, slots, slotPtr) * there is extra space, else clip on the bottom/right. */ - for (slot=0; slot < slots; slot++) { + for (slot = 0; slot < slots; slot++) { totalWeight += slotPtr[slot].weight; } @@ -1304,7 +1304,8 @@ AdjustOffsets(size, slots, slotPtr) */ if (diff > 0) { - for (weight=slot=0; slot < slots; slot++) { + weight = 0; + for (slot = 0; slot < slots; slot++) { weight += slotPtr[slot].weight; slotPtr[slot].offset += diff * weight / totalWeight; } @@ -1314,16 +1315,19 @@ AdjustOffsets(size, slots, slotPtr) /* * The layout must shrink below its requested size. Compute the * minimum possible size by looking at the slot minSizes. + * Store each slot's minimum size in temp. */ - for (slot=0; slot < slots; slot++) { + minSize = 0; + for (slot = 0; slot < slots; slot++) { if (slotPtr[slot].weight > 0) { - minSize += slotPtr[slot].minSize; + slotPtr[slot].temp = slotPtr[slot].minSize; } else if (slot > 0) { - minSize += slotPtr[slot].offset - slotPtr[slot-1].offset; + slotPtr[slot].temp = slotPtr[slot].offset - slotPtr[slot-1].offset; } else { - minSize += slotPtr[slot].offset; + slotPtr[slot].temp = slotPtr[slot].offset; } + minSize += slotPtr[slot].temp; } /* @@ -1334,14 +1338,8 @@ AdjustOffsets(size, slots, slotPtr) if (size <= minSize) { int offset = 0; - for (slot=0; slot < slots; slot++) { - if (slotPtr[slot].weight > 0) { - offset += slotPtr[slot].minSize; - } else if (slot > 0) { - offset += slotPtr[slot].offset - slotPtr[slot-1].offset; - } else { - offset += slotPtr[slot].offset; - } + for (slot = 0; slot < slots; slot++) { + offset += slotPtr[slot].temp; slotPtr[slot].offset = offset; } return(0); diff --git a/tests/grid.test b/tests/grid.test index c47348e..50064e3 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: grid.test,v 1.17 2002/10/10 21:07:52 pspjuth Exp $ +# RCS: @(#) $Id: grid.test,v 1.17.2.1 2004/02/18 20:10:34 pspjuth Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -1305,7 +1305,7 @@ test grid-16.7 {layout weights (shrinking at minsize)} { lappend a [winfo width .$i]-[winfo height .$i]-[winfo ismapped .$i] } set a -} {100-75-1 1-1-0 200-150-1} +} {100-75-1 1-1-0 100-75-1} grid_reset 16.7 test grid-16.8 {layout internal constraints} { @@ -1426,6 +1426,30 @@ test grid-16.12 {layout uniform (grow)} { {0 0 70 95} {70 0 50 95} {120 0 140 95} {260 0 90 95}] grid_reset 16.12 +test grid-16.13 {layout weights (shrinking at minsize)} { + foreach i {0 1 2 3} { + frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge + grid .$i -row $i -column $i -sticky nswe + } + grid propagate . 0 + grid columnconfigure . {0 1} -weight 1 -minsize 0 + grid rowconfigure . {0 1} -weight 1 -minsize 0 + set a "" + . configure -width 250 -height 200 + update + foreach i {0 1 2 3} { + lappend a [winfo width .$i]-[winfo height .$i]-[winfo ismapped .$i] + } + . configure -width 150 -height 100 + update + foreach i {0 1 2 3} { + lappend a [winfo width .$i]-[winfo height .$i]-[winfo ismapped .$i] + } + set a +} {25-25-1 25-25-1 100-75-1 100-75-1 25-25-0 25-25-0 100-75-1 100-75-1} +grid_reset 16.13 + + test grid-17.1 {forget and pending idle handlers} { # This test is intended to detect a crash caused by a failure to remove # pending idle handlers when grid forget is invoked. -- cgit v0.12 From 04a799df2e2a5ca31b69c6ffcba3e6ce02c72f92 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 18 Feb 2004 20:56:44 +0000 Subject: move 8.4.6 tag to include grid fix --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d4aa50..c385820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,13 @@ 2004-02-18 Peter Spjuth + *** 8.4.6 TAGGED FOR RELEASE *** + * tests/grid.test: * generic/tkGrid.c: Fixed a bug in grid geometry calculations for a shrinking grid. [Bug 899246] 2004-02-17 Jeff Hobbs - *** 8.4.6 TAGGED FOR RELEASE *** - * generic/tkBind.c (HandleEventGenerate): only modify root[xy] with [xy] when they haven't been otherwise set. -- cgit v0.12 From a59407b198d089012618c53736563788d7a6f54c Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Feb 2004 19:51:24 +0000 Subject: update changes for 8.4.6 release --- changes | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/changes b/changes index 05974ac..10de75c 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.4 2003/11/19 16:28:17 dgp Exp $ +RCS: @(#) $Id: changes,v 1.64.2.5 2004/02/20 19:51:24 dgp Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5589,3 +5589,31 @@ with spaces in their names. 2003-11-17 (bug fix) Fix menubutton -compound state disabled drawing. --- Released 8.4.5, November 20, 2003 --- See ChangeLog for details --- + +2003-12-17 (platform support)[842952] Mac OS X: [scrollbar] + +2004-02-13 (platform support)[776646] Win: native hand2/fleur cursors + +2004-02-03 (enhancement) post menubuttons so they stay on screen. + +2004-02-09 (bug fix)[877950] stop crash during intra-image copy/resize + +2004-02-10 (enhancement) New msg catalogs for Esperanto and Polish (trzewik) + +2004-02-13 (platform support)[478568] Win: bold/italic font handling + +2004-02-15 (platform support)[860454] Mac OS X: [event generate] + +2004-02-15 (platform support)[840107] Mac OS X: Unicode clipboard (senn) + +2004-02-15 (platform support)[517600] Mac OS X: handle FSRef's + +2004-02-15 (platform support) Mac OS X: native [tk_messageBox] + +2004-02-15 (platform support) Mac OS X: PowerBook keycode 0x34 -> + +2004-02-18 (platform support) Mac OS MouseWheel event handling + +2004-02-18 (bug fix)[899246] fix shrinking grid geometry calculations + +--- Released 8.4.6, February 27, 2004 --- See ChangeLog for details --- -- cgit v0.12 From 27f215c03a679ec897bd96a5fa2daa40fb42b7db Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Feb 2004 19:54:34 +0000 Subject: date typos --- changes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/changes b/changes index 10de75c..dbf24df 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.5 2004/02/20 19:51:24 dgp Exp $ +RCS: @(#) $Id: changes,v 1.64.2.6 2004/02/20 19:54:34 dgp Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5479,7 +5479,7 @@ on Windows. (martin) of the event structure when that field is valid for that event type. (fellows) *** POTENTIAL INCOMPATIBILITY *** ---- Released 8.4.2, March 3, 2002 --- See ChangeLog for details --- +--- Released 8.4.2, March 3, 2003 --- See ChangeLog for details --- 2003-03-14 (bug fix)[701812] Stop buttons from being very wide when a tk_messageBox has a lot of content on Unix @@ -5502,7 +5502,7 @@ charset fonts. gb2312.enc was made to be euc-cn for Tcl because that is what is most often meant, but X really wants the original (-raw) gb2312 encoding. ---- Released 8.4.3, May 20, 2002 --- See ChangeLog for details --- +--- Released 8.4.3, May 20, 2003 --- See ChangeLog for details --- 2003-07-07 (bug fix)[749353] Improve deletion of images on exit. -- cgit v0.12 From 297090b448fe798845d0a7c7e9427e9ef7dbc8ca Mon Sep 17 00:00:00 2001 From: das Date: Mon, 23 Feb 2004 10:49:29 +0000 Subject: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXXStubs.c: * xlib/ximage.c: fixed MacOSX XGetImage/XPutImage and related functions to deal properly with XImages copied from screen. * generic/tkCanvPs.c (TkImageGetColor): MacOSX fix. * generic/tkImgPhoto.c (ImgPhotoDisplay): enabled alpha blending for images with partial transparency on MacOSX. [Bug 809157] --- ChangeLog | 13 +++++++- changes | 5 ++- generic/tkCanvPs.c | 14 +++++--- generic/tkImgPhoto.c | 8 ++--- macosx/tkMacOSXDraw.c | 22 +++++++++---- macosx/tkMacOSXXStubs.c | 86 ++++++++++++++++++++++++++++++++++++------------- xlib/ximage.c | 5 ++- 7 files changed, 113 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index c385820..abfbbe4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,18 @@ -2004-02-18 Peter Spjuth +2004-02-23 Daniel Steffen *** 8.4.6 TAGGED FOR RELEASE *** + * macosx/tkMacOSXDraw.c: + * macosx/tkMacOSXXStubs.c: + * xlib/ximage.c: fixed MacOSX XGetImage/XPutImage and related + functions to deal properly with XImages copied from screen. + * generic/tkCanvPs.c (TkImageGetColor): MacOSX fix. + * generic/tkImgPhoto.c (ImgPhotoDisplay): enabled alpha blending + for images with partial transparency on MacOSX. + [Bug 809157] + +2004-02-18 Peter Spjuth + * tests/grid.test: * generic/tkGrid.c: Fixed a bug in grid geometry calculations for a shrinking grid. [Bug 899246] diff --git a/changes b/changes index dbf24df..9e56a72 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.6 2004/02/20 19:54:34 dgp Exp $ +RCS: @(#) $Id: changes,v 1.64.2.7 2004/02/23 10:49:29 das Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5616,4 +5616,7 @@ with spaces in their names. 2004-02-18 (bug fix)[899246] fix shrinking grid geometry calculations +2003-02-23 (platform support)[809157] Mac OS X: Add alpha blending for +images with partial transparency. + --- Released 8.4.6, February 27, 2004 --- See ChangeLog for details --- diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index e987b5d..667291b 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvPs.c,v 1.13 2003/02/18 21:54:18 hobbs Exp $ + * RCS: @(#) $Id: tkCanvPs.c,v 1.13.2.1 2004/02/23 10:49:29 das Exp $ */ #include "tkInt.h" @@ -1137,7 +1137,13 @@ GetPostscriptPoints(interp, string, doublePtr) #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8)) #define GetBValue(rgb) ((BYTE)((rgb)>>16)) */ +#else +#define GetRValue(rgb) ((rgb & cdata->red_mask) >> cdata->red_shift) +#define GetGValue(rgb) ((rgb & cdata->green_mask) >> cdata->green_shift) +#define GetBValue(rgb) ((rgb & cdata->blue_mask) >> cdata->blue_shift) +#endif +#if defined(WIN32) || defined(MAC_OSX_TK) static void TkImageGetColor(cdata, pixel, red, green, blue) TkColormapData *cdata; /* Colormap data */ @@ -1156,9 +1162,9 @@ TkImageGetColor(cdata, pixel, red, green, blue) double *red, *green, *blue; /* Color data to return */ { if (cdata->separated) { - int r = (pixel & cdata->red_mask) >> cdata->red_shift; - int g = (pixel & cdata->green_mask) >> cdata->green_shift; - int b = (pixel & cdata->blue_mask) >> cdata->blue_shift; + int r = GetRValue(pixel); + int g = GetGValue(pixel); + int b = GetBValue(pixel); *red = cdata->colors[r].red / 65535.0; *green = cdata->colors[g].green / 65535.0; *blue = cdata->colors[b].blue / 65535.0; diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index d525660..edff9cf 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.4 2004/02/09 14:40:31 dkf Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.5 2004/02/23 10:49:30 das Exp $ */ #include "tkInt.h" @@ -2678,10 +2678,10 @@ ImgPhotoDisplay(clientData, display, drawable, imageX, imageY, width, } if ( -#if defined(MAC_TCL) || defined(MAC_OSX_TK) +#if defined(MAC_TCL) /* - * The retrieval of bgImg is currently not functional on OSX - * (and likely not OS9 either), so skip attempts to alpha blend. + * The retrieval of bgImg is currently not functional on OS9 + * so skip attempts to alpha blend. */ 0 && #endif diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 13d746c..c42e84a 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.1 2004/02/16 00:42:34 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.2 2004/02/23 10:49:29 das Exp $ */ #include "tkInt.h" @@ -347,13 +347,15 @@ TkPutImage( GDHandle saveDevice; GWorldPtr destPort; const BitMap * destBits; + MacDrawable *dstDraw = (MacDrawable *) d; int i, j; BitMap bitmap; char *newData = NULL; Rect destRect, srcRect; destPort = TkMacOSXGetDrawablePort(d); - SetRect(&destRect, dest_x, dest_y, dest_x + width, dest_y + height); + SetRect(&destRect, dstDraw->xOff + dest_x, dstDraw->yOff + dest_y, + dstDraw->xOff + dest_x + width, dstDraw->yOff + dest_y + height); SetRect(&srcRect, src_x, src_y, src_x + width, src_y + height); display->request++; @@ -362,7 +364,13 @@ TkPutImage( TkMacOSXSetUpClippingRgn(d); - if (image->depth == 1) { + if (image->obdata) { + /* Image from XGetImage, copy from containing GWorld directly */ + GWorldPtr srcPort = TkMacOSXGetDrawablePort((Drawable)image->obdata); + CopyBits(GetPortBitMapForCopyBits(srcPort), + GetPortBitMapForCopyBits (destPort), + &srcRect, &destRect, srcCopy, NULL); + } else if (image->depth == 1) { /* * This code assumes a pixel depth of 1 @@ -400,15 +408,15 @@ TkPutImage( &srcRect, &destRect, srcCopy, NULL); } else { - /* Color image */ - PixMap pixmap; + /* Color image */ + PixMap pixmap; pixmap.bounds.left = 0; pixmap.bounds.top = 0; pixmap.bounds.right = (short) image->width; pixmap.bounds.bottom = (short) image->height; pixmap.pixelType = RGBDirect; - pixmap.pmVersion = 4; /* 32bit clean */ + pixmap.pmVersion = baseAddr32; /* 32bit clean */ pixmap.packType = 0; pixmap.packSize = 0; pixmap.hRes = 0x00480000; @@ -416,7 +424,7 @@ TkPutImage( pixmap.pixelSize = 32; pixmap.cmpCount = 3; pixmap.cmpSize = 8; - pixmap.pixelFormat = 0; + pixmap.pixelFormat = k32ARGBPixelFormat; pixmap.pmTable = NULL; pixmap.pmExt = 0; pixmap.baseAddr = image->data; diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index ed635c0..3260d08 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.1 2003/03/18 13:55:51 das Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.2 2004/02/23 10:49:29 das Exp $ */ #include "tkInt.h" @@ -142,7 +142,7 @@ TkpOpenDisplay( screen->root_visual->green_mask = 0x0000FF00; screen->root_visual->blue_mask = 0x000000FF; screen->root_visual->bits_per_rgb = 24; - screen->root_visual->map_entries = 2 ^ 8; + screen->root_visual->map_entries = 256; gMacDisplay = (TkDisplay *) ckalloc(sizeof(TkDisplay)); @@ -328,19 +328,45 @@ XGetImage(display, d, x, y, width, height, plane_mask, format) unsigned long plane_mask; int format; { - XImage * imagePtr; - Visual * visual = NULL; - int depth = 0; - int offset = 0; - char * data = NULL; - int bitmap_pad = 0; - int bytes_per_line = 0; - CGrafPtr grafPtr; - - imagePtr = XCreateImage(display,visual,depth,format, offset, data, - width, height, bitmap_pad, bytes_per_line ); - grafPtr = TkMacOSXGetDrawablePort(d); - imagePtr->data = (char *) grafPtr; + XImage * imagePtr = NULL; + Pixmap pixmap = NULL; + Tk_Window win = (Tk_Window) ((MacDrawable *) d)->winPtr; + GC gc; + int depth = 32; + int offset = 0; + int bitmap_pad = 32; + int bytes_per_line = 0; + + if (TkMacOSXGetDrawablePort(d)) { + if (format == ZPixmap) { + if (width > 0 && height > 0) { + /* Tk_GetPixmap fails for zero width or height */ + pixmap = Tk_GetPixmap(display, d, width, height, depth); + } + if (win) { + XGCValues values; + gc = Tk_GetGC(win, 0, &values); + } else { + gc = XCreateGC(display, pixmap, 0, NULL); + } + if (pixmap) { + XCopyArea(display, d, pixmap, gc, x, y, width, height, 0, 0); + } + imagePtr = XCreateImage(display, NULL, depth, format, offset, + (char*)TkMacOSXGetDrawablePort(pixmap), + width, height, bitmap_pad, bytes_per_line); + /* Track Pixmap underlying the XImage in the unused obdata field * + * so that we can treat XImages coming from XGetImage specially. */ + imagePtr->obdata = (XPointer) pixmap; + if (!win) { + XFreeGC(display, gc); + } + } else { + TkpDisplayWarning( + "XGetImage: only ZPixmap types are implemented", + "XGetImage Failure"); + } + } return imagePtr; } @@ -459,6 +485,7 @@ XCreateImage( ximage->green_mask = 0x0000FF00; ximage->blue_mask = 0x000000FF; + ximage->obdata = NULL; ximage->f.destroy_image = TkMacOSXXDestroyImage; ximage->f.get_pixel = TkMacOSXXGetPixel; ximage->f.put_pixel = TkMacOSXXPutPixel; @@ -667,7 +694,8 @@ int TkMacOSXXDestroyImage( XImage *image) { - Debugger(); + if (image->obdata) + Tk_FreePixmap((Display*)gMacDisplay,(Pixmap)image->obdata); return 0; } @@ -683,9 +711,16 @@ TkMacOSXXGetPixel( grafPtr = (CGrafPtr)image->data; SetPort(grafPtr); GetCPixel(x,y,&cPix); - r = cPix . red; - g = cPix . green; - b = cPix . blue; + if (image->obdata) { + /* Image from XGetImage, 16 bit color values */ + r = (cPix . red) >> 8; + g = (cPix . green) >> 8; + b = (cPix . blue) >> 8; + } else { + r = cPix . red; + g = cPix . green; + b = cPix . blue; + } c = (r<<16)|(g<<8)|(b); return c; } @@ -705,9 +740,16 @@ TkMacOSXXPutPixel( r = (pixel & image->red_mask)>>16; g = (pixel & image->green_mask)>>8; b = (pixel & image->blue_mask); - cPix . red = r; - cPix . green = g; - cPix . blue = b; + if (image->obdata) { + /* Image from XGetImage, 16 bit color values */ + cPix . red = r << 8; + cPix . green = g << 8; + cPix . blue = b << 8; + } else { + cPix . red = r; + cPix . green = g; + cPix . blue = b; + } SetCPixel(x,y,&cPix); return 0; } diff --git a/xlib/ximage.c b/xlib/ximage.c index d2214ba..8519597 100644 --- a/xlib/ximage.c +++ b/xlib/ximage.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: ximage.c,v 1.4 2000/07/06 03:17:45 mo Exp $ + * RCS: @(#) $Id: ximage.c,v 1.4.8.1 2004/02/23 10:49:29 das Exp $ */ #include "tkInt.h" @@ -64,6 +64,9 @@ XCreateBitmapFromData(display, d, data, width, height) ximage.bitmap_bit_order = LSBFirst; ximage.bitmap_pad = 8; ximage.bytes_per_line = (width+7)/8; +#ifdef MAC_OSX_TK + ximage.obdata = NULL; +#endif TkPutImage(NULL, 0, display, pix, gc, &ximage, 0, 0, 0, 0, width, height); XFreeGC(display, gc); -- cgit v0.12 From d3b3f301b12582829c0e8153d5436972c8e02885 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 23 Feb 2004 14:18:48 +0000 Subject: typo --- changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changes b/changes index 9e56a72..df63c7d 100644 --- a/changes +++ b/changes @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.64.2.7 2004/02/23 10:49:29 das Exp $ +RCS: @(#) $Id: changes,v 1.64.2.8 2004/02/23 14:18:48 dgp Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -5616,7 +5616,7 @@ with spaces in their names. 2004-02-18 (bug fix)[899246] fix shrinking grid geometry calculations -2003-02-23 (platform support)[809157] Mac OS X: Add alpha blending for +2004-02-23 (platform support)[809157] Mac OS X: Add alpha blending for images with partial transparency. --- Released 8.4.6, February 27, 2004 --- See ChangeLog for details --- -- cgit v0.12 From f349b2208bae08f3b60426e6ccc2fcf6afdd6ef8 Mon Sep 17 00:00:00 2001 From: cc_benny Date: Wed, 25 Feb 2004 13:29:41 +0000 Subject: * (TkpInitKeymapInfo): Don't make and synonyms for and