diff options
author | dgp <dgp@users.sourceforge.net> | 2007-09-04 17:44:17 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-09-04 17:44:17 (GMT) |
commit | a3b2834c032a7e55a6dd1b34fd638181beed9b2c (patch) | |
tree | 5bd58453f1a1a0062ad262715ba4348281a34d3d | |
parent | f70e069a3d1438b22c18181269cc03d448032bd5 (diff) | |
download | tk-a3b2834c032a7e55a6dd1b34fd638181beed9b2c.zip tk-a3b2834c032a7e55a6dd1b34fd638181beed9b2c.tar.gz tk-a3b2834c032a7e55a6dd1b34fd638181beed9b2c.tar.bz2 |
merge updates from HEAD
-rw-r--r-- | ChangeLog | 436 | ||||
-rw-r--r-- | doc/button.n | 20 | ||||
-rw-r--r-- | doc/checkbutton.n | 15 | ||||
-rw-r--r-- | doc/console.n | 8 | ||||
-rw-r--r-- | doc/tk.n | 5 | ||||
-rw-r--r-- | doc/ttk_combobox.n | 4 | ||||
-rw-r--r-- | generic/ttk/ttkDecls.h | 4 | ||||
-rw-r--r-- | generic/ttk/ttkInit.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXDialog.c | 63 | ||||
-rw-r--r-- | macosx/tkMacOSXInt.h | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 11 | ||||
-rw-r--r-- | tests/all.tcl | 10 | ||||
-rw-r--r-- | tests/entry.test | 4 | ||||
-rw-r--r-- | tests/winMsgbox.test | 299 | ||||
-rw-r--r-- | unix/Makefile.in | 29 | ||||
-rwxr-xr-x | unix/configure | 8 | ||||
-rw-r--r-- | unix/configure.in | 7 | ||||
-rw-r--r-- | win/rules.vc | 23 | ||||
-rw-r--r-- | win/tkWinDialog.c | 49 | ||||
-rw-r--r-- | win/tkWinTest.c | 137 |
20 files changed, 824 insertions, 316 deletions
@@ -1,3 +1,53 @@ +2007-09-03 Daniel Steffen <das@users.sourceforge.net> + + * generic/ttk/ttkInit.c (Ttk_Init): register ttk in package database + to enable extension access to the ttkStubs table. + + * generic/ttk/ttkDecls.h: correct capitalization of ttk package name. + +2007-08-28 Donal K. Fellows <donal.k.fellows@manchester.ac.uk> + + Assorted documentation improvements. + * doc/button.n: Added examples. + * doc/checkbutton.n: Added example. + * doc/console.n: Standardized section ordering. + * doc/tk.n: Added "See also". + * doc/ttk_combobox.n: Added keywords. + +2007-08-27 Daniel Steffen <das@users.sourceforge.net> + + * macosx/tkMacOSXDialog.c (Tk_ChooseColorObjCmd): correct setting of + interp result [Bug 1782105]; fix -initialcolor overwriting last color + selection; style cleanup. + +2007-08-21 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/rules.vc: Synchronize with tcl rules.vc + * tests/all.tcl: Fix the line-endings. + +2007-08-07 Daniel Steffen <das@users.sourceforge.net> + + * unix/Makefile.in: Add support for compile flags specific to + object files linked directly into executables. + + * unix/configure.in (Darwin): Only use -seg1addr flag when prebinding; + use -mdynamic-no-pic flag for object files linked directly into exes. + + * unix/configure: autoconf-2.59 + +2007-08-01 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/tkWinDialog.c: Fix [Bug 1692927] (buffer length problems) + * win/tkWinTest.c: Added 'testfindwindow' and 'testgetwindowinfo' + and extended 'testwinevent' for WM_COMMAND support to enable testing + native messagebox dialogs. + * tests/winMsgbox.test: New Windows native messagebox tests. + +2007-07-25 Daniel Steffen <das@users.sourceforge.net> + + * macosx/tkMacOSXDialog.c (NavServicesGetFile): Reset interp result on + nav dialog cancel. [Bug 1743786] + 2007-07-09 Jeff Hobbs <jeffh@ActiveState.com> * unix/Makefile.in: clarify what the headers installed are, and @@ -5,72 +55,72 @@ 2007-07-09 Daniel Steffen <das@users.sourceforge.net> - * macosx/tkMacOSXWindowEvent.c (Tk_MacOSXIsAppInFront): use process mgr + * macosx/tkMacOSXWindowEvent.c (Tk_MacOSXIsAppInFront): Use process mgr * macosx/tkMacOSXMouseEvent.c: to determine if app is in front instead of relying on activate/deactivate events (which may arrive after this info is needed, e.g. during window drag/click activation); replace other process mgr use to get this info with calls to Tk_MacOSXIsAppInFront(). - * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): correct + * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): Correct window click activation, titlebar click handling and background window dragging/growing in the presence of grabs or window-/app-modal windows; fix window click activation bringing all other app windows to front. - * macosx/tkMacOSXDraw.c (TkPutImage): handle non-native XImage byte and + * macosx/tkMacOSXDraw.c (TkPutImage): Handle non-native XImage byte and bit orders; reverse bits via xBitReverseTable instead of InvertByte(). 2007-07-06 Joe English <jenglish@users.sourceforge.net> - * library/ttk/aquaTheme.tcl: Set -anchor w for TMenubuttons - [Bug 1614540]. + * library/ttk/aquaTheme.tcl: Set -anchor w for TMenubuttons. + [Bug 1614540] -2007-07-04 Andreas Kupries <andreask@activestate.com> +2007-07-04 Andreas Kupries <andreask@activestate.com> - * macosx/tkMacOSXXStubs.c (DestroyImage): Fixed seg.fault in - release of image data for images coming from XGetImage. Change - committed by me for Daniel Steffen. See 2007-06-23 for the - change which introduced the problem. + * macosx/tkMacOSXXStubs.c (DestroyImage): Fixed seg.fault in release + of image data for images coming from XGetImage. Change committed by me + for Daniel Steffen. See 2007-06-23 for the change which introduced the + problem. 2007-07-02 Daniel Steffen <das@users.sourceforge.net> - * xlib/xgc.c (XCreateGC): correct black and white pixel values used to + * xlib/xgc.c (XCreateGC): Correct black and white pixel values used to initialize GC foregrund and background fields. - * macosx/tkMacOSXColor.c: add debug messages for unknown pixel values. + * macosx/tkMacOSXColor.c: Add debug messages for unknown pixel values. - * macosx/tkMacOSXDraw.c (TkMacOSXRestoreDrawingContext): don't restore + * macosx/tkMacOSXDraw.c (TkMacOSXRestoreDrawingContext): Don't restore port state if it wasn't altered by TkMacOSXSetupDrawingContext(). 2007-06-29 Daniel Steffen <das@users.sourceforge.net> - * xlib/ximage.c: bitmaps created from the static .xbm + * xlib/ximage.c: Bitmaps created from the static .xbm arrays always have LSBFirst bit order. - * unix/configure.in: fix flag used to weak-link libXss. + * unix/configure.in: Fix flag used to weak-link libXss. * unix/configure: autoconf-2.59 - * macosx/tkMacOSXScrlbr.c: correct int <-> dobule conversion issues + * macosx/tkMacOSXScrlbr.c: Correct int <-> dobule conversion issues that could lead to Carbon getting confused about scrollbar thumb size. - * macosx/tkMacOSXDraw.c (XCopyArea, XCopyPlane, TkPutImage) use + * macosx/tkMacOSXDraw.c (XCopyArea, XCopyPlane, TkPutImage): Use TkMacOSX{Setup,Restore}DrawingContext() to setup/restore clip & colors. - (TkMacOSXSetupDrawingContext, TkMacOSXRestoreDrawingContext): add save + (TkMacOSXSetupDrawingContext, TkMacOSXRestoreDrawingContext): Add save and restore of QD port clip region; factor out clip region code common to CG and QD branches; check for port and context validity; handle tkPictureIsOpen flag during QD port setup. - (TkScrollWindow): remove unnecessary scroll region manipulation + (TkScrollWindow): Remove unnecessary scroll region manipulation - * macosx/tkMacOSXDraw.c: remove second global QD temp region + * macosx/tkMacOSXDraw.c: Remove second global QD temp region * macosx/tkMacOSXInt.h: (no longer necessary) and rename * macosx/tkMacOSXRegion.c: remaining global QD temp region. * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: - * macosx/tkMacOSXDraw.c: make useCGDrawing variable MODULE_SCOPE + * macosx/tkMacOSXDraw.c: Make useCGDrawing variable MODULE_SCOPE * macosx/tkMacOSXFont.c: and respect it for ATSUI font drawing. - * macosx/tkMacOSXButton.c: reduce reliance on current QD port + * macosx/tkMacOSXButton.c: Reduce reliance on current QD port * macosx/tkMacOSXColor.c: setting and remove unnecessary * macosx/tkMacOSXDebug.c: references to a drawable's QD port, * macosx/tkMacOSXDebug.h: notably replace GetWindowFromPort( @@ -86,7 +136,7 @@ * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: - * macosx/tkMacOSXInt.h: factor out macros, declarations + * macosx/tkMacOSXInt.h: Factor out macros, declarations * macosx/tkMacOSXPrivate.h (new): and prototypes that are purely internal and private to the 'macosx' sources into a new internal header file that does _not_ get installed into Tk.framework/PrivateHeaders. @@ -119,57 +169,57 @@ * macosx/tkMacOSXXStubs.c: * macosx/ttkMacOSXTheme.c: - * macosx/Wish.xcodeproj/project.pbxproj: improve support for renamed + * macosx/Wish.xcodeproj/project.pbxproj: Improve support for renamed * macosx/Wish.xcodeproj/default.pbxuser: tcl and tk source dirs; add * macosx/Wish-Common.xcconfig: 10.5 SDK build config; remove tclMathOp.c. - * macosx/README: document Wish.xcodeproj changes. + * macosx/README: Document Wish.xcodeproj changes. 2007-06-23 Daniel Steffen <das@users.sourceforge.net> * generic/tkImgPhoto.c (ImgPhotoConfigureInstance, DisposeInstance): - use XDestroyImage instead of XFree to destroy XImage; replace runtime + Use XDestroyImage instead of XFree to destroy XImage; replace runtime endianness determination by compile-time check for WORDS_BIGENDIAN. - * xlib/ximage.c (XCreateBitmapFromData): use XCreateImage and + * xlib/ximage.c (XCreateBitmapFromData): Use XCreateImage and XDestroyImage instead of creating XImage structure manually. - * macosx/tkMacOSXXStubs.c (XCreateImage, DestroyImage): correct XImage + * macosx/tkMacOSXXStubs.c (XCreateImage, DestroyImage): Correct XImage bytes_per_line/bitmap_pad calculations and endianness setting; free image data and XImage structure at destruction; formatting cleanup. - * macosx/tkMacOSXDialog.c (NavServicesGetFile): disable app-modal + * macosx/tkMacOSXDialog.c (NavServicesGetFile): Disable app-modal sheet variant of nav dialog on OS versions where it causes problems. 2007-06-20 Jeff Hobbs <jeffh@ActiveState.com> - * library/ttk/ttk.tcl: should require Tk before pseudo-providing + * library/ttk/ttk.tcl: Should require Tk before pseudo-providing tile 0.8.0. 2007-06-09 Joe English <jenglish@users.sourceforge.net> * generic/ttk/ttkPanedwindow.c, doc/ttk_panedwindow.n, - tests/ttk/panedwindow.test: Added -width and -height options. - Added 'panes' method, return list of managed windows. - 'sashpos' method is now documented as part of the public - interface, and details clarified. Should be easier - to set initial sash positions now. Alleviates [Bug 1659067]. + * tests/ttk/panedwindow.test: Added -width and -height options. Added + 'panes' method, return list of managed windows. 'sashpos' method is + now documented as part of the public interface, and details clarified. + Should be easier to set initial sash positions now. Alleviates [Bug + 1659067]. 2007-06-09 Jeff Hobbs <jeffh@ActiveState.com> * win/tkWinWm.c (WmIconphotoCmd): fix wm iconphoto RGBA issues. [Bug 1467997] (janssen) - * win/tkWinMenu.c (TkWinHandleMenuEvent): improve handling to - allow for unicode char menu indices and not use CharUpper on Tcl - utf strings. [Bug 1734223] + * win/tkWinMenu.c (TkWinHandleMenuEvent): Improve handling to allow + for unicode char menu indices and not use CharUpper on Tcl utf + strings. [Bug 1734223] 2007-06-09 Joe English <jenglish@users.sourceforge.net> - * generic/ttk/ttkManager.h, generic/ttk/ttkManager.c, - generic/ttk/ttkNotebook.c, generic/ttk/ttkPanedwindow.c, - generic/ttk/ttkFrame.c: Ttk_Manager API overhaul: + * generic/ttk/ttkManager.h, generic/ttk/ttkManager.c, + * generic/ttk/ttkNotebook.c, generic/ttk/ttkPanedwindow.c, + * generic/ttk/ttkFrame.c: Ttk_Manager API overhaul: + Ttk_Manager no longer responsible for managing slave records + Ttk_Manager structure now opaque + Ttk_Slave structure now private @@ -177,17 +227,17 @@ * generic/ttk/ttkFrame.c: Simplified -labelwidget management. - * doc/ttk_panedwindow.n, library/ttk/panedwindow.tcl: - Changed documentation of ttk::panedwindow 'identify' command - to match implementation. + * doc/ttk_panedwindow.n, library/ttk/panedwindow.tcl: Changed + documentation of ttk::panedwindow 'identify' command to match + implementation. * generic/ttk/ttkNotebook.c, tests/ttk/notebook.test: - BUGFIX: ttk::noteboook 'insert' command didn't correctly - maintain current tab. + BUGFIX: ttk::noteboook 'insert' command didn't correctly maintain + current tab. 2007-06-09 Daniel Steffen <das@users.sourceforge.net> - * macosx/tkMacOSXColor.c: fix issues with TK_{IF,ELSE,ENDIF} macros; + * macosx/tkMacOSXColor.c: Fix issues with TK_{IF,ELSE,ENDIF} macros; * macosx/tkMacOSXDraw.c: implement Jaguar equivalent of unavailable * macosx/tkMacOSXEntry.c: kHIToolboxVersion global; panic at startup * macosx/tkMacOSXEvent.c: if MAC_OS_X_VERSION_MIN_REQUIRED constraint @@ -196,36 +246,36 @@ * macosx/tkMacOSXWm.c: * macosx/tkMacOSXDraw.c (XCopyArea, XCopyPlane, TkPutImage) - (TkMacOSXSetupDrawingContext): factor out common code and standardize + (TkMacOSXSetupDrawingContext): Factor out common code and standardize setup/restore of port, context and clipping; formatting cleanup. - * macosx/tkMacOSXWindowEvent.c: add error checking. - * macosx/tkMacOSXMenu.c: fix gcc3 warning. - * macosx/tkMacOSXScrlbr.c: fix testsuite crash. - * macosx/tkMacOSXSubwindows.c: formatting cleanup. - * macosx/tkMacOSXRegion.c: fix typos. + * macosx/tkMacOSXWindowEvent.c: Add error checking. + * macosx/tkMacOSXMenu.c: Fix gcc3 warning. + * macosx/tkMacOSXScrlbr.c: Fix testsuite crash. + * macosx/tkMacOSXSubwindows.c: Formatting cleanup. + * macosx/tkMacOSXRegion.c: Fix typos. * macosx/tkMacOSXScale.c: - * macosx/tkMacOSXXStubs.c (Tk_GetUserInactiveTime): remove superfluous + * macosx/tkMacOSXXStubs.c (Tk_GetUserInactiveTime): Remove superfluous CFRetain/CFRelease. - * macosx/Wish-Release.xcconfig: disable tktest release build stripping. + * macosx/Wish-Release.xcconfig: Disable tktest release build stripping. - * macosx/Wish.xcodeproj/project.pbxproj: add new Tclsh-Info.plist.in. + * macosx/Wish.xcodeproj/project.pbxproj: Add new Tclsh-Info.plist.in. 2007-06-06 Daniel Steffen <das@users.sourceforge.net> - * macosx/tkMacOSXInt.h: use native debug message API when available. + * macosx/tkMacOSXInt.h: Use native debug message API when available. * macosx/Wish-Debug.xcconfig: - * macosx/tkMacOSXMouseEvent.c (GenerateMouseWheelEvent): enable + * macosx/tkMacOSXMouseEvent.c (GenerateMouseWheelEvent): Enable processing of mousewheel events in background windows. - * macosx/tkMacOSXScrlbr.c: modernize checks for active/front window. + * macosx/tkMacOSXScrlbr.c: Modernize checks for active/front window. * macosx/tkMacOSXScale.c: * macosx/tkMacOSXWm.c: - * macosx/tkMacOSXColor.c: factor out verbose #ifdef checks of + * macosx/tkMacOSXColor.c: Factor out verbose #ifdef checks of * macosx/tkMacOSXDraw.c: MAC_OS_X_VERSION_{MAX_ALLOWED,MIN_REQUIRED} * macosx/tkMacOSXEntry.c: and runtime checks of kHIToolboxVersion into * macosx/tkMacOSXEvent.c: new TK_{IF,ELSE,ENDIF}_MAC_OS_X macros. @@ -233,15 +283,15 @@ * macosx/tkMacOSXInt.h: * macosx/tkMacOSXWm.c: - * macosx/tkMacOSXDraw.c: factor out clip clearing in QD ports; - * macosx/tkMacOSXEntry.c: formatting cleanup. + * macosx/tkMacOSXDraw.c: Factor out clip clearing in QD ports; + * macosx/tkMacOSXEntry.c: Formatting cleanup. - * macosx/Wish.xcodeproj/project.pbxproj: add settings for Fix&Continue. + * macosx/Wish.xcodeproj/project.pbxproj: Add settings for Fix&Continue. - * unix/configure.in (Darwin): link the Tk and Wish plists into their - binaries in all cases; fix 64bit arch removal in fat 32&64bit builds. + * unix/configure.in (Darwin): Link the Tk and Wish plists into their + binaries in all cases; fix 64bit arch removal in fat 32&64bit builds. - * unix/tcl.m4 (Darwin): fix CF checks in fat 32&64bit builds. + * unix/tcl.m4 (Darwin): Fix CF checks in fat 32&64bit builds. * unix/configure: autoconf-2.59 2007-06-05 Donal K. Fellows <donal.k.fellows@man.ac.uk> @@ -251,13 +301,13 @@ 2007-06-03 Daniel Steffen <das@users.sourceforge.net> - * unix/Makefile.in: add datarootdir to silence autoconf-2.6x warning. + * unix/Makefile.in: Add datarootdir to silence autoconf-2.6x warning. - * macosx/Wish.xcodeproj/default.pbxuser: add ttk tests. + * macosx/Wish.xcodeproj/default.pbxuser: Add ttk tests. - * macosx/tkMacOSXMenu.c: add error checking; whitespace cleanup. + * macosx/tkMacOSXMenu.c: Add error checking; whitespace cleanup. - * macosx/tkMacOSXDraw.c: comment formatting fixes for Xcode 3.0 + * macosx/tkMacOSXDraw.c: Comment formatting fixes for Xcode 3.0 * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXFont.c: @@ -273,36 +323,36 @@ 2007-06-02 Daniel Steffen <das@users.sourceforge.net> - * macosx/tkMacOSXMenu.c (TkpPostMenu): ensure cascade menus display in + * macosx/tkMacOSXMenu.c (TkpPostMenu): Ensure cascade menus display in posted menus that are not part of the menubar or attached to a menubutton (fixes bug reported on tcl-mac by Linus Nyberg). 2007-05-31 Daniel Steffen <das@users.sourceforge.net> - * macosx/tkMacOSXWindowEvent.c (GenerateUpdateEvent): complete all + * macosx/tkMacOSXWindowEvent.c (GenerateUpdateEvent): Complete all pending idle-time redraws before newly posted Expose events are processed; add bounds of redrawn windows to update region to ensure all child windows overdrawn by parents are redrawn. - * macosx/tkMacOSXWindowEvent.c: centralize clip and window invalidation + * macosx/tkMacOSXWindowEvent.c: Centralize clip and window invalidation * macosx/tkMacOSXSubwindows.c: after location/size changes in the * macosx/tkMacOSXWm.c: BoundsChanged carbon event handler; correct/add window invalidation after window attribute changes. * macosx/tkMacOSXSubwindows.c (XResizeWindow, XMoveResizeWindow) - (XMoveWindow): factor out common code dealing with embedded and + (XMoveWindow): Factor out common code dealing with embedded and non-toplevel windows; remove unnecessary clip and window invalidation. - * macosx/tkMacOSXButton.c (TkpDisplayButton): move clip setup closer + * macosx/tkMacOSXButton.c (TkpDisplayButton): Move clip setup closer to native button drawing calls. * macosx/tkMacOSXWm.c (TkMacOSXIsWindowZoomed, TkMacOSXZoomToplevel): - correct handling of gridded windows in max size calculations. + Correct handling of gridded windows in max size calculations. - * macosx/tkMacOSXEvent.c (TkMacOSXFlushWindows): use HIWindowFlush API + * macosx/tkMacOSXEvent.c (TkMacOSXFlushWindows): Use HIWindowFlush API when available. - * macosx/tkMacOSXColor.c: cleanup whitespace and formatting. + * macosx/tkMacOSXColor.c: Cleanup whitespace and formatting. * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: @@ -316,23 +366,23 @@ 2007-05-30 Daniel Steffen <das@users.sourceforge.net> - * library/bgerror.tcl: standardize dialog option & button size + * library/bgerror.tcl: Standardize dialog option & button size * library/dialog.tcl: modifications done when running on on Aqua. * library/msgbox.tcl: - * library/demos/button.tcl: set button highlightbackground on Aqua. + * library/demos/button.tcl: Set button highlightbackground on Aqua. - * macosx/tkMacOSXMenu.c (DrawMenuSeparator): use DrawingContext API. + * macosx/tkMacOSXMenu.c (DrawMenuSeparator): Use DrawingContext API. - * macosx/tkMacOSXWindowEvent.c (ClearPort): clip to updateRgn. + * macosx/tkMacOSXWindowEvent.c (ClearPort): Clip to updateRgn. - * macosx/tkMacOSXDebug.c: factor out debug region flashing. + * macosx/tkMacOSXDebug.c: Factor out debug region flashing. * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: - * macosx/tkMacOSXEvent.c: cleanup whitespace and formatting. + * macosx/tkMacOSXEvent.c: Cleanup whitespace and formatting. * macosx/tkMacOSXFont.c: * macosx/tkMacOSXRegion.c: * macosx/tkMacOSXSubwindows.c: @@ -341,7 +391,7 @@ * macosx/tkMacOSXXStubs.c: * xlib/xgc.c: - * macosx/Wish.xcodeproj/project.pbxproj: delete references to removed + * macosx/Wish.xcodeproj/project.pbxproj: Delete references to removed * macosx/Wish.xcodeproj/default.pbxuser: ttk files. 2007-05-28 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> @@ -402,10 +452,10 @@ 2007-05-17 Daniel Steffen <das@users.sourceforge.net> - * generic/tk.decls: workaround 'make checkstubs' failures from + * generic/tk.decls: Workaround 'make checkstubs' failures from tkStubLib.c MODULE_SCOPE revert. [Bug 1716117] - * macosx/Wish.xcodeproj/project.pbxproj: add tkOldTest.c and remove + * macosx/Wish.xcodeproj/project.pbxproj: Add tkOldTest.c and remove tkStubImg.c. 2007-05-16 Joe English <jenglish@users.sourceforge.net> @@ -496,35 +546,35 @@ * generic/tkFileFilter.c (AddClause): OSType endianness fixes. - * library/palette.tcl (tk::RecolorTree): handle color options with + * library/palette.tcl (tk::RecolorTree): Handle color options with empty value, fixes error due to emtpy -selectforeground (reported on tcl-mac by Russel E. Owen). - * macosx/tkMacOSXWindowEvent.c: ensure window is brought to the front + * macosx/tkMacOSXWindowEvent.c: Ensure window is brought to the front * macosx/tkMacOSXMouseEvent.c: at the start of a window drag (except * macosx/tkMacOSXInt.h: when cmd key is down); formatting and whitespace fixes. - * macosx/tkMacOSXDialog.c (Tk_GetSaveFileObjCmd): add -filetypes option + * macosx/tkMacOSXDialog.c (Tk_GetSaveFileObjCmd): Add -filetypes option processing (fixes fileDialog-0.1, fileDialog-0.2 failures). - * macosx/tkMacOSXEmbed.c (TkpMakeWindow, TkpUseWindow): fix sending of + * macosx/tkMacOSXEmbed.c (TkpMakeWindow, TkpUseWindow): Fix sending of Visibility event for embedded windows (fixes frame-3.9 hang). - * macosx/tkMacOSXScrlbr.c (ScrollbarBindProc): fix testsuite + * macosx/tkMacOSXScrlbr.c (ScrollbarBindProc): Fix testsuite * macosx/tkMacOSXSubwindows.c (TkMacOSXUpdateClipRgn): crashes by adding sanity checks. - * macosx/Wish.xcodeproj/project.pbxproj: add 'DebugUnthreaded' & + * macosx/Wish.xcodeproj/project.pbxproj: Add 'DebugUnthreaded' & * macosx/Wish.xcodeproj/default.pbxuser: 'DebugLeaks' targets and env var settings needed to run the 'leaks' tool. - * macosx/tkMacOSXButton.c: fix debug msg typo. + * macosx/tkMacOSXButton.c: Fix debug msg typo. - * tests/constraints.tcl: ensure 'nonUnixUserInteraction' constraint is + * tests/constraints.tcl: Ensure 'nonUnixUserInteraction' constraint is set for aqua. - * tests/choosedir.test: add 'notAqua' constraints to X11-only tests; + * tests/choosedir.test: Add 'notAqua' constraints to X11-only tests; * tests/clrpick.test: add 'nonUnixUserInteraction' to 'unix' tests * tests/menuDraw.test: requiring interaction on aqua. * tests/unixMenu.test: @@ -570,7 +620,7 @@ 2007-04-29 Daniel Steffen <das@users.sourceforge.net> - * unix/configure.in: fix for default case in tk debug build detection. + * unix/configure.in: Fix for default case in tk debug build detection. * unix/configure: autoconf-2.59 2007-04-27 Joe English <jenglish@users.sourceforge.net> @@ -588,34 +638,34 @@ *** 8.5a6 TAGGED FOR RELEASE *** - * unix/Makefile.in (dist): correct tests/ttk glob inclusion + * unix/Makefile.in (dist): Correct tests/ttk glob inclusion 2007-04-25 Jeff Hobbs <jeffh@ActiveState.com> - * unix/Makefile.in (dist): add tests/ttk dir to src dist + * unix/Makefile.in (dist): Add tests/ttk dir to src dist - * unix/tkUnixMenubu.c (TkpDisplayMenuButton): init width/height to 0 + * unix/tkUnixMenubu.c (TkpDisplayMenuButton): Init width/height to 0 2007-04-25 Daniel Steffen <das@users.sourceforge.net> - * unix/Makefile.in (dist): add macosx/*.xcconfig files to src dist; + * unix/Makefile.in (dist): Add macosx/*.xcconfig files to src dist; copy license.terms to dist macosx dir; fix autoheader bits. 2007-04-24 Jeff Hobbs <jeffh@ActiveState.com> - * unix/Makefile.in (dist): add ttk bits to src dist + * unix/Makefile.in (dist): Add ttk bits to src dist - * tests/font.test (font-46.[12]): correct listification of result + * tests/font.test (font-46.[12]): Correct listification of result 2007-04-23 Daniel Steffen <das@users.sourceforge.net> - * generic/tkCanvas.c: allow -selectforeground option to be None; add + * generic/tkCanvas.c: Allow -selectforeground option to be None; add * generic/tkCanvText.c: fallback to fgColor when selFgColor is None * generic/tkEntry.c: (new default on aqua to match native L&F). * generic/tkListbox.c: * generic/tkText.c: - * generic/tkCanvas.c: add support for bypassing all of Tk's double + * generic/tkCanvas.c: Add support for bypassing all of Tk's double * generic/tkEntry.c: buffered drawing into intermediate pixmaps * generic/tkFrame.c: (via TK_NO_DOUBLE_BUFFERING #define), it is * generic/tkListbox.c: unnecessary & wasteful on aqua where all @@ -625,22 +675,22 @@ * unix/tkUnixScale.c: of TkpClipDrawableToRect()). * macosx/tkMacOSXPort.h: - * library/bgerror.tcl: on aqua, use moveable alert resp. modal dialog + * library/bgerror.tcl: On aqua, use moveable alert resp. modal dialog * library/dialog.tcl: window class and corresponding system background pattern; fix button padding. - * library/tearoff.tcl: correct aqua menu bar height; vertically offset + * library/tearoff.tcl: Correct aqua menu bar height; vertically offset * library/tk.tcl: aqua tearoff floating window to match menu. - * library/demos/goldberg.tcl: fix overwriting of widget demo global. + * library/demos/goldberg.tcl: Fix overwriting of widget demo global. - * library/demos/menu.tcl: on aqua, use custom MDEF and tearoffs; + * library/demos/menu.tcl: On aqua, use custom MDEF and tearoffs; * library/demos/menubu.tcl: correct menubutton toplevel name. - * library/demos/puzzle.tcl: fix button size & padding for aqua. + * library/demos/puzzle.tcl: Fix button size & padding for aqua. * library/demos/radio.tcl: - * macosx/tkMacOSXCarbonEvents.c: add window event target carbon event + * macosx/tkMacOSXCarbonEvents.c: Add window event target carbon event * macosx/tkMacOSXEvent.c: handler for all kEventClassWindow and * macosx/tkMacOSXEvent.h: kEventClassMouse events; move all * macosx/tkMacOSXNotify.c: remaining events except for @@ -657,7 +707,7 @@ the various ways in use to run the tcl event loop; add handling of kEventClassAppearance events (for ScrollBarVariantChanged event). - * macosx/tkMacOSXDialog.c: use new TkMacOSXTrackingLoop() around + * macosx/tkMacOSXDialog.c: Use new TkMacOSXTrackingLoop() around * macosx/tkMacOSXEvent.c: blocking API that puts up modal dialogs * macosx/tkMacOSXMenu.c: or when entering/exiting menu/control * macosx/tkMacOSXMouseEvent.c: tracking, window dragging and other @@ -666,12 +716,12 @@ * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: - * macosx/tkMacOSXDialog.c: use new TkMacOSXRunTclEventLoop() + * macosx/tkMacOSXDialog.c: Use new TkMacOSXRunTclEventLoop() * macosx/tkMacOSXScale.c: instead of Tcl_DoOneEvent(), * macosx/tkMacOSXScrlbr.c: Tcl_ServiceAll(), TclServiceIdle() * macosx/tkMacOSXWindowEvent.c: and Tcl_GlobalEval("update idletasks"). - * macosx/tkMacOSXColor.c: make available as Tk system colors all + * macosx/tkMacOSXColor.c: Make available as Tk system colors all * macosx/tkMacOSXPort.h: appearance manager brushes, text colors and backgrounds with new and legacy names, as well as the fully transparent color "systemTransparent"; add TkMacOSXSetColorIn{Port,Context}() to @@ -680,24 +730,24 @@ (lossy for most system colors); modernize/remove Classic-era code; replace crufty strcmp() elseifs by Tcl_GetIndexFromObjStruct(). - * macosx/tkMacOSXButton.c: use new TkMacOSXSetColorInPort() + * macosx/tkMacOSXButton.c: Use new TkMacOSXSetColorInPort() * macosx/tkMacOSXDraw.c: instead of setting rgb color directly * macosx/tkMacOSXMenubutton.c: to allow for non-rgb system colors. - * macosx/tkMacOSXCursor.c: implement "none" cursor as on other + * macosx/tkMacOSXCursor.c: Implement "none" cursor as on other platforms [Patch 1615427]; add all missing appearance manager cursors. - * macosx/tkMacOSXDefault.h: set SELECT_FG_COLORs to None to match aqua + * macosx/tkMacOSXDefault.h: Set SELECT_FG_COLORs to None to match aqua L&F; use standard system color names; use new 'menu' system font; correct default scrollbar width. - * macosx/tkMacOSXDraw.c: standardize initialization, use and + * macosx/tkMacOSXDraw.c: Standardize initialization, use and * macosx/tkMacOSXInt.h: emptying of various static temp rgns * macosx/tkMacOSXRegion.c: onto two global RgnHandles; in debug * macosx/tkMacOSXSubwindows.c: builds, verify emptiness of these temp * macosx/tkMacOSXWindowEvent.c: rgns before use. - * macosx/tkMacOSXDraw.c: add TkMacOSX{Setup,Restore}DrawingContext() to + * macosx/tkMacOSXDraw.c: Add TkMacOSX{Setup,Restore}DrawingContext() to * macosx/tkMacOSXInt.h: abstract common setup & teardown of drawing environment (for both CG and QD); save/restore QD theme drawing state; handle GC clip region; add TkpClipDrawableToRect() to allow clipped @@ -705,35 +755,35 @@ "systemWindowHeaderBackground" to setup background in themed toplevels; correct implementation of TkMacOSXMakeStippleMap(). - * macosx/tkMacOSXEntry.c: use new TkMacOSXSetupDrawingContext() and + * macosx/tkMacOSXEntry.c: Use new TkMacOSXSetupDrawingContext() and * macosx/tkMacOSXFont.c: TkMacOSXRestoreDrawingContext() instead of * macosx/ttkMacOSXTheme.c: various setup/teardown procs like TkMacOSX{SetUp,Release}CGContext(), TkMacOSXQuarz{Start,End}Draw(), TkMacOSXSetUpGraphicsPort() etc. - * macosx/tkMacOSXEmbed.c: add CG context and drawable clip rgn fields + * macosx/tkMacOSXEmbed.c: Add CG context and drawable clip rgn fields * macosx/tkMacOSXInt.h: to MacDrawable struct. * macosx/tkMacOSXSubwindows.c: - * macosx/tkMacOSXDialog.c: make -parent option of tk_getOpenFile et al. + * macosx/tkMacOSXDialog.c: Make -parent option of tk_getOpenFile et al. use the sheet version of NavServices dialogs; ensure native parent win exists before using StandardSheet API for tk_messageBox [Bug 1677611]; force sheets to behave like app-modal dialogs via WindowModality() API; use more modern ColorPicker API. - * macosx/tkAboutDlg.r: use themed movable modal dialog, fix (c) year. + * macosx/tkAboutDlg.r: Use themed movable modal dialog, fix (c) year. - * macosx/tkMacOSXEntry.c: take xOff/yOff of MacDrawable into account + * macosx/tkMacOSXEntry.c: Take xOff/yOff of MacDrawable into account * macosx/ttkMacOSXTheme.c: when computing locations/bounds to ensure correct posititioning when not drawing into intermediate pixmap. - * macosx/tkMacOSXFont.c: use appearance manager API to map system font + * macosx/tkMacOSXFont.c: Use appearance manager API to map system font * macosx/tkMacOSXFont.h: names to TkFonts; add "menu" system font for menu item text drawing from MDEF; always draw with CG; remove QD dependent stippling algorithm; move most header declarations into the source file (as they were not used anywhere else). - * macosx/tkMacOSXMenu.c: large-scale rewrite of custom + * macosx/tkMacOSXMenu.c: Large-scale rewrite of custom * macosx/tkMacOSXMenu.r (removed): MDEF and related code that * macosx/Wish.xcode/project.pbxproj: restores many longtime-MIA * macosx/Wish.xcodeproj/project.pbxproj: features to working order @@ -743,21 +793,21 @@ default "menu" system font is used; remove now obsolete SICN drawing code and resources. - * macosx/tkMacOSXCarbonEvents.c: handle additional menu carbon events + * macosx/tkMacOSXCarbonEvents.c: Handle additional menu carbon events * macosx/tkMacOSXEvent.c: in order to support <<MenuSelect>> in * macosx/tkMacOSXMenu.c: the menubar and in menus that are not * macosx/tkMacOSXMenus.c: using the custom MDEF [Bug 1620826]; fix early and missing clearing of current Tk active menu entry; fix extraneous sending of <<MenuSelect>> during active menu entry clearing. - * macosx/tkMacOSXMouseEvent.c: add support for async window dragging by + * macosx/tkMacOSXMouseEvent.c: Add support for async window dragging by the window server; set the corresponding window attribute by default. - * macosx/tkMacOSXMouseEvent.c: rationalized handling order of + * macosx/tkMacOSXMouseEvent.c: Rationalized handling order of non-mousedown events; add TkMacOSXModifierState() to retrieve the current key modifiers in carbon format. - * macosx/tkMacOSXScrlbr.c: use appearance manager API to retrieve + * macosx/tkMacOSXScrlbr.c: Use appearance manager API to retrieve scrollbar component metrics; add awareness of multiple possibilites for scrollbar arrow position in aqua and handle user changes to arrow position pref; handle difference in metrics of small & large scrollbar @@ -770,13 +820,13 @@ HiliteControl() by modern API; replace control mgr constants with appearance mgr equivalents. - * macosx/tkMacOSXSubwindows.c: use SetWindowBounds() API instead of + * macosx/tkMacOSXSubwindows.c: Use SetWindowBounds() API instead of SizeWindow(); invalidate clip regions after X{Map,Unmap}Window as fix for [Bug 940117] made them dependent on mapping state; remove unneeded calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD port; use native-endian pixmap on intel; remove obsolete pixmap pix locking. - * macosx/tkMacOSXWindowEvent.c: handle only the first of a batch of + * macosx/tkMacOSXWindowEvent.c: Handle only the first of a batch of kEventAppAvailableWindowBoundsChanged events sent per transaction; handle kEventWindowBoundsChanged event to support live window resizing and centralized sending of location/size changed ConfigureNotify @@ -788,7 +838,7 @@ fullscreen windows to ensure bounds match new screen size; enter/exit fullscreen UIMode upon activation/deactivation of fullscreen window. - * macosx/tkMacOSXWm.c: use live-resize and async-drag carbon window + * macosx/tkMacOSXWm.c: Use live-resize and async-drag carbon window * macosx/tkMacOSXWm.h: attributes for toplevels by default; implement new [wm attributes] -topmost, -transparent and -fullscreen; refactor WmAttributesCmd() parallelling the tkUnixWm.c implementation, use thus @@ -816,17 +866,17 @@ port; workaround GetWindowStructureWidths() Carbon bug (bogus results for never-mapped floating windows). - * macosx/tkMacOSXXStubs.c (TkMacOSXDisplayChanged): add maximal window + * macosx/tkMacOSXXStubs.c (TkMacOSXDisplayChanged): Add maximal window bounds field to Screen record (in ext_data), computed as the union of available window positioning bounds of all graphics devices (displays). - * macosx/tkMacOSXBitmap.c: fix macRoman encoding leak. + * macosx/tkMacOSXBitmap.c: Fix macRoman encoding leak. * macosx/tkMacOSXCursor.c: - * macosx/tkMacOSXDebug.c (TkMacOSXCarbonEventToAscii): use static + * macosx/tkMacOSXDebug.c (TkMacOSXCarbonEventToAscii): Use static * macosx/tkMacOSXDebug.h: buffer to simplify callers; const fixes. - * macosx/tkMacOSXBitmap.c: use more efficient QDSwapPort() instead of + * macosx/tkMacOSXBitmap.c: Use more efficient QDSwapPort() instead of * macosx/tkMacOSXButton.c: GetPort()/SetPort()/GetGWorld()/SetGWorld(). * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXMenubutton.c: @@ -834,32 +884,32 @@ * macosx/tkMacOSXScrlbr.c: * macosx/tkMacOSXXStubs.c: - * macosx/tkMacOSXColor.c: use kHIToolboxVersionNumber for runtime OS + * macosx/tkMacOSXColor.c: Use kHIToolboxVersionNumber for runtime OS * macosx/tkMacOSXEntry.c: version check rather than Gestalt() etc. * macosx/tkMacOSXInt.h: * macosx/tkMacOSXWm.c: - * macosx/tkMacOSXDraw.c: remove obsolete and now incorrect + * macosx/tkMacOSXDraw.c: Remove obsolete and now incorrect * macosx/tkMacOSXInt.h: tkMenuCascadeRgn clipping code. * macosx/tkMacOSXMenu.c: - * macosx/tkMacOSXHLEvents.c: replace Tcl_GlobalEval() resp. Tcl_Eval() + * macosx/tkMacOSXHLEvents.c: Replace Tcl_GlobalEval() resp. Tcl_Eval() * macosx/tkMacOSXScrlbr.c: by Tcl_EvalEx(). * macosx/tkMacOSXInit.c: - * macosx/tkMacOSXInit.c (TkpInit): reorder initialization steps. + * macosx/tkMacOSXInit.c (TkpInit): Reorder initialization steps. - * macosx/tkMacOSXKeyEvent.c: remove pre-10.2 support. + * macosx/tkMacOSXKeyEvent.c: Remove pre-10.2 support. - * macosx/tkMacOSXMenus.c: remove now useless call to + * macosx/tkMacOSXMenus.c: Remove now useless call to TkMacOSXHandleTearoffMenu(); use \x.. quoting for non-latin1 macroman literar chars to allow file to be edited as utf-8. - * macosx/tkMacOSXScale.c: replace TrackControl() by modern + * macosx/tkMacOSXScale.c: Replace TrackControl() by modern * macosx/tkMacOSXScrlbr.c: HandleControlClick() API (using new TkMacOSXModifierState()). - * macosx/tkMacOSXInt.h: move all constant #defines needed to + * macosx/tkMacOSXInt.h: Move all constant #defines needed to * macosx/tkMacOSXColor.c: support building on older OS X releases * macosx/tkMacOSXEvent.h: to a central location in tkMacOSXInt.h. * macosx/tkMacOSXFont.c: @@ -870,7 +920,7 @@ * macosx/tkMacOSXWm.c: * macosx/ttkMacOSXTheme.c: - * macosx/tkMacOSXInt.h: add ChkErr() macro to factor out + * macosx/tkMacOSXInt.h: Add ChkErr() macro to factor out * macosx/tkMacOSXButton.c: Carbon OSStatus return value checking * macosx/tkMacOSXCarbonEvents.c: and TkMacOSXDbgMsg() macro to factour * macosx/tkMacOSXClipboard.c: out debug message output; use these @@ -895,27 +945,27 @@ * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: - * macosx/tkMacOSXSend.c: remove duplicate/unused declarations. + * macosx/tkMacOSXSend.c: Remove duplicate/unused declarations. * macosx/tkMacOSXXStubs.c: - * macosx/tkMacOSXDebug.c: const fixes. + * macosx/tkMacOSXDebug.c: Const fixes. * macosx/tkMacOSXInit.c: * macosx/tkMacOSXTest.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: - * macosx/Wish-Info.plist.in: add tcl document extensions/mime types and + * macosx/Wish-Info.plist.in: Add tcl document extensions/mime types and LSMinimumSystemVersion, LSRequiresCarbon & NSAppleScriptEnabled keys. - * macosx/Wish-Common.xcconfig: add Wish's Info.plist as __info_plist + * macosx/Wish-Common.xcconfig: Add Wish's Info.plist as __info_plist section to tktest; enable more warnings. - * macosx/Wish.xcodeproj/project.pbxproj: add 'DebugMemCompile' build + * macosx/Wish.xcodeproj/project.pbxproj: Add 'DebugMemCompile' build configuration that calls configure with --enable-symbols=all; disable configure check for __attribute__((__visibility__("hidden"))) in Debug configuration to restore availability of ZeroLink. - * macosx/Wish-Common.xcconfig: fix whitespace. + * macosx/Wish-Common.xcconfig: Fix whitespace. * macosx/Wish-Debug.xcconfig: * macosx/Wish-Release.xcconfig: * macosx/tkMacOSXAETE.r: @@ -927,23 +977,23 @@ * macosx/tkMacOSXXCursors.r: * macosx/README: - * macosx/GNUmakefile: fix/add copyright and license refs. + * macosx/GNUmakefile: Fix/add copyright and license refs. * macosx/Tk-Info.plist.in: * macosx/Wish-Info.plist.in: * macosx/Wish.xcode/project.pbxproj: * macosx/Wish.xcodeproj/project.pbxproj: * macosx/tkMacOSX.h: - * unix/configure.in: install license.terms into Tk.framework; fix tk + * unix/configure.in: Install license.terms into Tk.framework; fix tk debug build detection. * unix/configure: autoconf-2.59 - * doc/colors.n: document new Mac OS X system colors. - * doc/cursors.n: document new Mac OS X native cursors. - * doc/font.n: document new Mac OS X 'menu' system font. - * doc/wm.n: document new Mac OS X [wm attributes]. - * doc/ttk_image.n: fix 'make html' warning. - * doc/canvas.n: fix nroff typo. + * doc/colors.n: Document new Mac OS X system colors. + * doc/cursors.n: Document new Mac OS X native cursors. + * doc/font.n: Document new Mac OS X 'menu' system font. + * doc/wm.n: Document new Mac OS X [wm attributes]. + * doc/ttk_image.n: Fix 'make html' warning. + * doc/canvas.n: Fix nroff typo. 2007-04-21 Jeff Hobbs <jeffh@ActiveState.com> @@ -998,22 +1048,22 @@ 2007-03-07 Daniel Steffen <das@users.sourceforge.net> - * generic/tkMain.c (Tk_MainEx): replicate macosx-specific code from + * generic/tkMain.c (Tk_MainEx): Replicate macosx-specific code from TkpInit() that ensures the console window appears when wish is started from the OS X Finder (i.e. with stdin == /dev/null), jeffh's 2006-11-24 change rendered the corresponding code in TkpInit() ineffective in wish because Tk_MainEx() sets tcl_interactive before calling TkpInit(). - * generic/ttk/ttkGenStubs.tcl (new): add ttk-specific genstubs.tcl from + * generic/ttk/ttkGenStubs.tcl (new): Add ttk-specific genstubs.tcl from * unix/Makefile.in (genstubs): tile and run it from 'genstubs' target, restores ability to generate all of Tk's stub sources. * generic/ttk/ttkTreeview.c: #ifdef out unused declaration. - * macosx/tkMacOSXDebug.c (TkMacOSXGetNamedDebugSymbol): add fix for + * macosx/tkMacOSXDebug.c (TkMacOSXGetNamedDebugSymbol): Add fix for libraries loaded with a DYLD_IMAGE_SUFFIX. - * macosx/Wish.xcodeproj/project.pbxproj: ensure gcc version used by + * macosx/Wish.xcodeproj/project.pbxproj: Ensure gcc version used by * macosx/Wish.xcodeproj/default.pbxuser: Xcode and configure/make are * macosx/Wish-Common.xcconfig: consistent and independent of gcc_select default and CC env var; fixes for Xcode 3.0. @@ -1053,7 +1103,7 @@ 2007-02-04 Daniel Steffen <das@users.sourceforge.net> - * unix/tcl.m4: use gcc4's __attribute__((__visibility__("hidden"))) if + * unix/tcl.m4: Use gcc4's __attribute__((__visibility__("hidden"))) if available to define MODULE_SCOPE effective on all platforms. * unix/configure.in: add caching to -pipe check. * unix/configure: autoconf-2.59 @@ -1074,7 +1124,7 @@ 2007-01-28 Daniel Steffen <das@users.sourceforge.net> - * macosx/Wish.xcodeproj/project.pbxproj: extract build settings that + * macosx/Wish.xcodeproj/project.pbxproj: Extract build settings that * macosx/Wish.xcodeproj/default.pbxuser: were common to multiple * macosx/Wish-Common.xcconfig (new file): configurations into external * macosx/Wish-Debug.xcconfig (new file): xcconfig files; add extra @@ -1083,18 +1133,18 @@ single script phase; correct syntax of build setting references to use $() throughout; remove unused tcltest sources from 'tktest' target. - * macosx/README: document new Wish.xcodeproj configurations; other + * macosx/README: Document new Wish.xcodeproj configurations; other minor updates/corrections. - * generic/tk.h: update location of version numbers in macosx files. + * generic/tk.h: Update location of version numbers in macosx files. - * macosx/Wish.xcode/project.pbxproj: restore 'tktest' target to working + * macosx/Wish.xcode/project.pbxproj: Restore 'tktest' target to working * macosx/Wish.xcode/default.pbxuser: order by replicating applicable changes to Wish.xcodeproj since 2006-07-20. 2007-01-25 Daniel Steffen <das@users.sourceforge.net> - * unix/tcl.m4: integrate CPPFLAGS into CFLAGS as late as possible and + * unix/tcl.m4: Integrate CPPFLAGS into CFLAGS as late as possible and move (rather than duplicate) -isysroot flags from CFLAGS to CPPFLAGS to avoid errors about multiple -isysroot flags from some older gcc builds. @@ -1106,9 +1156,9 @@ 2007-01-19 Daniel Steffen <das@users.sourceforge.net> - * macosx/Wish.xcodeproj/project.pbxproj: remove libtommath defines. + * macosx/Wish.xcodeproj/project.pbxproj: Remove libtommath defines. - * unix/tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861] + * unix/tcl.m4: Ensure CPPFLAGS env var is used when set. [Bug 1586861] (Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS when present in CFLAGS to avoid discrepancies between what headers configure sees during preprocessing tests and compiling tests. @@ -1658,7 +1708,7 @@ * tests/winDialog.test: Updated test for file name length check. * test/winWm.test: Corrected test expectation for menu wrapping. -2006-10-16 Andreas Kupries <andreask@activestate.com> +2006-10-16 Andreas Kupries <andreask@activestate.com> * doc/WindowId.3: Pat's commit on 2006-10-08 broke the .SH NAME information across several lines, breaking the cross-linking of @@ -2114,11 +2164,11 @@ * unix/tkUnixFont.c (TkpGetFontFamilies): Fix crash caused when the XServer returns invalid font names. [Bug 1475865] -2006-04-23 Vince Darley <vincentdarley@users.sourceforge.net> +2006-04-23 Vince Darley <vincentdarley@users.sourceforge.net> * tests/scrollbar.test: fix to tkAqua test failures -2006-04-18 Vince Darley <vincentdarley@users.sourceforge.net> +2006-04-18 Vince Darley <vincentdarley@users.sourceforge.net> * macosx/tkMacOSXEmbed.c: fix to [Bug 1088814] test failures in embed.test @@ -2204,7 +2254,7 @@ * macosx/tkMacOSXWm.c (TkMacOSXGrowToplevel): ensure QD port is set correctly before using API relying on it. -2006-04-06 Vince Darley <vincentdarley@users.sourceforge.net> +2006-04-06 Vince Darley <vincentdarley@users.sourceforge.net> * macosx/tkMacOSXMouseEvent.c: Now that [wm attributes -titlepath] works correctly, add OS support for dragging proxy icons and using the @@ -2249,7 +2299,7 @@ * tests/grid.test: fix segfault on empty or "all" index list * generic/tkGrid.c (GridRowColumnConfigureCommand): [Bug 1422430] -2006-04-05 Vince Darley <vincentdarley@users.sourceforge.net> +2006-04-05 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkText.c: fix to crash caused on some platforms by new tests introduced to check for [Bug 1414171], which destroy the text widget in @@ -2275,7 +2325,7 @@ * unix/tcl.m4, win/tcl.m4: []-quote AC_DEFUN functions. -2006-03-26 Vince Darley <vincentdarley@users.sourceforge.net> +2006-03-26 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkText.c: * tests/text.test: Fix for elaborations of [Bug 1414171] for '$text @@ -2311,7 +2361,7 @@ * generic/tkImgGIF.c (FileReadGIF): Stop crashes when the first GIF frame does not define the overall size of the image. [Bug 1458234] -2006-03-26 Vince Darley <vincentdarley@users.sourceforge.net> +2006-03-26 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkText.c: * generic/tkText.h: @@ -2421,7 +2471,7 @@ console window opened, in compatibility with the previous implementation. -2006-03-18 Vince Darley <vincentdarley@users.sourceforge.net> +2006-03-18 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkText.c: Fix for undo/modified status of text widgets when empty strings are inserted and undone. @@ -2556,7 +2606,7 @@ SCIM in use, and make sure all X events get passed to XFilterEvent, including those without a corresponding Tk window. -2006-01-13 Anton Kovalenko <a_kovalenko@users.sourceforge.net> +2006-01-13 Anton Kovalenko <a_kovalenko@users.sourceforge.net> * generic/tkUndo.c (TkUndoSetDepth): Don't free TkUndoSubAtoms for separator entries that are deleted: there is some unpredictable garbage @@ -2917,7 +2967,7 @@ script used in variable traces so that widget names with spaces in will work. [Bug 1335485] -2005-11-16 Vince Darley <vincentdarley@users.sourceforge.net> +2005-11-16 Vince Darley <vincentdarley@users.sourceforge.net> * doc/text.n: clarify left to right interpretation of index modifiers, including the fact that validation occurs after each step. [Bug @@ -2967,7 +3017,7 @@ * unix/tcl.m4: Fix SHLIB_LD_LIBS for building tclkit on OpenBSD. * unix/configure: regenerated -2005-10-31 Vince Darley <vincentdarley@users.sourceforge.net> +2005-10-31 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkText.c * tests/textDisp.test: fix and test for [Bug 1333951] in '.text count @@ -3017,7 +3067,7 @@ Tk exit handler after all exit handlers should be called. [Bug 749908, 1322294] -2005-10-10 Vince Darley <vincentdarley@users.sourceforge.net> +2005-10-10 Vince Darley <vincentdarley@users.sourceforge.net> TIP #256 IMPLEMENTATION @@ -3196,13 +3246,13 @@ * doc/GetFont.3: Reworded to reflect the truth. [Bug 1151523] -2005-08-16 George Peter Staplin <GeorgePS@XMission.com> +2005-08-16 George Peter Staplin <GeorgePS@XMission.com> * doc/CrtItemType.3 prototypes were lacking [] after objv. Thus the man page was wrong about the actual prototypes. This was verified by studying tkCanvBmap.c. -2005-08-13 Chengye Mao <chengye.geo@yahoo.com> +2005-08-13 Chengye Mao <chengye.geo@yahoo.com> * generic/tkOldConfig.c: Fixed [Bug 1258604]. This bug was introduced into the modfied Tk_ConfigureWidget. It failed to properly handle the @@ -3220,7 +3270,7 @@ working with Tcl_GetStringFromObj because it is not 64-bit clean. [Bug 1252702] -2005-08-04 Vince Darley <vincentdarley@users.sourceforge.net> +2005-08-04 Vince Darley <vincentdarley@users.sourceforge.net> * doc/text.n: Clarify behaviour of tab stops (as per [Bug 1247835]) @@ -3360,7 +3410,7 @@ * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): corrected if expression error (use of = instead of ==). -2005-07-18 Vince Darley <vincentdarley@users.sourceforge.net> +2005-07-18 Vince Darley <vincentdarley@users.sourceforge.net> * generic/tkTextMark.c: fix to segfault in "mark prev" * tests/textIndex.test: [Bug 1240221] @@ -3511,7 +3561,7 @@ * unix/configure.in: Test for XScreenSaver support. * generic/tkCmds.c (Tk_TkObjCmd): Implementation of [tk inactivity]. -2005-05-27 Todd Helfter <tmh@users.sourceforge.net> +2005-05-27 Todd Helfter <tmh@users.sourceforge.net> * library/menu.tcl: correct the sticky behavior of menus posted by tk_popup so that they "stick" after the initial <ButtonRelease> @@ -3599,7 +3649,7 @@ Restore the port to what it was before putting we were called. [Bug 1202223] -2005-05-14 Jim Ingham <jingham@apple.com> +2005-05-14 Jim Ingham <jingham@apple.com> * macosx/tkMacOSXScrlbr.c (ThumbActionProc): Missing Tcl_Release. @@ -3639,7 +3689,7 @@ * unix/tcl.m4: sync with tcl * unix/configure: autoconf-2.59 -2005-05-10 Vince Darley <vincentdarley@users.sourceforge.net> +2005-05-10 Vince Darley <vincentdarley@users.sourceforge.net> * library/text.tcl: test and fix to TextPrevPara to avoid infinite loop * tests/textIndex.test: at start of widget. [Bug 1191895] @@ -3689,7 +3739,7 @@ * unix/configure: autoconf-2.59 -2005-04-22 George Peter Staplin <GeorgePS@XMission.com> +2005-04-22 George Peter Staplin <GeorgePS@XMission.com> * doc/FontId.3: I fixed a typo. "linespace" was used instead of "ascent". I also added a .PP before the paragraph to make the @@ -3701,7 +3751,7 @@ UTF-8 parsing instead of strict parsing with FcUtf8ToUcs4() [fix/workaround for Bug 1185640] -2003-04-18 Vince Darley <vincentdarley@users.sourceforge.net> +2003-04-18 Vince Darley <vincentdarley@users.sourceforge.net> * library/text.tcl * doc/text.n: corrected 'Home' and 'End' and Control-a/e handling to diff --git a/doc/button.n b/doc/button.n index 333ff61..54c0a2f 100644 --- a/doc/button.n +++ b/doc/button.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: button.n,v 1.11 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: button.n,v 1.11.2.1 2007/09/04 17:44:19 dgp Exp $ '\" .so man.macros .TH button n 4.4 Tk "Tk Built-In Commands" @@ -177,8 +177,24 @@ actions occur: the button is completely non-responsive. The behavior of buttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. +.SH EXAMPLES +This is the classic Tk "Hello, World!" demonstration: +.PP +.CS + \fBbutton\fR .b -text "Hello, World!" -command exit + pack .b +.CE +.PP +This example demonstrates how to handle button accelerators: +.PP +.CS + \fBbutton\fR .b1 -text Hello -underline 0 + \fBbutton\fR .b2 -text World -underline 0 + bind . <Key-h> {.b1 flash; .b1 invoke} + bind . <Key-w> {.b2 flash; .b2 invoke} + pack .b1 .b2 +.CE .SH "SEE ALSO" ttk_button(n) - .SH KEYWORDS button, widget diff --git a/doc/checkbutton.n b/doc/checkbutton.n index c22bbcb..6ed9b8e 100644 --- a/doc/checkbutton.n +++ b/doc/checkbutton.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: checkbutton.n,v 1.12 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: checkbutton.n,v 1.12.2.1 2007/09/04 17:44:20 dgp Exp $ '\" .so man.macros .TH checkbutton n 4.4 Tk "Tk Built-In Commands" @@ -262,8 +262,19 @@ actions occur: the checkbutton is completely non-responsive. The behavior of checkbuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. +.SH EXAMPLE +This example shows a group of uncoupled checkbuttons. +.PP +.CS + labelframe .lbl -text "Steps:" + \fBcheckbutton\fR .c1 -text Lights -variable lights + \fBcheckbutton\fR .c2 -text Cameras -variable cameras + \fBcheckbutton\fR .c3 -text Action! -variable action + pack .c1 .c2 .c3 -in .lbl + pack .lbl +.CE + .SH "SEE ALSO" button(n), options(n), radiobutton(n), ttk_checkbutton(n) - .SH KEYWORDS checkbutton, widget diff --git a/doc/console.n b/doc/console.n index 7992457..198432d 100644 --- a/doc/console.n +++ b/doc/console.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: console.n,v 1.7 2004/10/28 10:22:51 dkf Exp $ +'\" RCS: @(#) $Id: console.n,v 1.7.2.1 2007/09/04 17:44:21 dgp Exp $ '\" .so man.macros .TH console n 8.4 Tk "Tk Built-In Commands" @@ -132,9 +132,7 @@ often has the following code fragment in it so output produced by .CS catch {\fBconsole show\fR} .CE - -.SH KEYWORDS -console, interpreter, window, interactive, output channels - .SH "SEE ALSO" destroy(n), fconfigure(n), history(n), interp(n), puts(n), text(n), wm(n) +.SH KEYWORDS +console, interpreter, window, interactive, output channels @@ -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: tk.n,v 1.12 2007/05/03 23:55:29 dkf Exp $ +'\" RCS: @(#) $Id: tk.n,v 1.12.2.1 2007/09/04 17:44:21 dgp Exp $ '\" .so man.macros .TH tk n 8.4 Tk "Tk Built-In Commands" @@ -28,6 +28,7 @@ The command can take any of a number of different forms depending on the \fIoption\fR argument. The legal forms are: .TP \fBtk appname \fR?\fInewName\fR? +. If \fInewName\fR isn't specified, this command returns the name of the application (the name that may be used in \fBsend\fR commands to communicate with the application). @@ -110,5 +111,7 @@ state is returned. This is turned on by default for the main display. Returns the current Tk windowing system, one of \fBx11\fR (X11-based), \fBwin32\fR (MS Windows), or \fBaqua\fR (Mac OS X Aqua). +.SH "SEE ALSO" +send(n), winfo(n) .SH KEYWORDS application name, send diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n index eaa3f69..027c661 100644 --- a/doc/ttk_combobox.n +++ b/doc/ttk_combobox.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4 2006/12/17 21:09:46 jenglish Exp $ +'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.1 2007/09/04 17:44:21 dgp Exp $ '\" .so man.macros .TH ttk_combobox n 8.5 Tk "Tk Themed Widget" @@ -108,3 +108,5 @@ This event is generated after the listbox is unposted. .SH "SEE ALSO" ttk_widget(n), ttk_entry(n) +.SH KEYWORDS +choice, entry, list box, text box, widget diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h index 0c7d57c..9f84f3a 100644 --- a/generic/ttk/ttkDecls.h +++ b/generic/ttk/ttkDecls.h @@ -1,5 +1,5 @@ /* - * $Id: ttkDecls.h,v 1.3 2006/12/10 19:19:44 jenglish Exp $ + * $Id: ttkDecls.h,v 1.3.2.1 2007/09/04 17:44:21 dgp Exp $ * * This file is (mostly) automatically generated from ttk.decls. */ @@ -15,7 +15,7 @@ extern const char *TtkInitializeStubs( interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION) #else -#define Ttk_InitStubs(interp) Tcl_PkgRequire(interp,"ttk",TTK_VERSION) +#define Ttk_InitStubs(interp) Tcl_PkgRequire(interp,"Ttk",TTK_VERSION) #endif diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index f12a01b..90f4914 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -1,4 +1,4 @@ -/* $Id: ttkInit.c,v 1.5 2007/01/03 05:06:25 nijtmans Exp $ +/* $Id: ttkInit.c,v 1.5.2.1 2007/09/04 17:44:21 dgp Exp $ * Copyright (c) 2003, Joe English * * Ttk package: initialization routine and miscellaneous utilities. @@ -276,9 +276,7 @@ Ttk_Init(Tcl_Interp *interp) Ttk_PlatformInit(interp); -#if 0 Tcl_PkgProvideEx(interp, "Ttk", TTK_PATCH_LEVEL, (void*)&ttkStubs); -#endif return TCL_OK; } diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 5431847..83e715d 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.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: tkMacOSXDialog.c,v 1.25.2.2 2007/07/01 17:31:32 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.25.2.3 2007/09/04 17:44:22 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -131,14 +131,14 @@ Tk_ChooseColorObjCmd( Tcl_Obj *CONST objv[]) /* Argument objects. */ { OSStatus err; + int result = TCL_ERROR; Tk_Window parent, tkwin = (Tk_Window) clientData; const char *title; int i, picked = 0, srcRead, dstWrote; CMError cmerr; CMProfileRef prof; NColorPickerInfo cpinfo; - static int inited = 0; - static RGBColor in; + static RGBColor color = {0xffff, 0xffff, 0xffff}; static const char *optionStrings[] = { "-initialcolor", "-parent", "-title", NULL }; @@ -146,18 +146,11 @@ Tk_ChooseColorObjCmd( COLOR_INITIAL, COLOR_PARENT, COLOR_TITLE }; - if (inited == 0) { - /* - * 'in' stores the last color picked. The next time the color - * dialog pops up, the last color will remain in the dialog. - */ - - in.red = 0xffff; - in.green = 0xffff; - in.blue = 0xffff; - inited = 1; - } title = "Choose a color:"; + bzero(&cpinfo, sizeof(cpinfo)); + cpinfo.theColor.color.rgb.red = color.red; + cpinfo.theColor.color.rgb.green = color.green; + cpinfo.theColor.color.rgb.blue = color.blue; for (i = 1; i < objc; i += 2) { int index; @@ -165,13 +158,13 @@ Tk_ChooseColorObjCmd( if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings, "option", TCL_EXACT, &index) != TCL_OK) { - return TCL_ERROR; + goto end; } if (i + 1 == objc) { option = Tcl_GetString(objv[i]); Tcl_AppendResult(interp, "value for \"", option, "\" missing", NULL); - return TCL_ERROR; + goto end; } value = Tcl_GetString(objv[i + 1]); @@ -181,18 +174,18 @@ Tk_ChooseColorObjCmd( colorPtr = Tk_GetColor(interp, tkwin, value); if (colorPtr == NULL) { - return TCL_ERROR; + goto end; } - in.red = colorPtr->red; - in.green = colorPtr->green; - in.blue = colorPtr->blue; + cpinfo.theColor.color.rgb.red = colorPtr->red; + cpinfo.theColor.color.rgb.green = colorPtr->green; + cpinfo.theColor.color.rgb.blue = colorPtr->blue; Tk_FreeColor(colorPtr); break; } case COLOR_PARENT: { parent = Tk_NameToWindow(interp, value, tkwin); if (parent == NULL) { - return TCL_ERROR; + goto end; } break; } @@ -204,14 +197,9 @@ Tk_ChooseColorObjCmd( } cmerr = CMGetDefaultProfileBySpace(cmRGBData, &prof); - bzero(&cpinfo, sizeof(cpinfo)); cpinfo.theColor.profile = prof; - cpinfo.theColor.color.rgb.red = in.red; - cpinfo.theColor.color.rgb.green = in.green; - cpinfo.theColor.color.rgb.blue = in.blue; cpinfo.dstProfile = prof; - cpinfo.flags = kColorPickerDialogIsMoveable - | kColorPickerCanAnimatePalette; + cpinfo.flags = kColorPickerDialogIsMoveable | kColorPickerDialogIsModal; cpinfo.placeWhere = kCenterOnMainScreen; /* Currently, this does not actually change the colorpicker title */ Tcl_UtfToExternal(NULL, TkMacOSXCarbonEncoding, title, -1, 0, NULL, @@ -222,22 +210,26 @@ Tk_ChooseColorObjCmd( err = ChkErr(NPickColor, &cpinfo); TkMacOSXTrackingLoop(0); if ((err == noErr) && (cpinfo.newColorChosen != 0)) { - in.red = cpinfo.theColor.color.rgb.red; - in.green = cpinfo.theColor.color.rgb.green; - in.blue = cpinfo.theColor.color.rgb.blue; + color.red = cpinfo.theColor.color.rgb.red; + color.green = cpinfo.theColor.color.rgb.green; + color.blue = cpinfo.theColor.color.rgb.blue; picked = 1; } cmerr = CMCloseProfile(prof); + result = TCL_OK; if (picked != 0) { - char result[32]; + char colorstr[8]; - sprintf(result, "#%02x%02x%02x", in.red >> 8, in.green >> 8, - in.blue >> 8); - Tcl_AppendResult(interp, result, NULL); + snprintf(colorstr, 8, "#%02x%02x%02x", color.red >> 8, + color.green >> 8, color.blue >> 8); + Tcl_SetObjResult(interp, Tcl_NewStringObj(colorstr, 7)); + } else { + Tcl_ResetResult(interp); } - return TCL_OK; +end: + return result; } /* @@ -944,6 +936,7 @@ NavServicesGetFile( Tcl_SetObjResult(interp, theResult); result = TCL_OK; } else if (err == userCanceledErr) { + Tcl_ResetResult(interp); result = TCL_OK; } diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h index 8775d1f..8e6cbde 100644 --- a/macosx/tkMacOSXInt.h +++ b/macosx/tkMacOSXInt.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: tkMacOSXInt.h,v 1.24.2.2 2007/07/01 17:31:33 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXInt.h,v 1.24.2.3 2007/09/04 17:44:22 dgp Exp $ */ #ifndef _TKMACINT @@ -20,8 +20,6 @@ #include "tkInt.h" #endif -#define kComponentSignatureString "TkMacOSX" -#define COMPONENT_SIGNATURE 'Tk ' #define TextStyle MacTextStyle #include <Carbon/Carbon.h> #undef TextStyle diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 9c7f41d..4ead09c 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.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: tkMacOSXPrivate.h,v 1.1.4.2 2007/07/01 17:31:37 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXPrivate.h,v 1.1.4.3 2007/09/04 17:44:23 dgp Exp $ */ #ifndef _TKMACPRIV @@ -172,6 +172,15 @@ MODULE_SCOPE float tkMacOSXToolboxVersionNumber; #endif /* MAC_OS_X_VERSION_MAX_ALLOWED */ /* + * Macros for DEBUG_ASSERT_MESSAGE et al from Debugging.h. + */ + +#undef kComponentSignatureString +#undef COMPONENT_SIGNATURE +#define kComponentSignatureString "TkMacOSX" +#define COMPONENT_SIGNATURE 'Tk ' + +/* * Macros abstracting checks only active in a debug build. */ diff --git a/tests/all.tcl b/tests/all.tcl index 770ee9c..f3706fe 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -8,15 +8,15 @@ # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: all.tcl,v 1.9 2005/02/14 09:21:13 dkf Exp $ +# +# RCS: @(#) $Id: all.tcl,v 1.9.2.1 2007/09/04 17:44:23 dgp Exp $ -package require Tcl 8.4 -package require tcltest 2.1 +package require Tcl 8.5 +package require tcltest 2.2 package require Tk ;# This is the Tk test suite; fail early if no Tk! +tcltest::configure {*}$argv tcltest::configure -testdir [file join [pwd] [file dirname [info script]]] tcltest::configure -loadfile \ [file join [tcltest::testsDirectory] constraints.tcl] tcltest::configure -singleproc 1 -eval tcltest::configure $argv tcltest::runAllTests diff --git a/tests/entry.test b/tests/entry.test index 3d10e72..6584c1a 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: entry.test,v 1.20 2006/05/29 21:53:16 hobbs Exp $ +# RCS: @(#) $Id: entry.test,v 1.20.2.1 2007/09/04 17:44:23 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -673,7 +673,7 @@ test entry-5.11 {ConfigureEntry procedure} { pack [entry .e -font {{open look glyph}}] .e scan dragto 30 update -} {} +} {} # No tests for DisplayEntry. diff --git a/tests/winMsgbox.test b/tests/winMsgbox.test new file mode 100644 index 0000000..f3f7fa2 --- /dev/null +++ b/tests/winMsgbox.test @@ -0,0 +1,299 @@ +# This file is a Tcl script to test the Windows specific message box +# +# Copyright (c) 2007 Pat Thoyts <patthoyts@users.sourceforge.net> +# +# RCS: @(#) $Id: winMsgbox.test,v 1.1.2.2 2007/09/04 17:44:24 dgp Exp $ + +package require tcltest 2.1 +eval tcltest::configure $argv +tcltest::loadTestedCommands + +testConstraint getwindowinfo [expr {[llength [info command ::testgetwindowinfo]] > 0}] + +if {[testConstraint testwinevent]} { + catch {testwinevent debug 1} +} + +proc Click {hwnd button} { + testwinevent $hwnd $button WM_COMMAND +} + +proc GetWindowInfo {title button} { + global windowInfo + set windowInfo {} + set hwnd [testfindwindow $title "#32770"] + set windowInfo [testgetwindowinfo $hwnd] + array set a $windowInfo + set childinfo {} ; set childtext "" + foreach child $a(children) { + lappend childinfo $child [set info [testgetwindowinfo $child]] + array set ca $info + if {$ca(class) eq "Static"} { + append childtext $ca(text) + } + } + set a(children) $childinfo + set a(childtext) $childtext + set windowInfo [array get a] + testwinevent $hwnd $button WM_COMMAND +} + +# ------------------------------------------------------------------------- + +test winMsgbox-1.0 {tk_messageBox ok} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.0 [pid]" + after 100 [list GetWindowInfo $title 2] + tk_messageBox -icon info -type ok -title $title -message Message +} -cleanup { + wm deiconify . +} -result {ok} + +test winMsgbox-1.1 {tk_messageBox okcancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.1 [pid]" + after 100 [list GetWindowInfo $title 1] + tk_messageBox -icon info -type okcancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {ok} + +test winMsgbox-1.2 {tk_messageBox okcancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.2 [pid]" + after 100 [list GetWindowInfo $title 2] + tk_messageBox -icon info -type okcancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {cancel} + +test winMsgbox-1.3 {tk_messageBox yesno} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.3 [pid]" + after 100 [list GetWindowInfo $title 6] + tk_messageBox -icon info -type yesno -title $title -message Message +} -cleanup { + wm deiconify . +} -result {yes} + +test winMsgbox-1.4 {tk_messageBox yesno} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.4 [pid]" + after 100 [list GetWindowInfo $title 7] + tk_messageBox -icon info -type yesno -title $title -message Message +} -cleanup { + wm deiconify . +} -result {no} + +test winMsgbox-1.5 {tk_messageBox abortretryignore} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.5 [pid]" + after 100 [list GetWindowInfo $title 3] + tk_messageBox -icon info -type abortretryignore -title $title -message Message +} -cleanup { + wm deiconify . +} -result {abort} + +test winMsgbox-1.6 {tk_messageBox abortretryignore} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.6 [pid]" + after 100 [list GetWindowInfo $title 4] + tk_messageBox -icon info -type abortretryignore -title $title -message Message +} -cleanup { + wm deiconify . +} -result {retry} + +test winMsgbox-1.7 {tk_messageBox abortretryignore} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.7 [pid]" + after 100 [list GetWindowInfo $title 5] + tk_messageBox -icon info -type abortretryignore -title $title -message Message +} -cleanup { + wm deiconify . +} -result {ignore} + +test winMsgbox-1.8 {tk_messageBox retrycancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.8 [pid]" + after 100 [list GetWindowInfo $title 4] + tk_messageBox -icon info -type retrycancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {retry} + +test winMsgbox-1.9 {tk_messageBox retrycancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.9 [pid]" + after 100 [list GetWindowInfo $title 2] + tk_messageBox -icon info -type retrycancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {cancel} + +test winMsgbox-1.10 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.10 [pid]" + after 100 [list GetWindowInfo $title 6] + tk_messageBox -icon info -type yesnocancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {yes} + +test winMsgbox-1.11 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.11 [pid]" + after 100 [list GetWindowInfo $title 7] + tk_messageBox -icon info -type yesnocancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {no} + +test winMsgbox-1.12 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} -setup { + wm iconify . +} -body { + global windowInfo + set title "winMsgbox-1.12 [pid]" + after 100 [list GetWindowInfo $title 2] + tk_messageBox -icon info -type yesnocancel -title $title -message Message +} -cleanup { + wm deiconify . +} -result {cancel} + +# ------------------------------------------------------------------------- + +test winMsgbox-2.0 {tk_messageBox message} -constraints {win getwindowinfo} -setup { + wm iconify . + unset -nocomplain info +} -body { + global windowInfo + set title "winMsgbox-2.0 [pid]" + set message "message" + after 100 [list GetWindowInfo $title 2] + set r [tk_messageBox -type ok -title $title -message $message] + array set info $windowInfo + lappend r $info(childtext) +} -cleanup { + wm deiconify . +} -result [list ok "message"] + +test winMsgbox-2.1 {tk_messageBox message (long)} -constraints { + win getwindowinfo +} -setup { + wm iconify . + unset -nocomplain info +} -body { + global windowInfo + set title "winMsgbox-2.1 [pid]" + set message [string repeat Ab 80] + after 100 [list GetWindowInfo $title 2] + set r [tk_messageBox -type ok -title $title -message $message] + array set info $windowInfo + lappend r $info(childtext) +} -cleanup { + wm deiconify . +} -result [list ok [string repeat Ab 80]] + +test winMsgbox-2.2 {tk_messageBox message (unicode)} -constraints { + win getwindowinfo +} -setup { + wm iconify . + unset -nocomplain info +} -body { + global windowInfo + set title "winMsgbox-2.2 [pid]" + set message "\u041f\u043e\u0438\u0441\u043a\u0020\u0441\u0442\u0440\u0430\u043d\u0438\u0446" + after 100 [list GetWindowInfo $title 2] + set r [tk_messageBox -type ok -title $title -message $message] + array set info $windowInfo + lappend r $info(childtext) +} -cleanup { + wm deiconify . +} -result [list ok "\u041f\u043e\u0438\u0441\u043a\u0020\u0441\u0442\u0440\u0430\u043d\u0438\u0446"] + +test winMsgbox-2.3 {tk_messageBox message (empty)} -constraints { + win getwindowinfo +} -setup { + wm iconify . + unset -nocomplain info +} -body { + global windowInfo + set title "winMsgbox-2.3 [pid]" + after 100 [list GetWindowInfo $title 2] + set r [tk_messageBox -type ok -title $title] + array set info $windowInfo + lappend r $info(childtext) +} -cleanup { + wm deiconify . +} -result [list ok ""] + +test winMsgbox-3.0 {tk_messageBox detail (sourceforge bug #1692927)} -constraints { + win getwindowinfo +} -setup { + wm iconify . + unset -nocomplain info +} -body { + global windowInfo + set title "winMsgbox-3.0 [pid]" + after 100 [list GetWindowInfo $title 2] + set r [tk_messageBox -type ok -title $title \ + -message Hello -detail "Pleased to meet you"] + array set info $windowInfo + lappend r $info(childtext) +} -cleanup { + wm deiconify . +} -result [list ok "Hello\n\nPleased to meet you"] + +test winMsgbox-3.1 {tk_messageBox detail (unicode)} -constraints { + win getwindowinfo +} -setup { + wm iconify . + unset -nocomplain info +} -body { + global windowInfo + set title "winMsgbox-3.1 [pid]" + set message "\u041f\u043e\u0438\u0441\u043a" + set detail "\u0441\u0442\u0440\u0430\u043d\u0438\u0446" + after 100 [list GetWindowInfo $title 2] + set r [tk_messageBox -type ok -title $title -message $message -detail $detail] + array set info $windowInfo + lappend r $info(childtext) +} -cleanup { + wm deiconify . +} -result [list ok "\u041f\u043e\u0438\u0441\u043a\n\n\u0441\u0442\u0440\u0430\u043d\u0438\u0446"] + +# ------------------------------------------------------------------------- + +if {[testConstraint testwinevent]} { + catch {testwinevent debug 0} +} +cleanupTests +return + +# Local variables: +# mode: tcl +# indent-tabs-mode: nil +# End:
\ No newline at end of file diff --git a/unix/Makefile.in b/unix/Makefile.in index 12eabb4..cfaed00 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.128.2.3 2007/07/10 21:54:29 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.128.2.4 2007/09/04 17:44:24 dgp Exp $ # Current Tk version; used in various names. @@ -321,15 +321,16 @@ MAN_FLAGS = @MAN_FLAGS@ CC = @CC@ CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ --I${UNIX_DIR} -I${GENERIC_DIR} \ --I${BMAP_DIR} -I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} \ -${AC_FLAGS} ${PROTO_FLAGS} \ -${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} ${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@ +-I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} -I${TCL_GENERIC_DIR} \ +-I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} ${AC_FLAGS} \ +${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \ +${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@ -CC_SWITCHES = ${CC_SWITCHES_NO_STUBS} ${TCL_STUB_FLAGS} +CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) ${TCL_STUB_FLAGS} -DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \ --I${BMAP_DIR} \ +APP_CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @EXTRA_APP_CC_SWITCHES@ + +DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ -I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} \ ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \ ${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ @@ -897,7 +898,7 @@ tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish rm -f tkAppInit.sav; \ mv tkAppInit.o tkAppInit.sav; \ fi; - $(CC) -c $(CC_SWITCHES_NO_STUBS) -DTK_TEST $(UNIX_DIR)/tkAppInit.c + $(CC) -c $(APP_CC_SWITCHES) -DTK_TEST $(UNIX_DIR)/tkAppInit.c rm -f tkTestInit.o mv tkAppInit.o tkTestInit.o @if test -f tkAppInit.sav ; then \ @@ -905,7 +906,7 @@ tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish fi; tkAppInit.o: $(UNIX_DIR)/tkAppInit.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(UNIX_DIR)/tkAppInit.c + $(CC) -c $(APP_CC_SWITCHES) $(UNIX_DIR)/tkAppInit.c tk3d.o: $(GENERIC_DIR)/tk3d.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tk3d.c @@ -1034,7 +1035,7 @@ tkScrollbar.o: $(GENERIC_DIR)/tkScrollbar.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScrollbar.c tkSquare.o: $(GENERIC_DIR)/tkSquare.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkSquare.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkSquare.c tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c @@ -1088,10 +1089,10 @@ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c tkOldTest.o: $(GENERIC_DIR)/tkOldTest.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkOldTest.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkOldTest.c tkTest.o: $(GENERIC_DIR)/tkTest.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkTest.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkTest.c tkText.o: $(GENERIC_DIR)/tkText.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkText.c @@ -1283,7 +1284,7 @@ tkMacOSXSubwindows.o: $(MAC_OSX_DIR)/tkMacOSXSubwindows.c $(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXSubwindows.c tkMacOSXTest.o: $(MAC_OSX_DIR)/tkMacOSXTest.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(MAC_OSX_DIR)/tkMacOSXTest.c + $(CC) -c $(APP_CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXTest.c tkMacOSXWindowEvent.o: $(MAC_OSX_DIR)/tkMacOSXWindowEvent.c $(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXWindowEvent.c diff --git a/unix/configure b/unix/configure index 437f3b4..49f2b44 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TK_BUILD_EXP_FILE TK_EXP_FILE TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TK_BUILD_EXP_FILE TK_EXP_FILE TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -9991,11 +9991,13 @@ echo "${ECHO_T}static library" >&6 fi TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' ac_config_files="$ac_config_files Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in" + EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' fi if test "$FRAMEWORK_BUILD" = "1" ; then @@ -10163,6 +10165,7 @@ TK_SHARED_BUILD=${SHARED_BUILD} + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in tkConfig.sh:../unix/tkConfig.sh.in" cat >confcache <<\_ACEOF @@ -10901,6 +10904,7 @@ s,@TK_LIBRARY@,$TK_LIBRARY,;t t s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t s,@HTML_DIR@,$HTML_DIR,;t t s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t diff --git a/unix/configure.in b/unix/configure.in index dbe8911..a0e05ff 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.134.2.3 2007/07/01 17:31:40 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.134.2.4 2007/09/04 17:44:25 dgp Exp $ AC_INIT([tk],[8.5]) AC_PREREQ(2.59) @@ -529,10 +529,12 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc' if test "`uname -s`" = "Darwin" ; then SC_ENABLE_FRAMEWORK TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' AC_CONFIG_FILES([Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in]) + EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' fi if test "$FRAMEWORK_BUILD" = "1" ; then @@ -690,6 +692,7 @@ AC_SUBST(PRIVATE_INCLUDE_DIR) AC_SUBST(HTML_DIR) AC_SUBST(EXTRA_CC_SWITCHES) +AC_SUBST(EXTRA_APP_CC_SWITCHES) AC_SUBST(EXTRA_INSTALL) AC_SUBST(EXTRA_INSTALL_BINARIES) AC_SUBST(EXTRA_BUILD_HTML) diff --git a/win/rules.vc b/win/rules.vc index 496bb0a..b4a76ad 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2006 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.15 2007/02/04 00:10:54 mistachkin Exp $ +# RCS: @(#) $Id: rules.vc,v 1.15.2.1 2007/09/04 17:44:26 dgp Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -50,6 +50,7 @@ CFG_ENCODING = \"cp1252\" !if "$(OS)" == "Windows_NT" RMDIR = rmdir /S /Q +ERRNULL = 2>NUL !if ![ver | find "4.0" > nul] CPY = echo y | xcopy /i >NUL COPY = copy >NUL @@ -61,9 +62,10 @@ COPY = copy /y >NUL CPY = xcopy /i >_JUNK.OUT # On Win98 NUL does not work here. COPY = copy >_JUNK.OUT # On Win98 NUL does not work here. RMDIR = deltree /Y +NULL = \NUL # Used in testing directory existence +ERRNULL = >NUL # Win9x shell cannot redirect stderr !endif MKDIR = mkdir -COPY = copy /y >NUL !message =============================================================================== @@ -187,16 +189,19 @@ LINKERFLAGS =-ltcg _VC_MANIFEST_EMBED_EXE= _VC_MANIFEST_EMBED_DLL= -!if ![cl /Zs /Tc NUL 2>&1 | find "Version 12" > NUL] -VCVER=6 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 13" > NUL] -VCVER=7 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 14" > NUL] +VCVER=0 +!if ![echo VCVERSION=_MSC_VER > vercl.x] \ + && ![cl -nologo -TC -P vercl.x $(ERRNULL)] +!include vercl.i +!if $(VCVERSION) >= 1400 VCVER=8 _VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!else -VCVER=0 +!elseif $(VCVERSION) >= 1300 +VCVER=7 +!elseif $(VCVERSION) >= 1200 +VCVER=6 +!endif !endif #---------------------------------------------------------- diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 1da6aae..dd07ea5 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.44 2007/01/11 15:35:40 dkf Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.44.2.1 2007/09/04 17:44:26 dgp Exp $ * */ @@ -2007,11 +2007,10 @@ Tk_MessageBoxObjCmd( { Tk_Window tkwin, parent; HWND hWnd; - char *message, *title, *detail; + Tcl_Obj *messageObj, *titleObj, *detailObj, *tmpObj; int defaultBtn, icon, type; int i, oldMode, winCode; UINT flags; - Tcl_DString messageString, titleString; Tcl_Encoding unicodeEncoding = TkWinGetUnicodeEncoding(); static CONST char *optionStrings[] = { "-default", "-detail", "-icon", "-message", @@ -2027,11 +2026,11 @@ Tk_MessageBoxObjCmd( tkwin = (Tk_Window) clientData; defaultBtn = -1; - detail = NULL; + detailObj = NULL; icon = MB_ICONINFORMATION; - message = NULL; + messageObj = NULL; parent = tkwin; - title = NULL; + titleObj = NULL; type = MB_OK; for (i = 1; i < objc; i += 2) { @@ -2053,7 +2052,6 @@ Tk_MessageBoxObjCmd( return TCL_ERROR; } - string = Tcl_GetString(valuePtr); switch ((enum options) index) { case MSG_DEFAULT: defaultBtn = TkFindStateNumObj(interp, optionPtr, buttonMap, @@ -2064,7 +2062,7 @@ Tk_MessageBoxObjCmd( break; case MSG_DETAIL: - detail = string; + detailObj = valuePtr; break; case MSG_ICON: @@ -2075,18 +2073,18 @@ Tk_MessageBoxObjCmd( break; case MSG_MESSAGE: - message = string; + messageObj = valuePtr; break; case MSG_PARENT: - parent = Tk_NameToWindow(interp, string, tkwin); + parent = Tk_NameToWindow(interp, Tcl_GetString(valuePtr), tkwin); if (parent == NULL) { return TCL_ERROR; } break; case MSG_TITLE: - title = string; + titleObj = valuePtr; break; case MSG_TYPE: @@ -2130,24 +2128,12 @@ Tk_MessageBoxObjCmd( flags |= icon | type | MB_SYSTEMMODAL; - Tcl_UtfToExternalDString(unicodeEncoding, message, -1, &messageString); - if (detail != NULL) { - Tcl_DString detailString; - - if (message != NULL) { - Tcl_UtfToExternalDString(unicodeEncoding, "\n\n", -1, - &detailString); - Tcl_DStringAppend(&messageString, Tcl_DStringValue(&detailString), - Tcl_DStringLength(&detailString)); - Tcl_DStringFree(&detailString); - } - Tcl_UtfToExternalDString(unicodeEncoding, detail, -1, - &detailString); - Tcl_DStringAppend(&messageString, Tcl_DStringValue(&detailString), - Tcl_DStringLength(&detailString)); - Tcl_DStringFree(&detailString); + tmpObj = messageObj ? Tcl_DuplicateObj(messageObj) : Tcl_NewUnicodeObj(NULL, 0); + Tcl_IncrRefCount(tmpObj); + if (detailObj) { + Tcl_AppendUnicodeToObj(tmpObj, L"\n\n", 2); + Tcl_AppendObjToObj(tmpObj, detailObj); } - Tcl_UtfToExternalDString(unicodeEncoding, title, -1, &titleString); oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL); @@ -2164,8 +2150,8 @@ Tk_MessageBoxObjCmd( tsdPtr->hBigIcon = TkWinGetIcon(parent, ICON_BIG); tsdPtr->hMsgBoxHook = SetWindowsHookEx(WH_CBT, MsgBoxCBTProc, NULL, GetCurrentThreadId()); - winCode = MessageBoxW(hWnd, (WCHAR *) Tcl_DStringValue(&messageString), - (WCHAR *) Tcl_DStringValue(&titleString), flags); + winCode = MessageBoxW(hWnd, Tcl_GetUnicode(tmpObj), + titleObj ? Tcl_GetUnicode(titleObj) : NULL, flags); UnhookWindowsHookEx(tsdPtr->hMsgBoxHook); (void) Tcl_SetServiceMode(oldMode); @@ -2177,8 +2163,7 @@ Tk_MessageBoxObjCmd( EnableWindow(hWnd, 1); - Tcl_DStringFree(&messageString); - Tcl_DStringFree(&titleString); + Tcl_DecrRefCount(tmpObj); Tcl_SetResult(interp, TkFindStateString(buttonMap, winCode), TCL_STATIC); return TCL_OK; diff --git a/win/tkWinTest.c b/win/tkWinTest.c index d73f159..444094c 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.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: tkWinTest.c,v 1.12 2007/01/18 23:56:44 nijtmans Exp $ + * RCS: @(#) $Id: tkWinTest.c,v 1.12.2.1 2007/09/04 17:44:26 dgp Exp $ */ #include "tkWinInt.h" @@ -27,6 +27,12 @@ static int TestclipboardObjCmd(ClientData clientData, Tcl_Obj *CONST objv[]); static int TestwineventCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST char **argv); +static int TestfindwindowObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *CONST objv[]); +static int TestgetwindowinfoObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *CONST objv[]); MODULE_SCOPE int TkplatformtestInit(Tcl_Interp *interp); @@ -59,6 +65,10 @@ TkplatformtestInit( (ClientData) Tk_MainWindow(interp), NULL); Tcl_CreateCommand(interp, "testwinevent", TestwineventCmd, (ClientData) Tk_MainWindow(interp), NULL); + Tcl_CreateObjCommand(interp, "testfindwindow", TestfindwindowObjCmd, + (ClientData) Tk_MainWindow(interp), NULL); + Tcl_CreateObjCommand(interp, "testgetwindowinfo", TestgetwindowinfoObjCmd, + (ClientData) Tk_MainWindow(interp), NULL); return TCL_OK; } @@ -232,6 +242,7 @@ TestwineventCmd( CONST char **argv) /* Argument strings. */ { HWND hwnd = 0; + HWND child = 0; int id; char *rest; UINT message; @@ -243,6 +254,7 @@ TestwineventCmd( {WM_CHAR, "WM_CHAR"}, {WM_GETTEXT, "WM_GETTEXT"}, {WM_SETTEXT, "WM_SETTEXT"}, + {WM_COMMAND, "WM_COMMAND"}, {-1, NULL} }; @@ -282,7 +294,6 @@ TestwineventCmd( id = strtol(argv[2], &rest, 0); if (rest == argv[2]) { - HWND child; char buf[256]; child = GetWindow(hwnd, GW_CHILD); @@ -331,6 +342,16 @@ TestwineventCmd( Tcl_DStringFree(&ds); break; } + case WM_COMMAND: { + char buf[TCL_INTEGER_SPACE]; + if (argc < 5) { + wParam = MAKEWPARAM(id, 0); + lParam = (LPARAM)child; + } + sprintf(buf, "%d", SendMessage(hwnd, message, wParam, lParam)); + Tcl_SetResult(interp, buf, TCL_VOLATILE); + break; + } default: { char buf[TCL_INTEGER_SPACE]; @@ -344,6 +365,118 @@ TestwineventCmd( } /* + * testfindwindow title ?class? + * Find a Windows window using the FindWindow API call. This takes the window + * title and optionally the window class and if found returns the HWND and + * raises an error if the window is not found. + * eg: testfindwindow Console TkTopLevel + * Can find the console window if it is visible. + * eg: testfindwindow "TkTest #10201" "#32770" + * Can find a messagebox window with this title. + */ + +static int +TestfindwindowObjCmd( + ClientData clientData, /* Main window for application. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *CONST objv[]) /* Argument values. */ +{ + TkWindow *winPtr = (TkWindow *) clientData; + const char *title = NULL, *class = NULL; + HWND hwnd = NULL; + int r = TCL_OK; + + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "title ?class?"); + return TCL_ERROR; + } + title = Tcl_GetString(objv[1]); + if (objc == 3) + class = Tcl_GetString(objv[2]); + hwnd = FindWindowA(class, title); + + if (hwnd == NULL) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to find window: ", -1)); + AppendSystemError(interp, GetLastError()); + r = TCL_ERROR; + } else { + Tcl_SetObjResult(interp, Tcl_NewLongObj((long)hwnd)); + } + return r; + +} + +static BOOL CALLBACK +EnumChildrenProc(HWND hwnd, LPARAM lParam) +{ + Tcl_Obj *listObj = (Tcl_Obj *)lParam; + Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewLongObj((long)hwnd)); + return TRUE; +} + +static int +TestgetwindowinfoObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[]) +{ + HWND hwnd = NULL; + Tcl_Obj *resObj = NULL, *classObj = NULL, *textObj = NULL; + Tcl_Obj *childrenObj = NULL; + char buf[512]; + int cch, cchBuf = tkWinProcs->useWide ? 256 : 512; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "hwnd"); + return TCL_ERROR; + } + + if (Tcl_GetLongFromObj(interp, objv[1], (long *)&hwnd) != TCL_OK) + return TCL_ERROR; + + if (tkWinProcs->useWide) { + cch = GetClassNameW(hwnd, (LPWSTR)buf, sizeof(buf)/sizeof(WCHAR)); + classObj = Tcl_NewUnicodeObj((LPWSTR)buf, cch); + } else { + cch = GetClassNameA(hwnd, (LPSTR)buf, sizeof(buf)); + classObj = Tcl_NewStringObj((LPSTR)buf, cch); + } + if (cch == 0) { + Tcl_SetResult(interp, "failed to get class name: ", TCL_STATIC); + AppendSystemError(interp, GetLastError()); + return TCL_ERROR; + } + + resObj = Tcl_NewListObj(0, NULL); + Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("class", -1)); + Tcl_ListObjAppendElement(interp, resObj, classObj); + + Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("id", -1)); + Tcl_ListObjAppendElement(interp, resObj, + Tcl_NewLongObj(GetWindowLong(hwnd, GWL_ID))); + + cch = tkWinProcs->getWindowText(hwnd, (LPTSTR)buf, cchBuf); + if (tkWinProcs->useWide) { + textObj = Tcl_NewUnicodeObj((LPCWSTR)buf, cch); + } else { + textObj = Tcl_NewStringObj((LPCSTR)buf, cch); + } + + Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("text", -1)); + Tcl_ListObjAppendElement(interp, resObj, textObj); + + childrenObj = Tcl_NewListObj(0, NULL); + EnumChildWindows(hwnd, EnumChildrenProc, (LPARAM)childrenObj); + Tcl_ListObjAppendElement(interp, resObj, Tcl_NewStringObj("children", -1)); + Tcl_ListObjAppendElement(interp, resObj, childrenObj); + + Tcl_SetObjResult(interp, resObj); + return TCL_OK; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 |