diff options
author | nijtmans <nijtmans> | 2010-02-17 19:21:15 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-02-17 19:21:15 (GMT) |
commit | 08118cf0531836d38a11540a687c8a92842014d5 (patch) | |
tree | 7e6bc8a3999b8bdb70d646dd25854cf5e389ba36 /carbon | |
parent | 98ad94bf967f4567ae47c4b74ffe11cc12f7d22f (diff) | |
download | tk-08118cf0531836d38a11540a687c8a92842014d5.zip tk-08118cf0531836d38a11540a687c8a92842014d5.tar.gz tk-08118cf0531836d38a11540a687c8a92842014d5.tar.bz2 |
CONSTify everything related to Tk_ConfigSpec
Diffstat (limited to 'carbon')
-rw-r--r-- | carbon/tkMacOSXScrlbr.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/carbon/tkMacOSXScrlbr.c b/carbon/tkMacOSXScrlbr.c index 6a9f5a1..21c5083 100644 --- a/carbon/tkMacOSXScrlbr.c +++ b/carbon/tkMacOSXScrlbr.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.2 2010/01/13 23:08:12 nijtmans Exp $ + * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.3 2010/02/17 19:21:17 nijtmans Exp $ */ #include "tkMacOSXPrivate.h" @@ -70,13 +70,6 @@ static ScrollbarMetrics metrics[2] = { }; /* - * This variable holds the default width for a scrollbar in string form for - * use in a Tk_ConfigSpec. - */ - -static char defWidth[TCL_INTEGER_SPACE]; - -/* * Forward declarations for procedures defined later in this file: */ @@ -127,7 +120,6 @@ TkMacOSXInitScrollbarMetrics(void) ThemeTrackDrawInfo info = {0, {0, 0, height, width}, 0, 1, 0, 0, kThemeTrackShowThumb, kThemeTrackActive, 0, {{1, 0}}}; Rect bounds; - Tk_ConfigSpec *specPtr; ChkErr(GetThemeMetric, kThemeMetricScrollBarWidth, &metrics[0].width); ChkErr(GetThemeMetric, kThemeMetricScrollBarMinThumbHeight, @@ -148,13 +140,7 @@ TkMacOSXInitScrollbarMetrics(void) metrics[1].minHeight = metrics[1].minThumbHeight + metrics[1].topArrowHeight + metrics[1].bottomArrowHeight; - sprintf(defWidth, "%ld", metrics[0].width); - for (specPtr = tkpScrollbarConfigSpecs; specPtr->type != TK_CONFIG_END; - specPtr++) { - if (specPtr->offset == Tk_Offset(TkScrollbar, width)) { - specPtr->defValue = defWidth; - } - } + sprintf(tkDefScrollbarWidth, "%ld", metrics[0].width); } /* |