diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | generic/tk.h | 15 | ||||
-rw-r--r-- | library/msgbox.tcl | 9 | ||||
-rw-r--r-- | mac/tkMacScale.c | 187 | ||||
-rw-r--r-- | unix/configure.in | 4 | ||||
-rw-r--r-- | unix/tk.spec | 6 | ||||
-rw-r--r-- | win/configure.in | 4 |
8 files changed, 48 insertions, 195 deletions
@@ -1,3 +1,17 @@ +2000-04-19 Jeff Hobbs <hobbs@scriptics.com> + + * README: + * generic/tk.h: + * unix/configure.in: + * unix/tk.spec: + * win/configure.in: bumped to version 8.3.1 + + * library/msgbox.tcl (tkMessageBox): changed to use grid in some + places, realign icon to anchor nw. + + * mac/tkMacScale.c: reverted tkMacScale.c to 1.5 equivalent (it + was accidentally bumped forward). + 2000-04-18 Eric Melski <ericm@scriptics.com> * win/tkWinPointer.c: Changed Mod2Mask in TkWinGetModifierState to @@ -1,11 +1,11 @@ README: Tk - This is the Tk 8.3.0 source distribution. + This is the Tk 8.3.1 source distribution. You can get any release of Tcl from: http://www.scriptics.com/registration/<version>.tml Tcl/Tk is also available through NetCVS: http://www.scriptics.com/products/tcltk/netcvs.html -RCS: @(#) $Id: README,v 1.23 2000/02/08 10:00:33 hobbs Exp $ +RCS: @(#) $Id: README,v 1.24 2000/04/19 09:25:52 hobbs Exp $ 1. Introduction --------------- diff --git a/generic/tk.h b/generic/tk.h index 7596e0b..d65b652 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -7,12 +7,12 @@ * Copyright (c) 1989-1994 The Regents of the University of California. * Copyright (c) 1994 The Australian National University. * Copyright (c) 1994-1998 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 Scriptics Corporation. + * Copyright (c) 1998-2000 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.38 2000/02/08 11:31:32 hobbs Exp $ + * RCS: @(#) $Id: tk.h,v 1.39 2000/04/19 09:25:53 hobbs Exp $ */ #ifndef _TK @@ -31,13 +31,14 @@ extern "C" { * and update the version numbers: * * library/tk.tcl (only if Major.minor changes, not patchlevel) - * unix/configure.in - * win/configure.in + * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch) + * win/configure.in (as above) * win/makefile.vc (not patchlevel) - * README + * README (sections 0 and 1) * mac/README (not patchlevel) * win/README (not patchlevel) * unix/README (not patchlevel) + * unix/tk.spec (3 LOC Major/Minor, 2 LOC patch) * win/aclocal.m4 (not patchlevel) * * You may also need to update some of these files when the numbers change @@ -47,10 +48,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 3 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 0 +#define TK_RELEASE_SERIAL 1 #define TK_VERSION "8.3" -#define TK_PATCH_LEVEL "8.3.0" +#define TK_PATCH_LEVEL "8.3.1" /* * The following definitions set up the proper options for Macintosh diff --git a/library/msgbox.tcl b/library/msgbox.tcl index f3df745..12857d5 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -3,7 +3,7 @@ # Implements messageboxes for platforms that do not have native # messagebox support. # -# RCS: @(#) $Id: msgbox.tcl,v 1.9 2000/04/18 02:18:33 ericm Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.10 2000/04/19 09:25:53 hobbs Exp $ # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -280,8 +280,7 @@ proc tkMessageBox {args} { option add *Dialog.msg.font {Times 18} widgetDefault } - label $w.msg -justify left -text $data(-message) - pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m + label $w.msg -anchor nw -justify left -text $data(-message) if {[string compare $data(-icon) ""]} { if {[string equal $tcl_platform(platform) "macintosh"] \ || ([winfo depth $w] < 4) || $tk_strictMotif} { @@ -320,8 +319,10 @@ proc tkMessageBox {args} { } } } - pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m } + grid $w.bitmap $w.msg -in $w.top -sticky news -padx 2m -pady 2m + grid columnconfigure $w.top 1 -weight 1 + grid rowconfigure $w.top 0 -weight 1 # 5. Create a row of buttons at the bottom of the dialog. diff --git a/mac/tkMacScale.c b/mac/tkMacScale.c index 2b23be5..4db06b2 100644 --- a/mac/tkMacScale.c +++ b/mac/tkMacScale.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: tkMacScale.c,v 1.6 2000/04/17 02:17:12 jingham Exp $ + * RCS: @(#) $Id: tkMacScale.c,v 1.7 2000/04/19 09:25:54 hobbs Exp $ */ #include "tkScale.h" @@ -161,7 +161,7 @@ TkpDisplayScale(clientData) if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->command != NULL)) { Tcl_Preserve((ClientData) interp); sprintf(string, scalePtr->format, scalePtr->value); - result = Tcl_VarEval(interp, scalePtr->commandPtr," ", string, + result = Tcl_VarEval(interp, scalePtr->command, " ", string, (char *) NULL); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (command executed by scale)"); @@ -236,12 +236,14 @@ TkpDisplayScale(clientData) * Apple releases the Copland version of the MacOS in late 1996. */ - (**macScalePtr->scaleHandle).contrlRect.left = macDraw->xOff + scalePtr->inset; - (**macScalePtr->scaleHandle).contrlRect.top = macDraw->yOff + scalePtr->inset; - (**macScalePtr->scaleHandle).contrlRect.right = macDraw->xOff + Tk_Width(tkwin) - - scalePtr->inset; - (**macScalePtr->scaleHandle).contrlRect.bottom = macDraw->yOff + - Tk_Height(tkwin) - scalePtr->inset; + (**macScalePtr->scaleHandle).contrlRect.left = macDraw->xOff + + scalePtr->inset; + (**macScalePtr->scaleHandle).contrlRect.top = macDraw->yOff + + scalePtr->inset; + (**macScalePtr->scaleHandle).contrlRect.right = macDraw->xOff + + Tk_Width(tkwin) - scalePtr->inset; + (**macScalePtr->scaleHandle).contrlRect.bottom = macDraw->yOff + + Tk_Height(tkwin) - scalePtr->inset; /* * Set the thumb and resolution etc. @@ -334,171 +336,6 @@ TkpScaleElement(scalePtr, x, y) /* *-------------------------------------------------------------- * - * TkpSetScaleValue -- - * - * This procedure changes the value of a scale and invokes - * a Tcl command to reflect the current position of a scale - * - * Results: - * None. - * - * Side effects: - * A Tcl command is invoked, and an additional error-processing - * command may also be invoked. The scale's slider is redrawn. - * - *-------------------------------------------------------------- - */ - -void -TkpSetScaleValue(scalePtr, value, setVar, invokeCommand) - register TkScale *scalePtr; /* Info about widget. */ - double value; /* New value for scale. Gets adjusted - * if it's off the scale. */ - int setVar; /* Non-zero means reflect new value through - * to associated variable, if any. */ - int invokeCommand; /* Non-zero means invoked -command option - * to notify of new value, 0 means don't. */ -{ - char string[PRINT_CHARS]; - - value = TkRoundToResolution(scalePtr, value); - if ((value < scalePtr->fromValue) - ^ (scalePtr->toValue < scalePtr->fromValue)) { - value = scalePtr->fromValue; - } - if ((value > scalePtr->toValue) - ^ (scalePtr->toValue < scalePtr->fromValue)) { - value = scalePtr->toValue; - } - if (scalePtr->flags & NEVER_SET) { - scalePtr->flags &= ~NEVER_SET; - } else if (scalePtr->value == value) { - return; - } - scalePtr->value = value; - if (invokeCommand) { - scalePtr->flags |= INVOKE_COMMAND; - } - TkEventuallyRedrawScale(scalePtr, REDRAW_SLIDER); - - if (setVar && (scalePtr->varNamePtr != NULL)) { - sprintf(string, scalePtr->format, scalePtr->value); - scalePtr->flags |= SETTING_VAR; - Tcl_ObjSetVar2(scalePtr->interp, scalePtr->varNamePtr, NULL, Tcl_NewStringObj(string, -1), - TCL_GLOBAL_ONLY); - scalePtr->flags &= ~SETTING_VAR; - } -} - -/* - *---------------------------------------------------------------------- - * - * TkpPixelToValue -- - * - * Given a pixel within a scale window, return the scale - * reading corresponding to that pixel. - * - * Results: - * A double-precision scale reading. If the value is outside - * the legal range for the scale then it's rounded to the nearest - * end of the scale. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -double -TkpPixelToValue(scalePtr, x, y) - register TkScale *scalePtr; /* Information about widget. */ - int x, y; /* Coordinates of point within - * window. */ -{ - double value, pixelRange; - - if (scalePtr->orient == ORIENT_VERTICAL) { - pixelRange = Tk_Height(scalePtr->tkwin) - scalePtr->sliderLength - - 2*scalePtr->inset - 2*scalePtr->borderWidth; - value = y; - } else { - pixelRange = Tk_Width(scalePtr->tkwin) - scalePtr->sliderLength - - 2*scalePtr->inset - 2*scalePtr->borderWidth; - value = x; - } - - if (pixelRange <= 0) { - /* - * Not enough room for the slider to actually slide: just return - * the scale's current value. - */ - - return scalePtr->value; - } - value -= scalePtr->sliderLength/2 + scalePtr->inset - + scalePtr->borderWidth; - value /= pixelRange; - if (value < 0) { - value = 0; - } - if (value > 1) { - value = 1; - } - value = scalePtr->fromValue + - value * (scalePtr->toValue - scalePtr->fromValue); - return TkRoundToResolution(scalePtr, value); -} - -/* - *---------------------------------------------------------------------- - * - * TkpValueToPixel -- - * - * Given a reading of the scale, return the x-coordinate or - * y-coordinate corresponding to that reading, depending on - * whether the scale is vertical or horizontal, respectively. - * - * Results: - * An integer value giving the pixel location corresponding - * to reading. The value is restricted to lie within the - * defined range for the scale. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -TkpValueToPixel(scalePtr, value) - register TkScale *scalePtr; /* Information about widget. */ - double value; /* Reading of the widget. */ -{ - int y, pixelRange; - double valueRange; - - valueRange = scalePtr->toValue - scalePtr->fromValue; - pixelRange = (scalePtr->orient == ORIENT_VERTICAL ? Tk_Height(scalePtr->tkwin) - : Tk_Width(scalePtr->tkwin)) - scalePtr->sliderLength - - 2*scalePtr->inset - 2*scalePtr->borderWidth; - if (valueRange == 0) { - y = 0; - } else { - y = (int) ((value - scalePtr->fromValue) * pixelRange - / valueRange + 0.5); - if (y < 0) { - y = 0; - } else if (y > pixelRange) { - y = pixelRange; - } - } - y += scalePtr->sliderLength/2 + scalePtr->inset + scalePtr->borderWidth; - return y; -} - -/* - *-------------------------------------------------------------- - * * MacScaleEventProc -- * * This procedure is invoked by the Tk dispatcher for @@ -553,7 +390,7 @@ MacScaleEventProc(clientData, eventPtr) * Update the value for the widget. */ macScalePtr->info.value = (**macScalePtr->scaleHandle).contrlValue; - /* TkpSetScaleValue(&macScalePtr->info, macScalePtr->info.value, 1, 0); */ + /* TkScaleSetValue(&macScalePtr->info, macScalePtr->info.value, 1, 0); */ /* * The TrackControl call will "eat" the ButtonUp event. We now @@ -594,7 +431,7 @@ ScaleActionProc(ControlRef theControl, ControlPartCode partCode) register TkScale *scalePtr = (TkScale *) GetCRefCon(theControl); value = (**theControl).contrlValue; - TkpSetScaleValue(scalePtr, value, 1, 1); + TkScaleSetValue(scalePtr, value, 1, 1); Tcl_Preserve((ClientData) scalePtr); Tcl_DoOneEvent(TCL_IDLE_EVENTS); Tcl_Release((ClientData) scalePtr); diff --git a/unix/configure.in b/unix/configure.in index 2745e97..1c13da1 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,12 +3,12 @@ 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. AC_INIT(../generic/tk.h) -# RCS: @(#) $Id: configure.in,v 1.48 2000/03/30 19:02:32 ericm Exp $ +# RCS: @(#) $Id: configure.in,v 1.49 2000/04/19 09:25:54 hobbs Exp $ TK_VERSION=8.3 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=3 -TK_PATCH_LEVEL=".0" +TK_PATCH_LEVEL=".1" VERSION=${TK_VERSION} if test "${prefix}" = "NONE"; then diff --git a/unix/tk.spec b/unix/tk.spec index a69a68d..839d3dc 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -1,7 +1,7 @@ -# $Id: tk.spec,v 1.1 2000/02/14 22:43:32 ericm Exp $ +# $Id: tk.spec,v 1.2 2000/04/19 09:25:54 hobbs Exp $ # This file is the basis for a binary Tk Linux RPM. -%define version 8.3.0 +%define version 8.3.1 %define directory /usr/local Summary: Tk graphical toolkit for the Tcl scripting language. @@ -14,7 +14,7 @@ Source: ftp://ftp.scriptics.com/pub/tcl/tcl8_3/tk%{version}.tar.gz URL: http://www.scriptics.com/ Packager: Scriptics Corporation Buildroot: /var/tmp/%{name}%{version} -Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.3.0 +Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.3.1 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/configure.in b/win/configure.in index 02aec2d..aa256d8 100644 --- a/win/configure.in +++ b/win/configure.in @@ -2,14 +2,14 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.15 2000/02/08 10:01:16 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.16 2000/04/19 09:25:54 hobbs Exp $ AC_INIT(../generic/tk.h) TK_VERSION=8.3 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=3 -TK_PATCH_LEVEL=".0" +TK_PATCH_LEVEL=".1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #-------------------------------------------------------------------- |