summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkMenubutton.c5
-rw-r--r--generic/tkMenubutton.h1
-rw-r--r--generic/tkScale.c6
-rw-r--r--generic/tkText.h2
-rw-r--r--generic/tkTextImage.c1
-rw-r--r--generic/tkTextWind.c3
-rw-r--r--tests/entry.test8
-rw-r--r--tests/frame.test6
-rw-r--r--tests/listbox.test8
-rw-r--r--tests/menubut.test2
-rw-r--r--tests/panedwindow.test8
-rw-r--r--tests/scale.test2
-rw-r--r--tests/spinbox.test8
-rw-r--r--tests/text.test18
14 files changed, 46 insertions, 32 deletions
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index 735df2a..f51e6ef 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -282,6 +282,11 @@ Tk_MenubuttonObjCmd(
mbPtr->cursor = NULL;
mbPtr->takeFocus = NULL;
mbPtr->flags = 0;
+ mbPtr->borderWidthPtr = NULL;
+ mbPtr->highlightWidthPtr = NULL;
+ mbPtr->padXPtr = NULL;
+ mbPtr->padYPtr = NULL;
+ mbPtr->wrapLengthPtr = NULL;
Tk_CreateEventHandler(mbPtr->tkwin,
ExposureMask|StructureNotifyMask|FocusChangeMask,
diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h
index f9b93dd..0414bb7 100644
--- a/generic/tkMenubutton.h
+++ b/generic/tkMenubutton.h
@@ -181,7 +181,6 @@ typedef struct {
Tcl_Obj *padXPtr;
Tcl_Obj *padYPtr;
Tcl_Obj *wrapLengthPtr;
- //Tcl_Obj *;
} TkMenuButton;
/*
diff --git a/generic/tkScale.c b/generic/tkScale.c
index ef7595e..3804c90 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -326,6 +326,12 @@ Tk_ScaleObjCmd(
scalePtr->cursor = NULL;
scalePtr->takeFocusPtr = NULL;
scalePtr->flags = NEVER_SET;
+ scalePtr->borderWidthPtr = NULL;
+ scalePtr->highlightWidthPtr = NULL;
+ scalePtr->lengthPtr = NULL;
+ scalePtr->sliderLengthPtr = NULL;
+ scalePtr->widthPtr = NULL;
+
Tk_SetClassProcs(scalePtr->tkwin, &scaleClass, scalePtr);
Tk_CreateEventHandler(scalePtr->tkwin,
diff --git a/generic/tkText.h b/generic/tkText.h
index 9070b32..dc06332 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -155,9 +155,9 @@ typedef struct TkTextEmbImage {
* in pixels. */
int chunkCount; /* Number of display chunks that refer to this
* image. */
+ Tcl_Obj *padXPtr, *padYPtr;
Tk_OptionTable optionTable; /* Token representing the configuration
* specifications. */
- Tcl_Obj *padXPtr, *padYPtr;
} TkTextEmbImage;
/*
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index d66009b..38d6c76 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -253,6 +253,7 @@ TkTextImageCmd(
eiPtr->body.ei.image = NULL;
eiPtr->body.ei.align = TK_ALIGN_CENTER;
eiPtr->body.ei.padX = eiPtr->body.ei.padY = 0;
+ eiPtr->body.ei.padXPtr = eiPtr->body.ei.padYPtr = NULL;
eiPtr->body.ei.chunkCount = 0;
eiPtr->body.ei.optionTable = Tk_CreateOptionTable(interp, optionSpecs);
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index cab335c..c28aaec 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -293,6 +293,9 @@ TkTextWindowCmd(
ewPtr->body.ew.create = NULL;
ewPtr->body.ew.align = TK_ALIGN_CENTER;
ewPtr->body.ew.padX = ewPtr->body.ew.padY = 0;
+ ewPtr->body.ew.padXPtr = ewPtr->body.ew.padYPtr = Tcl_NewIntObj(0);
+ Tcl_IncrRefCount(ewPtr->body.ew.padXPtr);
+ Tcl_IncrRefCount(ewPtr->body.ew.padYPtr);
ewPtr->body.ew.stretch = 0;
ewPtr->body.ew.optionTable = Tk_CreateOptionTable(interp, optionSpecs);
diff --git a/tests/entry.test b/tests/entry.test
index 1454104..7c8259f 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -110,7 +110,7 @@ test entry-1.7 {configuration option: "borderwidth" for entry} -setup {
.e cget -borderwidth
} -cleanup {
destroy .e
-} -result 1
+} -result 1.3
test entry-1.8 {configuration option: "borderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .e ; update idletasks
@@ -320,7 +320,7 @@ test entry-1.28 {configuration option: "highlightthickness" for entry} -setup {
.e cget -highlightthickness
} -cleanup {
destroy .e
-} -result 0
+} -result -2
test entry-1.29 {configuration option: "highlightthickness" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .e ; update idletasks
@@ -360,7 +360,7 @@ test entry-1.32 {configuration option: "insertborderwidth" for entry} -setup {
.e cget -insertborderwidth
} -cleanup {
destroy .e
-} -result 1
+} -result 1.3
test entry-1.33 {configuration option: "insertborderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .e ; update idletasks
@@ -513,7 +513,7 @@ test entry-1.47 {configuration option: "selectborderwidth" for entry} -setup {
.e cget -selectborderwidth
} -cleanup {
destroy .e
-} -result 1
+} -result 1.3
test entry-1.48 {configuration option: "selectborderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .e ; update idletasks
diff --git a/tests/frame.test b/tests/frame.test
index 74768e4..6dcbeaf 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -213,7 +213,7 @@ test frame-1.19 {frame configuration options} -body {
lindex [.f configure -borderwidth] 4
} -cleanup {
.f configure -borderwidth [lindex [.f configure -borderwidth] 3]
-} -result 1
+} -result 1.3
test frame-1.20 {frame configuration options} -body {
.f configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -514,7 +514,7 @@ test frame-2.25 {toplevel configuration options} -body {
test frame-2.26 {toplevel configuration options} -body {
.t configure -borderwidth 1.3
lindex [.t configure -borderwidth] 4
-} -result 1
+} -result 1.3
test frame-2.27 {toplevel configuration options} -body {
.t configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -1248,7 +1248,7 @@ test frame-13.16 {labelframe configuration options} -body {
lindex [.f configure -borderwidth] 4
} -cleanup {
.f configure -borderwidth [lindex [.f configure -borderwidth] 3]
-} -result 1
+} -result 1.3
test frame-13.17 {labelframe configuration options} -body {
.f configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
diff --git a/tests/listbox.test b/tests/listbox.test
index c02f389..ae7fba6 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -107,7 +107,7 @@ test listbox-1.9 {configuration options} -body {
list [lindex [.l configure -borderwidth] 4] [.l cget -borderwidth]
} -cleanup {
.l configure -borderwidth [lindex [.l configure -borderwidth] 3]
-} -result {1 1}
+} -result {1.3 1.3}
test listbox-1.10 {configuration options} -body {
.l configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -203,7 +203,7 @@ test listbox-1.31 {configuration options} -body {
list [lindex [.l configure -highlightthickness] 4] [.l cget -highlightthickness]
} -cleanup {
.l configure -highlightthickness [lindex [.l configure -highlightthickness] 3]
-} -result {0 0}
+} -result {-2 -2}
test listbox-1.32.1 {configuration options} -setup {
set res {}
} -body {
@@ -242,7 +242,7 @@ test listbox-1.37 {configuration options} -body {
list [lindex [.l configure -selectborderwidth] 4] [.l cget -selectborderwidth]
} -cleanup {
.l configure -selectborderwidth [lindex [.l configure -selectborderwidth] 3]
-} -result {1 1}
+} -result {1.3 1.3}
test listbox-1.38 {configuration options} -body {
.l configure -selectborderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -1242,7 +1242,7 @@ test listbox-4.2 {ConfigureListbox procedure} -setup {
.l cget -highlightthickness
} -cleanup {
deleteWindows
-} -result 0
+} -result -3
test listbox-4.3 {ConfigureListbox procedure} -setup {
deleteWindows
destroy .l
diff --git a/tests/menubut.test b/tests/menubut.test
index 21c0cf7..78e959f 100644
--- a/tests/menubut.test
+++ b/tests/menubut.test
@@ -98,7 +98,7 @@ test menubutton-1.15 {configuration options} -body {
.mb cget -borderwidth
} -cleanup {
.mb configure -borderwidth [lindex [.mb configure -borderwidth] 3]
-} -result 1
+} -result 1.3
test menubutton-1.16 {configuration options} -body {
.mb configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index 96ddce3..01f3c6b 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -49,7 +49,7 @@ test panedwindow-1.7 {configuration options: -borderwidth (good)} -body {
list [lindex [.p configure -borderwidth] 4] [.p cget -borderwidth]
} -cleanup {
.p configure -borderwidth [lindex [.p configure -borderwidth] 3]
-} -result {1 1}
+} -result {1.3 1.3}
test panedwindow-1.8 {configuration options: -borderwidth (bad)} -body {
.p configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -148,7 +148,7 @@ test panedwindow-1.29 {configuration options: -sashpad (good)} -body {
list [lindex [.p configure -sashpad] 4] [.p cget -sashpad]
} -cleanup {
.p configure -sashpad [lindex [.p configure -sashpad] 3]
-} -result {1 1}
+} -result {1.3 1.3}
test panedwindow-1.30 {configuration options: -sashpad (bad)} -body {
.p configure -sashpad badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -245,7 +245,7 @@ test panedwindow-1.49 {configuration options: -padx (good)} -body {
[.p panecget .b -padx]
} -cleanup {
.p paneconfig .b -padx [lindex [.p paneconfig .b -padx] 3]
-} -result {1 1}
+} -result {1.3 1.3}
test panedwindow-1.50 {configuration options: -padx (bad)} -body {
.p paneconfigure .b -padx badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -255,7 +255,7 @@ test panedwindow-1.51 {configuration options: -pady (good)} -body {
[.p panecget .b -pady]
} -cleanup {
.p paneconfig .b -pady [lindex [.p paneconfig .b -pady] 3]
-} -result {1 1}
+} -result {1.3 1.3}
test panedwindow-1.52 {configuration options: -pady (bad)} -body {
.p paneconfigure .b -pady badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
diff --git a/tests/scale.test b/tests/scale.test
index f08015e..d303c92 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -73,7 +73,7 @@ test scale-1.11 {configuration options} -body {
.s cget -borderwidth
} -cleanup {
.s configure -borderwidth [lindex [.s configure -borderwidth] 3]
-} -result 1
+} -result 1.3
test scale-1.12 {configuration options} -body {
.s configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 6cb52e9..6ce70d0 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -138,7 +138,7 @@ test spinbox-1.9 {configuration option: "borderwidth"} -setup {
.e cget -borderwidth
} -cleanup {
destroy .e
-} -result 1
+} -result 1.3
test spinbox-1.10 {configuration option: "borderwidth" for spinbox} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
-relief sunken
@@ -480,7 +480,7 @@ test spinbox-1.40 {configuration option: "highlightthickness"} -setup {
.e cget -highlightthickness
} -cleanup {
destroy .e
-} -result 0
+} -result -2
test spinbox-1.41 {configuration option: "increment"} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
@@ -536,7 +536,7 @@ test spinbox-1.45 {configuration option: "insertborderwidth"} -setup {
.e cget -insertborderwidth
} -cleanup {
destroy .e
-} -result 1
+} -result 1.3
test spinbox-1.46 {configuration option: "insertborderwidth" for spinbox} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
-relief sunken
@@ -758,7 +758,7 @@ test spinbox-1.65 {configuration option: "selectborderwidth"} -setup {
.e cget -selectborderwidth
} -cleanup {
destroy .e
-} -result 1
+} -result 1.3
test spinbox-1.66 {configuration option: "selectborderwidth" for spinbox} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
-relief sunken
diff --git a/tests/text.test b/tests/text.test
index 2303729..ce7b628 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -303,7 +303,7 @@ test text-1.29 {configuration option: "highlightthickness"} -setup {
.t cget -highlightthickness
} -cleanup {
destroy .t
-} -result 0
+} -result -2
test text-1.30 {configuration option: "highlightthickness"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -417,7 +417,7 @@ test text-1.41 {configuration option: "insertwidth"} -setup {
.t cget -insertwidth
} -cleanup {
destroy .t
-} -result 2
+} -result 2.3
test text-1.42 {configuration option: "insertwidth"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -464,7 +464,7 @@ test text-1.45 {configuration option: "padx"} -setup {
.t cget -padx
} -cleanup {
destroy .t
-} -result 3
+} -result 3.4
test text-1.46 {configuration option: "padx"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -597,7 +597,7 @@ test text-1.59 {configuration option: "spacing1"} -setup {
.t cget -spacing1
} -cleanup {
destroy .t
-} -result 0
+} -result -5
test text-1.60 {configuration option: "spacing1"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -635,7 +635,7 @@ test text-1.63 {configuration option: "spacing2"} -setup {
.t cget -spacing2
} -cleanup {
destroy .t
-} -result 0
+} -result -1
test text-1.64 {configuration option: "spacing2"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -673,7 +673,7 @@ test text-1.67 {configuration option: "spacing3"} -setup {
.t cget -spacing3
} -cleanup {
destroy .t
-} -result 0
+} -result -10
test text-1.68 {configuration option: "spacing3"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -3312,7 +3312,7 @@ test text-14.2 {ConfigureText procedure} -setup {
list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3]
} -cleanup {
destroy .t
-} -result {0 1 1}
+} -result {-2 1 1}
test text-14.3 {ConfigureText procedure} -setup {
text .t
} -body {
@@ -3320,7 +3320,7 @@ test text-14.3 {ConfigureText procedure} -setup {
list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3]
} -cleanup {
destroy .t
-} -result {1 0 1}
+} -result {1 -1 1}
test text-14.4 {ConfigureText procedure} -setup {
text .t
} -body {
@@ -3328,7 +3328,7 @@ test text-14.4 {ConfigureText procedure} -setup {
list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3]
} -cleanup {
destroy .t
-} -result {1 1 0}
+} -result {1 1 -3}
test text-14.5 {ConfigureText procedure} -setup {
text .t
} -body {