summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-02-17 19:21:15 (GMT)
committernijtmans <nijtmans>2010-02-17 19:21:15 (GMT)
commit08118cf0531836d38a11540a687c8a92842014d5 (patch)
tree7e6bc8a3999b8bdb70d646dd25854cf5e389ba36 /win
parent98ad94bf967f4567ae47c4b74ffe11cc12f7d22f (diff)
downloadtk-08118cf0531836d38a11540a687c8a92842014d5.zip
tk-08118cf0531836d38a11540a687c8a92842014d5.tar.gz
tk-08118cf0531836d38a11540a687c8a92842014d5.tar.bz2
CONSTify everything related to Tk_ConfigSpec
Diffstat (limited to 'win')
-rw-r--r--win/tkWinScrlbr.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index 9e848c7..b4f8259 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinScrlbr.c,v 1.19 2010/02/16 21:12:56 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinScrlbr.c,v 1.20 2010/02/17 19:21:17 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -357,23 +357,13 @@ void
UpdateScrollbarMetrics(void)
{
int arrowWidth = GetSystemMetrics(SM_CXVSCROLL);
- const Tk_ConfigSpec *specPtr;
hArrowWidth = GetSystemMetrics(SM_CXHSCROLL);
hThumb = GetSystemMetrics(SM_CXHTHUMB);
vArrowHeight = GetSystemMetrics(SM_CYVSCROLL);
vThumb = GetSystemMetrics(SM_CYVTHUMB);
- for (specPtr = tkpScrollbarConfigSpecs; specPtr->type != TK_CONFIG_END;
- specPtr++) {
- /* Make sure that the default value belonging to the "-width"
- * option of TkScrollbar points to static non-const space,
- * otherwise the following sprintf results in a crash!
- */
- if (specPtr->offset == Tk_Offset(TkScrollbar, width)) {
- sprintf((char *)specPtr->defValue, "%d", arrowWidth);
- }
- }
+ sprintf(tkDefScrollbarWidth, "%d", arrowWidth);
}
/*