From 4c78685e73acbddd7853c0b9a531f3b21eccedd0 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 25 Sep 2003 05:37:48 +0000 Subject: * library/demos/widget: don't create iconwindow on aqua, but add about menu like on classic. * macosx/Makefile: pass MAKEOVERRIDES to pxbuild. * macosx/tkMacOSXButton.c: added -compound support for bevel buttons. --- ChangeLog | 13 ++++++++++--- library/demos/widget | 6 +++--- macosx/Makefile | 4 ++-- macosx/tkMacOSXButton.c | 22 +++++++++++++++++++++- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e46497..41d2d3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2003-09-25 Daniel Steffen + + * library/demos/widget: don't create iconwindow on aqua, but add + about menu like on classic. + * macosx/Makefile: pass MAKEOVERRIDES to pxbuild. + * macosx/tkMacOSXButton.c: added -compound support for bevel buttons. + 2003-09-17 Don Porter - * generic/tkImage.c: Stopped [image create] from generating an - * tests/image.test: image command name that would overwrite an - existing command name. Thanks to Michael Schlenker. [Bug 808039]. + * generic/tkImage.c: Stopped [image create] from generating an + * tests/image.test: image command name that would overwrite an + existing command name. Thanks to Michael Schlenker. [Bug 808039]. 2003-08-19 Joe English * generic/tkPanedWindow.c(PanedWindowWorldChanged): diff --git a/library/demos/widget b/library/demos/widget index 33c7843..7795851 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -11,11 +11,11 @@ exec wish "$0" "$@" # ".tcl" files is this directory, which are sourced by this script # as needed. # -# RCS: @(#) $Id: widget,v 1.9 2003/02/19 16:13:15 dkf Exp $ +# RCS: @(#) $Id: widget,v 1.9.2.1 2003/09/25 05:37:48 das Exp $ eval destroy [winfo child .] wm title . "Widget Demonstration" -if {$tcl_platform(platform) eq "unix"} { +if {[tk windowingsystem] eq "x11"} { # This won't work everywhere, but there's no other way in core Tk # at the moment to display a coloured icon. image create photo TclPowered \ @@ -47,7 +47,7 @@ menu .menuBar -tearoff 0 menu .menuBar.file -tearoff 0 # On the Mac use the specia .apple menu for the about item -if {[string equal [tk windowingsystem] "classic"]} { +if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} { .menuBar add cascade -menu .menuBar.apple menu .menuBar.apple -tearoff 0 .menuBar.apple add command -label "About..." -command "aboutBox" diff --git a/macosx/Makefile b/macosx/Makefile index bb5adf6..e4f029a 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -3,7 +3,7 @@ # Simple makefile for building on Mac OS X with the # Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.7.2.2 2003/07/18 01:06:33 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.3 2003/09/25 05:37:48 das Exp $ # ################################################################################ @@ -25,7 +25,7 @@ PBXBUILD = /usr/bin/pbxbuild BUILD = ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \ TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \ - TCLSH_DIR="${TCLSH_DIR}" + TCLSH_DIR="${TCLSH_DIR}" ${MAKEOVERRIDES} DEVBUILD = ${BUILD} -buildstyle "${DEVBUILDSTYLE}" DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 2366e01..749b4ef 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.2 2003/04/30 16:19:07 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.3 2003/09/25 05:37:48 das Exp $ */ #include "tkButton.h" @@ -1171,6 +1171,26 @@ SetupBevelButton( "SetControlData BevelButtonGraphicAlign failed, %d\n", err ); } + if (butPtr->compound != COMPOUND_NONE) { + ControlButtonTextPlacement thePlacement = \ + kControlBevelButtonPlaceNormally; + if (butPtr->compound == COMPOUND_TOP) { + thePlacement = kControlBevelButtonPlaceBelowGraphic; + } else if (butPtr->compound == COMPOUND_BOTTOM) { + thePlacement = kControlBevelButtonPlaceAboveGraphic; + } else if (butPtr->compound == COMPOUND_LEFT) { + thePlacement = kControlBevelButtonPlaceToRightOfGraphic; + } else if (butPtr->compound == COMPOUND_RIGHT) { + thePlacement = kControlBevelButtonPlaceToLeftOfGraphic; + } + if ((err=SetControlData(controlHandle, kControlButtonPart, + kControlBevelButtonTextPlaceTag, + sizeof(ControlButtonTextPlacement), + (char *) &thePlacement)) != noErr ) { + fprintf(stderr, + "SetControlData BevelButtonTextPlace failed, %d\n", err ); + } + } } /* -- cgit v0.12