summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-02-02 09:50:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-02-02 09:50:46 (GMT)
commit0547516d16dcfe830857541e6be7c9316bfe8a61 (patch)
treefa9bd81e01ecbd861cd680d3afca85e27da45259
parent21453c373d9fc6b7f57826ff0ab4a90ba629c68a (diff)
downloadtk-0547516d16dcfe830857541e6be7c9316bfe8a61.zip
tk-0547516d16dcfe830857541e6be7c9316bfe8a61.tar.gz
tk-0547516d16dcfe830857541e6be7c9316bfe8a61.tar.bz2
Remove unnecessary end-of-line spacing
-rw-r--r--generic/ttk/ttkGenStubs.tcl6
-rw-r--r--library/button.tcl4
-rw-r--r--library/choosedir.tcl4
-rw-r--r--library/clrpick.tcl22
-rw-r--r--library/comdlg.tcl6
-rw-r--r--library/console.tcl8
-rw-r--r--library/dialog.tcl2
-rw-r--r--library/entry.tcl4
-rw-r--r--library/fontchooser.tcl2
-rw-r--r--library/mkpsenc.tcl6
-rw-r--r--library/msgbox.tcl6
-rw-r--r--library/palette.tcl10
-rw-r--r--library/scrlbar.tcl2
-rw-r--r--library/spinbox.tcl4
-rw-r--r--library/tearoff.tcl2
-rw-r--r--library/tk.tcl8
-rw-r--r--library/unsupported.tcl2
-rw-r--r--library/xmfbox.tcl28
-rw-r--r--macosx/tkMacOSXButton.c66
-rw-r--r--macosx/tkMacOSXInit.c4
-rw-r--r--macosx/tkMacOSXMenubutton.c82
-rw-r--r--macosx/tkMacOSXScrlbr.c36
22 files changed, 157 insertions, 157 deletions
diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl
index 034f405..56ba2fa 100644
--- a/generic/ttk/ttkGenStubs.tcl
+++ b/generic/ttk/ttkGenStubs.tcl
@@ -12,7 +12,7 @@
#
# SOURCE: tcl/tools/genStubs.tcl, revision 1.44
#
-# CHANGES:
+# CHANGES:
# + Second argument to "declare" is used as a status guard
# instead of a platform guard.
# + Allow trailing semicolon in function declarations
@@ -678,7 +678,7 @@ proc genStubs::addGuard {status text} {
set upName [string toupper $libraryName]
switch -- $status {
- current {
+ current {
# No change
}
deprecated {
@@ -691,7 +691,7 @@ proc genStubs::addGuard {status text} {
puts stderr "Unrecognized status code $status"
}
}
- return $text
+ return $text
}
proc genStubs::ifdeffed {macro text} {
diff --git a/library/button.tcl b/library/button.tcl
index c48515a..b2bafb2 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -17,7 +17,7 @@
#-------------------------------------------------------------------------
if {[tk windowingsystem] eq "aqua"} {
-
+
bind Radiobutton <Enter> {
tk::ButtonEnter %W
}
@@ -144,7 +144,7 @@ bind Radiobutton <Leave> {
if {"win32" eq [tk windowingsystem]} {
#########################
-# Windows implementation
+# Windows implementation
#########################
# ::tk::ButtonEnter --
diff --git a/library/choosedir.tcl b/library/choosedir.tcl
index c0ab326..68dd9b0 100644
--- a/library/choosedir.tcl
+++ b/library/choosedir.tcl
@@ -122,7 +122,7 @@ proc ::tk::dialog::file::chooseDir:: {args} {
# Return value to user
#
-
+
return $Priv(selectFilePath)
}
@@ -164,7 +164,7 @@ proc ::tk::dialog::file::chooseDir::Config {dataName argList} {
if {$data(-title) eq ""} {
set data(-title) "[mc "Choose Directory"]"
}
-
+
# Stub out the -multiple value for the dialog; it doesn't make sense for
# choose directory dialogs, but we have to have something there because we
# share so much code with the file dialogs.
diff --git a/library/clrpick.tcl b/library/clrpick.tcl
index 3772a30..600be16 100644
--- a/library/clrpick.tcl
+++ b/library/clrpick.tcl
@@ -12,7 +12,7 @@
#
# (1): Find out how many free colors are left in the colormap and
# don't allocate too many colors.
-# (2): Implement HSV color selection.
+# (2): Implement HSV color selection.
#
# Make sure namespaces exist
@@ -54,11 +54,11 @@ proc ::tk::dialog::color:: {args} {
set data(BARS_WIDTH) 160
# PLGN_WIDTH is the number of pixels wide of the triangular selection
- # polygon. This also results in the definition of the padding on the
+ # polygon. This also results in the definition of the padding on the
# left and right sides which is half of PLGN_WIDTH. Make this number even.
set data(PLGN_HEIGHT) 10
- # PLGN_HEIGHT is the height of the selection polygon and the height of the
+ # PLGN_HEIGHT is the height of the selection polygon and the height of the
# selection rectangle at the bottom of the color bar. No restrictions.
set data(PLGN_WIDTH) 10
@@ -328,7 +328,7 @@ proc ::tk::dialog::color::BuildDialog {w} {
# Sets the current selection of the dialog box
#
proc ::tk::dialog::color::SetRGBValue {w color} {
- upvar ::tk::dialog::color::[winfo name $w] data
+ upvar ::tk::dialog::color::[winfo name $w] data
set data(red,intensity) [lindex $color 0]
set data(green,intensity) [lindex $color 1]
@@ -368,7 +368,7 @@ proc ::tk::dialog::color::RgbToX {w color} {
}
# ::tk::dialog::color::DrawColorScale --
-#
+#
# Draw color scale is called whenever the size of one of the color
# scale canvases is changed.
#
@@ -507,7 +507,7 @@ proc ::tk::dialog::color::RedrawColorBars {w colorChanged} {
upvar ::tk::dialog::color::[winfo name $w] data
switch $colorChanged {
- red {
+ red {
DrawColorScale $w green
DrawColorScale $w blue
}
@@ -537,7 +537,7 @@ proc ::tk::dialog::color::RedrawColorBars {w colorChanged} {
# Handles a mousedown button event over the selector polygon.
# Adds the bindings for moving the mouse while the button is
# pressed. Sets the binding for the button-release event.
-#
+#
# Params: sel is the selector canvas window, color is the color of the strip.
#
proc ::tk::dialog::color::StartMove {w sel color x delta {dontMove 0}} {
@@ -549,7 +549,7 @@ proc ::tk::dialog::color::StartMove {w sel color x delta {dontMove 0}} {
}
# ::tk::dialog::color::MoveSelector --
-#
+#
# Moves the polygon selector so that its middle point has the same
# x value as the specified x. If x is outside the bounds [0,255],
# the selector is set to the closest endpoint.
@@ -583,7 +583,7 @@ proc ::tk::dialog::color::MoveSelector {w sel color x delta} {
# x is the x-coord of the mouse.
#
proc ::tk::dialog::color::ReleaseMouse {w sel color x delta} {
- upvar ::tk::dialog::color::[winfo name $w] data
+ upvar ::tk::dialog::color::[winfo name $w] data
set x [MoveSelector $w $sel $color $x $delta]
@@ -602,7 +602,7 @@ proc ::tk::dialog::color::ResizeColorBars {w} {
upvar ::tk::dialog::color::[winfo name $w] data
if {
- ($data(BARS_WIDTH) < $data(NUM_COLORBARS)) ||
+ ($data(BARS_WIDTH) < $data(NUM_COLORBARS)) ||
(($data(BARS_WIDTH) % $data(NUM_COLORBARS)) != 0)
} then {
set data(BARS_WIDTH) $data(NUM_COLORBARS)
@@ -660,7 +660,7 @@ proc ::tk::dialog::color::HandleRGBEntry {w} {
SetRGBValue $w "$data(red,intensity) \
$data(green,intensity) $data(blue,intensity)"
-}
+}
# mouse cursor enters a color bar
#
diff --git a/library/comdlg.tcl b/library/comdlg.tcl
index f89754c..18df8a6 100644
--- a/library/comdlg.tcl
+++ b/library/comdlg.tcl
@@ -180,7 +180,7 @@ proc ::tk::FocusGroup_Destroy {t w} {
if {$t eq $w} {
unset Priv(fg,$t)
- unset Priv(focus,$t)
+ unset Priv(focus,$t)
foreach name [array names FocusIn $t,*] {
unset FocusIn($name)
@@ -277,7 +277,7 @@ proc ::tk::FDGetFileTypes {string} {
continue
}
- # Validate each macType. This is to agree with the
+ # Validate each macType. This is to agree with the
# behaviour of TkGetFileFilters(). This list may be
# empty.
foreach macType [lindex $t 2] {
@@ -286,7 +286,7 @@ proc ::tk::FDGetFileTypes {string} {
"bad Macintosh file type \"$macType\""
}
}
-
+
set name "$label \("
set sep ""
set doAppend 1
diff --git a/library/console.tcl b/library/console.tcl
index e93a39d..566140f 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -311,7 +311,7 @@ proc ::tk::ConsoleHistory {cmd} {
# ::tk::ConsolePrompt --
# This procedure draws the prompt. If tcl_prompt1 or tcl_prompt2
-# exists in the main interpreter it will be called to generate the
+# exists in the main interpreter it will be called to generate the
# prompt. Otherwise, a hard coded default prompt is printed.
#
# Arguments:
@@ -781,7 +781,7 @@ proc ::tk::console::TagProc w {
# c2 - second char of pair
#
# Calls: ::tk::console::Blink
-
+
proc ::tk::console::MatchPair {w c1 c2 {lim 1.0}} {
if {!$::tk::console::magicKeys} {
return
@@ -836,7 +836,7 @@ proc ::tk::console::MatchPair {w c1 c2 {lim 1.0}} {
# w - console text widget
#
# Calls: ::tk::console::Blink
-
+
proc ::tk::console::MatchQuote {w {lim 1.0}} {
if {!$::tk::console::magicKeys} {
return
@@ -971,7 +971,7 @@ proc ::tk::console::Expand {w {type ""}} {
#
# Returns: list containing longest unique match followed by all the
# possible further matches
-
+
proc ::tk::console::ExpandPathname str {
set pwd [EvalAttached pwd]
if {[catch {EvalAttached [list cd [file dirname $str]]} err opt]} {
diff --git a/library/dialog.tcl b/library/dialog.tcl
index 6a9babb..22c4dd3 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -149,7 +149,7 @@ proc ::tk_dialog {w title text bitmap default args} {
# so we know how big it wants to be, then center the window in the
# display (Motif style) and de-iconify it.
- ::tk::PlaceWindow $w
+ ::tk::PlaceWindow $w
tkwait visibility $w
# 7. Set a grab and claim the focus too.
diff --git a/library/entry.tcl b/library/entry.tcl
index f28547e..c8422dc 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -69,8 +69,8 @@ bind Entry <<PasteSelection>> {
}
bind Entry <<TraverseIn>> {
- %W selection range 0 end
- %W icursor end
+ %W selection range 0 end
+ %W icursor end
}
# Standard Motif bindings:
diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl
index 8b3f87e..8f91ade 100644
--- a/library/fontchooser.tcl
+++ b/library/fontchooser.tcl
@@ -105,7 +105,7 @@ proc ::tk::fontchooser::Configure {args} {
"bad option \"$option\": must be\
-command, -font, -parent, -title or -visible"
}
-
+
set cache [dict create -parent $S(-parent) -title $S(-title) \
-font $S(-font) -command $S(-command)]
set r [tclParseConfigSpec [namespace which -variable S] $specs "" $args]
diff --git a/library/mkpsenc.tcl b/library/mkpsenc.tcl
index 50224eb..b3fd13d 100644
--- a/library/mkpsenc.tcl
+++ b/library/mkpsenc.tcl
@@ -1163,11 +1163,11 @@ namespace eval ::tk {
0 exch 0 exch
{
dup type /stringtype eq
- { stringwidth } {
+ { stringwidth } {
currentfont /Encoding get exch 1 exch put (\001)
- stringwidth
+ stringwidth
}
- ifelse
+ ifelse
exch 3 1 roll add 3 1 roll add exch
} forall
}
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index 10e91f1..939928d 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -137,7 +137,7 @@ proc ::tk::MessageBox {args} {
#
# The default value of the title is space (" ") not the empty string
- # because for some window managers, a
+ # because for some window managers, a
# wm title .foo ""
# causes the window title to be "foo" instead of the empty string.
#
@@ -175,7 +175,7 @@ proc ::tk::MessageBox {args} {
}
switch -- $data(-type) {
- abortretryignore {
+ abortretryignore {
set names [list abort retry ignore]
set labels [list &Abort &Retry &Ignore]
set cancel abort
@@ -218,7 +218,7 @@ proc ::tk::MessageBox {args} {
lappend buttons [list $name -text [mc $lab]]
}
- # If no default button was specified, the default default is the
+ # If no default button was specified, the default default is the
# first button (Bug: 2218).
if {$data(-default) eq ""} {
diff --git a/library/palette.tcl b/library/palette.tcl
index 924dd61..9cecf5b 100644
--- a/library/palette.tcl
+++ b/library/palette.tcl
@@ -100,7 +100,7 @@ proc ::tk_setPalette {args} {
set new(troughColor) $darkerBg
}
- # let's make one of each of the widgets so we know what the
+ # let's make one of each of the widgets so we know what the
# defaults are currently for this platform.
toplevel .___tk_set_palette
wm withdraw .___tk_set_palette
@@ -113,12 +113,12 @@ proc ::tk_setPalette {args} {
}
# Walk the widget hierarchy, recoloring all existing windows.
- # The option database must be set according to what we do here,
- # but it breaks things if we set things in the database while
+ # The option database must be set according to what we do here,
+ # but it breaks things if we set things in the database while
# we are changing colors...so, ::tk::RecolorTree now returns the
# option database changes that need to be made, and they
# need to be evalled here to take effect.
- # We have to walk the whole widget tree instead of just
+ # We have to walk the whole widget tree instead of just
# relying on the widgets we've created above to do the work
# because different extensions may provide other kinds
# of widgets that we don't currently know about, so we'll
@@ -144,7 +144,7 @@ proc ::tk_setPalette {args} {
# ::tk::RecolorTree --
# This procedure changes the colors in a window and all of its
# descendants, according to information provided by the colors
-# argument. This looks at the defaults provided by the option
+# argument. This looks at the defaults provided by the option
# database, if it exists, and if not, then it looks at the default
# value of the widget itself.
#
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index 688d40a..e17442f 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -14,7 +14,7 @@
# The code below creates the default class bindings for scrollbars.
#-------------------------------------------------------------------------
-# Standard Motif bindings:
+# Standard Motif bindings:
if {[tk windowingsystem] eq "x11" || [tk windowingsystem] eq "aqua"} {
bind Scrollbar <Enter> {
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 641584d..4d94420 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -74,8 +74,8 @@ bind Spinbox <<PasteSelection>> {
}
bind Spinbox <<TraverseIn>> {
- %W selection range 0 end
- %W icursor end
+ %W selection range 0 end
+ %W icursor end
}
# Standard Motif bindings:
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 6da2a0f..b500023 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -150,7 +150,7 @@ proc ::tk::MenuDup {src dst type} {
set tags [bindtags $src]
set srcLen [string length $src]
-
+
# Copy tags to x, replacing each substring of src with dst.
while {[set index [string first $src $tags]] != -1} {
diff --git a/library/tk.tcl b/library/tk.tcl
index b7d85c4..4a53f99 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -302,7 +302,7 @@ tk::ScreenChanged [winfo screen .]
proc ::tk::EventMotifBindings {n1 dummy dummy} {
upvar $n1 name
-
+
if {$name} {
set op delete
} else {
@@ -328,7 +328,7 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} {
}
#----------------------------------------------------------------------
-# Define common dialogs on platforms where they are not implemented
+# Define common dialogs on platforms where they are not implemented
# using compiled code.
#----------------------------------------------------------------------
@@ -543,7 +543,7 @@ proc ::tk::CancelRepeat {} {
# ::tk::TabToWindow --
# This procedure moves the focus to the given widget.
-# It sends a <<TraverseOut>> virtual event to the previous focus window,
+# It sends a <<TraverseOut>> virtual event to the previous focus window,
# if any, before changing the focus, and a <<TraverseIn>> event
# to the new focus window afterwards.
#
@@ -571,7 +571,7 @@ proc ::tk::UnderlineAmpersand {text} {
return [list [string map {\ufeff {}} $s] $idx]
}
-# ::tk::SetAmpText --
+# ::tk::SetAmpText --
# Given widget path and text with "magic ampersands", sets -text and
# -underline options for the widget
#
diff --git a/library/unsupported.tcl b/library/unsupported.tcl
index 2c68e78..b5f404a 100644
--- a/library/unsupported.tcl
+++ b/library/unsupported.tcl
@@ -16,7 +16,7 @@ namespace eval ::tk::unsupported {
# Map from the old global names of Tk private commands to their
# new namespace-encapsulated names.
- variable PrivateCommands
+ variable PrivateCommands
array set PrivateCommands {
tkButtonAutoInvoke ::tk::ButtonAutoInvoke
tkButtonDown ::tk::ButtonDown
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index 0578361..aa66f7f 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -27,7 +27,7 @@ namespace eval ::tk::dialog::file {}
# When -multiple is set to 0, this returns the absolute pathname
# of the selected file. (NOTE: This is not the same as a single
# element list.)
-#
+#
# When -multiple is set to > 0, this returns a Tcl list of absolute
# pathnames. The argument for -multiple is ignored, but for consistency
# with Windows it defines the maximum amount of memory to allocate for
@@ -505,7 +505,7 @@ proc ::tk::MotifFDialog_InterpFilter {w} {
if {[file pathtype $text] eq "relative"} {
set relative 1
} elseif {$badTilde} {
- set relative 1
+ set relative 1
}
if {$relative} {
@@ -552,7 +552,7 @@ proc ::tk::MotifFDialog_Update {w} {
$data(sEnt) delete 0 end
$data(sEnt) insert 0 [::tk::dialog::file::JoinFile $data(selectPath) \
$data(selectFile)]
-
+
MotifFDialog_LoadFiles $w
}
@@ -626,7 +626,7 @@ proc ::tk::MotifFDialog_LoadFiles {w} {
# w The pathname of the dialog box.
#
# Results:
-# None.
+# None.
proc ::tk::MotifFDialog_BrowseDList {w} {
upvar ::tk::dialog::file::[winfo name $w] data
@@ -672,7 +672,7 @@ proc ::tk::MotifFDialog_BrowseDList {w} {
# w The pathname of the dialog box.
#
# Results:
-# None.
+# None.
proc ::tk::MotifFDialog_ActivateDList {w} {
upvar ::tk::dialog::file::[winfo name $w] data
@@ -720,7 +720,7 @@ proc ::tk::MotifFDialog_ActivateDList {w} {
# w The pathname of the dialog box.
#
# Results:
-# None.
+# None.
proc ::tk::MotifFDialog_BrowseFList {w} {
upvar ::tk::dialog::file::[winfo name $w] data
@@ -740,9 +740,9 @@ proc ::tk::MotifFDialog_BrowseFList {w} {
$data(fEnt) insert 0 [::tk::dialog::file::JoinFile $data(selectPath) \
$data(filter)]
$data(fEnt) xview end
-
- # if it's a multiple selection box, just put in the filenames
- # otherwise put in the full path as usual
+
+ # if it's a multiple selection box, just put in the filenames
+ # otherwise put in the full path as usual
$data(sEnt) delete 0 end
if {$data(-multiple) != 0} {
$data(sEnt) insert 0 $data(selectFile)
@@ -762,7 +762,7 @@ proc ::tk::MotifFDialog_BrowseFList {w} {
# w The pathname of the dialog box.
#
# Results:
-# None.
+# None.
proc ::tk::MotifFDialog_ActivateFList {w} {
upvar ::tk::dialog::file::[winfo name $w] data
@@ -788,7 +788,7 @@ proc ::tk::MotifFDialog_ActivateFList {w} {
# w The pathname of the dialog box.
#
# Results:
-# None.
+# None.
proc ::tk::MotifFDialog_ActivateFEnt {w} {
upvar ::tk::dialog::file::[winfo name $w] data
@@ -803,7 +803,7 @@ proc ::tk::MotifFDialog_ActivateFEnt {w} {
# ::tk::MotifFDialog_ActivateSEnt --
#
# This procedure is called when the user presses Return inside
-# the "selection" entry. It sets the ::tk::Priv(selectFilePath)
+# the "selection" entry. It sets the ::tk::Priv(selectFilePath)
# variable so that the vwait loop in tk::MotifFDialog will be
# terminated.
#
@@ -811,7 +811,7 @@ proc ::tk::MotifFDialog_ActivateFEnt {w} {
# w The pathname of the dialog box.
#
# Results:
-# None.
+# None.
proc ::tk::MotifFDialog_ActivateSEnt {w} {
variable ::tk::Priv
@@ -930,7 +930,7 @@ proc ::tk::ListBoxKeyAccel_Unset {w} {
# key The key which the user just pressed.
#
# Results:
-# None.
+# None.
proc ::tk::ListBoxKeyAccel_Key {w key} {
variable ::tk::Priv
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 6cb4f56..a88cad0 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -7,8 +7,8 @@
* Copyright (c) 1996-1997 by Sun Microsystems, Inc.
* Copyright 2001, Apple Computer, Inc.
* Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2007 Revar Desmera.
- * Copyright 2015 Kevin Walzer/WordTech Communications LLC.
+ * Copyright 2007 Revar Desmera.
+ * Copyright 2015 Kevin Walzer/WordTech Communications LLC.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -230,7 +230,7 @@ TkpDisplayButton(
} else {
/* Draw the native portion of the buttons. */
TkMacOSXDrawButton(macButtonPtr, dpPtr->gc, pixmap);
-
+
/* Draw highlight border, if needed. */
if (butPtr->highlightWidth < 3) {
needhighlight = 1;
@@ -264,7 +264,7 @@ TkpDisplayButton(
*
*----------------------------------------------------------------------
*/
-
+
void
TkpComputeButtonGeometry(
TkButton *butPtr) /* Button whose geometry may have changed. */
@@ -311,7 +311,7 @@ TkpComputeButtonGeometry(
width = butPtr->width;
width += 0;
break;
- }
+ }
}
if (haveImage == 0 || butPtr->compound != COMPOUND_NONE) {
@@ -384,7 +384,7 @@ TkpComputeButtonGeometry(
} else {
width = txtWidth;
height = txtHeight;
-
+
if (butPtr->width > 0) {
width = butPtr->width * avgWidth;
}
@@ -396,7 +396,7 @@ TkpComputeButtonGeometry(
width += 2 * butPtr->padX;
height += 2 * butPtr->padY;
-
+
/* Need special handling for radiobuttons and checkbuttons: the text is drawn right on top of the button unless we expand the width. This is not perfect; some radiobuttons may render on top anyway. Need to find a better solution to calculate average text width.*/
switch (butPtr->type) {
case TYPE_RADIO_BUTTON:
@@ -406,7 +406,7 @@ TkpComputeButtonGeometry(
width += 50;
break;
}
-
+
/*
* Now figure out the size of the border decorations for the button.
*/
@@ -490,7 +490,7 @@ static void
DrawButtonImageAndText(
TkButton* butPtr)
{
-
+
MacButton *mbPtr = (MacButton*)butPtr;
Tk_Window tkwin = butPtr->tkwin;
Pixmap pixmap;
@@ -515,7 +515,7 @@ DrawButtonImageAndText(
DrawParams* dpPtr = &mbPtr->drawParams;
pixmap = (Pixmap)Tk_WindowId(tkwin);
-
+
if (butPtr->image != None) {
Tk_SizeOfImage(butPtr->image, &width, &height);
haveImage = 1;
@@ -531,7 +531,7 @@ DrawButtonImageAndText(
/* Offset bitmaps by a bit when the button is pressed. */
pressed = 1;
}
-
+
haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0);
if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) {
int x;
@@ -542,7 +542,7 @@ DrawButtonImageAndText(
fullHeight = 0;
switch ((enum compound) butPtr->compound) {
- case COMPOUND_TOP:
+ case COMPOUND_TOP:
case COMPOUND_BOTTOM: {
/* Image is above or below text */
if (butPtr->compound == COMPOUND_TOP) {
@@ -559,10 +559,10 @@ DrawButtonImageAndText(
}
case COMPOUND_LEFT:
case COMPOUND_RIGHT: {
- /*
- * Image is left or right of text
+ /*
+ * Image is left or right of text
*/
-
+
if (butPtr->compound == COMPOUND_LEFT) {
textXOffset = width + butPtr->padX;
} else {
@@ -576,10 +576,10 @@ DrawButtonImageAndText(
break;
}
case COMPOUND_CENTER: {
- /*
- * Image and text are superimposed
+ /*
+ * Image and text are superimposed
*/
-
+
fullWidth = (width > butPtr->textWidth ? width :
butPtr->textWidth);
fullHeight = (height > butPtr->textHeight ? height :
@@ -633,11 +633,11 @@ DrawButtonImageAndText(
XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0);
}
- Tk_DrawTextLayout(butPtr->display, pixmap,
+ Tk_DrawTextLayout(butPtr->display, pixmap,
dpPtr->gc, butPtr->textLayout,
x + textXOffset, y + textYOffset, 0, -1);
Tk_UnderlineTextLayout(butPtr->display, pixmap, dpPtr->gc,
- butPtr->textLayout,
+ butPtr->textLayout,
x + textXOffset, y + textYOffset,
butPtr->underline);
} else {
@@ -647,7 +647,7 @@ DrawButtonImageAndText(
TkComputeAnchor(butPtr->anchor, tkwin,
butPtr->padX + butPtr->borderWidth,
butPtr->padY + butPtr->borderWidth,
- width, height, &x, &y);
+ width, height, &x, &y);
if (dpPtr->relief == TK_RELIEF_SUNKEN) {
x += dpPtr->offset;
y += dpPtr->offset;
@@ -661,9 +661,9 @@ DrawButtonImageAndText(
}
imageXOffset += x;
imageYOffset += y;
-
+
if (butPtr->image != NULL) {
-
+
if ((butPtr->selectImage != NULL) &&
(butPtr->flags & SELECTED)) {
Tk_RedrawImage(butPtr->selectImage, 0, 0, width,
@@ -702,7 +702,7 @@ DrawButtonImageAndText(
butPtr->textWidth, butPtr->textHeight, &x, &y);
Tk_DrawTextLayout(butPtr->display, pixmap, dpPtr->gc,
butPtr->textLayout, x, y, 0, -1);
- }
+ }
break;
case TYPE_BUTTON:
case TYPE_LABEL:
@@ -757,7 +757,7 @@ DrawButtonImageAndText(
* Draw the border and traversal highlight last. This way, if the
* button's contents overflow they'll be covered up by the border.
*/
-
+
if (dpPtr->relief != TK_RELIEF_FLAT) {
int inset = butPtr->highlightWidth;
Tk_Draw3DRectangle(tkwin, pixmap, dpPtr->border, inset, inset,
@@ -765,7 +765,7 @@ DrawButtonImageAndText(
butPtr->borderWidth, dpPtr->relief);
}
}
-
+
}
@@ -803,7 +803,7 @@ TkpDestroyButton(
* TkMacOSXDrawButton --
*
* This function draws the tk button using Mac controls
- * In addition, this code may apply custom colors passed
+ * In addition, this code may apply custom colors passed
* in the TkButton.
*
* Results:
@@ -829,13 +829,13 @@ TkMacOSXDrawButton(
TkMacOSXDrawingContext dc;
DrawParams* dpPtr = &mbPtr->drawParams;
int useNewerHITools = 1;
-
+
winPtr = (TkWindow *)butPtr->tkwin;
TkMacOSXComputeButtonParams(butPtr, &mbPtr->btnkind, &mbPtr->drawinfo);
cntrRect = CGRectMake(winPtr->privatePtr->xOff, winPtr->privatePtr->yOff, Tk_Width(butPtr->tkwin),Tk_Height(butPtr->tkwin));
-
+
cntrRect = CGRectInset(cntrRect, butPtr->inset, butPtr->inset);
if (useNewerHITools == 1) {
@@ -847,7 +847,7 @@ TkMacOSXDrawButton(
if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) {
return;
}
-
+
if (mbPtr->btnkind == kThemePushButton) {
/*
@@ -874,14 +874,14 @@ TkMacOSXDrawButton(
HIThemeDrawButton(&cntrRect, &hiinfo, dc.context, kHIThemeOrientationNormal, &contHIRec);
TkMacOSXRestoreDrawingContext(&dc);
-
+
ButtonContentDrawCB(&contHIRec, mbPtr->btnkind, &mbPtr->drawinfo, (MacButton *)mbPtr, 32, true);
} else {
if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) {
return;
}
-
+
TkMacOSXRestoreDrawingContext(&dc);
}
mbPtr->lastdrawinfo = mbPtr->drawinfo;
@@ -1111,7 +1111,7 @@ TkMacOSXComputeButtonParams(
} else {
drawinfo->value = kThemeButtonOff;
}
-
+
if ((mbPtr->flags & FIRST_DRAW) != 0) {
mbPtr->flags &= ~FIRST_DRAW;
if (Tk_MacOSXIsAppInFront()) {
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 219efd1..6a881d3 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -1,5 +1,5 @@
/*
- * tkMacOSXInit.c --
+ * tkMacOSXInit.c --
*
* This file contains Mac OS X -specific interpreter initialization
* functions.
@@ -31,7 +31,7 @@ static char scriptPath[PATH_MAX + 1] = "";
int tkMacOSXGCEnabled = 0;
long tkMacOSXMacOSXVersion = 0;
-#pragma mark TKApplication(TKInit)
+#pragma mark TKApplication(TKInit)
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
#define NSTextInputContextKeyboardSelectionDidChangeNotification @"NSTextInputContextKeyboardSelectionDidChangeNotification"
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index a1c3138..71ad803 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -7,8 +7,8 @@
* Copyright (c) 1996 by Sun Microsystems, Inc.
* Copyright 2001, Apple Computer, Inc.
* Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2007 Revar Desmera.
- * Copyright 2015 Kevin Walzer/WordTech Communications LLC.
+ * Copyright 2007 Revar Desmera.
+ * Copyright 2015 Kevin Walzer/WordTech Communications LLC.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -138,12 +138,12 @@ TkpDisplayMenuButton(
pixmap = (Pixmap) Tk_WindowId(tkwin);
TkMacOSXComputeMenuButtonDrawParams(butPtr, dpPtr);
-
- /*
+
+ /*
* set up clipping region. Make sure the we are using the port
- * for this button, or we will set the wrong window's clip.
+ * for this button, or we will set the wrong window's clip.
*/
-
+
TkMacOSXSetUpClippingRgn(pixmap);
/* Draw the native portion of the buttons. */
@@ -214,7 +214,7 @@ TkpComputeMenuButtonGeometry(butPtr)
/*
* First figure out the size of the contents of the button.
*/
-
+
width = 0;
height = 0;
txtWidth = 0;
@@ -255,36 +255,36 @@ TkpComputeMenuButtonGeometry(butPtr)
switch ((enum compound) butPtr->compound) {
case COMPOUND_TOP:
case COMPOUND_BOTTOM: {
- /*
- * Image is above or below text
+ /*
+ * Image is above or below text
*/
-
+
height += txtHeight + butPtr->padY;
width = (width > txtWidth ? width : txtWidth);
break;
}
case COMPOUND_LEFT:
case COMPOUND_RIGHT: {
- /*
- * Image is left or right of text
+ /*
+ * Image is left or right of text
*/
-
+
width += txtWidth + butPtr->padX;
height = (height > txtHeight ? height : txtHeight);
break;
}
case COMPOUND_CENTER: {
- /*
- * Image and text are superimposed
+ /*
+ * Image and text are superimposed
*/
-
+
width = (width > txtWidth ? width : txtWidth);
height = (height > txtHeight ? height : txtHeight);
break;
}
case COMPOUND_NONE: {break;}
}
-
+
if (butPtr->width > 0) {
width = butPtr->width;
}
@@ -316,11 +316,11 @@ TkpComputeMenuButtonGeometry(butPtr)
/*Add padding for button arrows.*/
width += 22;
-
+
/*
* Now figure out the size of the border decorations for the button.
*/
-
+
if (butPtr->highlightWidth < 0) {
butPtr->highlightWidth = 0;
}
@@ -351,7 +351,7 @@ TkpComputeMenuButtonGeometry(butPtr)
/* Pad to fill difference between content bounds and button bounds. */
paddingx = tmpRect.origin.x - contBounds.origin.x;
paddingy = tmpRect.origin.y - contBounds.origin.y;
-
+
if (paddingx > 0) {
width += paddingx;
}
@@ -406,7 +406,7 @@ DrawMenuButtonImageAndText(
if (tkwin == NULL || !Tk_IsMapped(tkwin)) {
return;
}
-
+
DrawParams* dpPtr = &mbPtr->drawParams;
pixmap = (Pixmap)Tk_WindowId(tkwin);
@@ -426,7 +426,7 @@ DrawMenuButtonImageAndText(
/* Offset bitmaps by a bit when the button is pressed. */
pressed = 1;
}
-
+
haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0);
if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) {
int x = 0;
@@ -437,7 +437,7 @@ DrawMenuButtonImageAndText(
fullHeight = 0;
switch ((enum compound) butPtr->compound) {
- case COMPOUND_TOP:
+ case COMPOUND_TOP:
case COMPOUND_BOTTOM: {
/* Image is above or below text */
if (butPtr->compound == COMPOUND_TOP) {
@@ -454,10 +454,10 @@ DrawMenuButtonImageAndText(
}
case COMPOUND_LEFT:
case COMPOUND_RIGHT: {
- /*
- * Image is left or right of text
+ /*
+ * Image is left or right of text
*/
-
+
if (butPtr->compound == COMPOUND_LEFT) {
textXOffset = width + butPtr->padX - 2;
} else {
@@ -471,10 +471,10 @@ DrawMenuButtonImageAndText(
break;
}
case COMPOUND_CENTER: {
- /*
- * Image and text are superimposed
+ /*
+ * Image and text are superimposed
*/
-
+
fullWidth = (width > butPtr->textWidth ? width :
butPtr->textWidth);
fullHeight = (height > butPtr->textHeight ? height :
@@ -508,11 +508,11 @@ DrawMenuButtonImageAndText(
XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0);
}
- Tk_DrawTextLayout(butPtr->display, pixmap,
+ Tk_DrawTextLayout(butPtr->display, pixmap,
dpPtr->gc, butPtr->textLayout,
x + textXOffset, y + textYOffset, 0, -1);
Tk_UnderlineTextLayout(butPtr->display, pixmap, dpPtr->gc,
- butPtr->textLayout,
+ butPtr->textLayout,
x + textXOffset, y + textYOffset,
butPtr->underline);
} else {
@@ -522,10 +522,10 @@ DrawMenuButtonImageAndText(
TkComputeAnchor(butPtr->anchor, tkwin,
butPtr->padX + butPtr->borderWidth,
butPtr->padY + butPtr->borderWidth,
- width, height, &x, &y);
+ width, height, &x, &y);
imageXOffset += x;
imageYOffset += y;
-
+
if (butPtr->image != NULL) {
Tk_RedrawImage(butPtr->image, 0, 0, width, height,
pixmap, imageXOffset, imageYOffset);
@@ -552,7 +552,7 @@ DrawMenuButtonImageAndText(
}
}
-
+
/*
*--------------------------------------------------------------
@@ -560,7 +560,7 @@ DrawMenuButtonImageAndText(
* TkMacOSXDrawMenuButton --
*
* This function draws the tk menubutton using Mac controls
- * In addition, this code may apply custom colors passed
+ * In addition, this code may apply custom colors passed
* in the TkMenubutton.
*
* Results:
@@ -578,7 +578,7 @@ TkMacOSXDrawMenuButton(
* the bevel button */
Pixmap pixmap) /* The pixmap we are drawing into - needed
* for the bevel button */
-
+
{
TkMenuButton * butPtr = ( TkMenuButton *)mbPtr;
TkWindow * winPtr;
@@ -588,11 +588,11 @@ TkMacOSXDrawMenuButton(
int useNewerHITools = 1;
winPtr = (TkWindow *)butPtr->tkwin;
-
+
TkMacOSXComputeMenuButtonParams(butPtr, &mbPtr->btnkind, &mbPtr->drawinfo);
cntrRect = CGRectMake(winPtr->privatePtr->xOff, winPtr->privatePtr->yOff, Tk_Width(butPtr->tkwin),Tk_Height(butPtr->tkwin));
-
+
cntrRect = CGRectInset(cntrRect, butPtr->inset, butPtr->inset);
@@ -628,7 +628,7 @@ TkMacOSXDrawMenuButton(
if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) {
return;
}
-
+
TkMacOSXRestoreDrawingContext(&dc);
}
@@ -781,7 +781,7 @@ TkMacOSXComputeMenuButtonParams(TkMenuButton * butPtr, ThemeButtonKind* btnkind,
}
drawinfo->value = kThemeButtonOff;
-
+
if ((mbPtr->flags & FIRST_DRAW) != 0) {
mbPtr->flags &= ~FIRST_DRAW;
if (Tk_MacOSXIsAppInFront()) {
@@ -832,7 +832,7 @@ TkMacOSXComputeMenuButtonParams(TkMenuButton * butPtr, ThemeButtonKind* btnkind,
static int
TkMacOSXComputeMenuButtonDrawParams(TkMenuButton * butPtr, DrawParams * dpPtr)
{
- dpPtr->hasImageOrBitmap = ((butPtr->image != NULL)
+ dpPtr->hasImageOrBitmap = ((butPtr->image != NULL)
|| (butPtr->bitmap != None));
dpPtr->border = butPtr->normalBorder;
if ((butPtr->state == STATE_DISABLED) && (butPtr->disabledFg != NULL)) {
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index afb8e52..fbf268b 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -1,5 +1,5 @@
/*
- * tkMacOSXScrollbar.c --
+ * tkMacOSXScrollbar.c --
*
* This file implements the Macintosh specific portion of the scrollbar
* widget.
@@ -34,7 +34,7 @@
typedef struct MacScrollbar {
TkScrollbar information; /* Generic scrollbar info. */
GC troughGC; /* For drawing trough. */
- GC copyGC; /* Used for copying from pixmap onto screen. */
+ GC copyGC; /* Used for copying from pixmap onto screen. */
} MacScrollbar;
/*
@@ -110,7 +110,7 @@ TkpCreateScrollbar(
TkWindow *winPtr = (TkWindow *)tkwin;
Tk_CreateEventHandler(tkwin,ExposureMask|StructureNotifyMask|FocusChangeMask|ButtonPressMask|VisibilityChangeMask, ScrollbarEventProc, scrollPtr);
-
+
return (TkScrollbar *) scrollPtr;
}
@@ -153,7 +153,7 @@ TkpDisplayScrollbar(
CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0,
.ty = viewHeight};
-
+
scrollPtr->flags &= ~REDRAW_PENDING;
if (!scrollPtr->tkwin || !Tk_IsMapped(tkwin) || !view ||
!TkMacOSXSetupDrawingContext((Drawable) macWin, NULL, 1, &dc)) {
@@ -187,11 +187,11 @@ TkpDisplayScrollbar(
Tk_Width(tkwin) - 2*scrollPtr->inset,
Tk_Height(tkwin) - 2*scrollPtr->inset, 0, TK_RELIEF_FLAT);
- /*Update values and draw in native rect.*/
+ /*Update values and draw in native rect.*/
UpdateControlValues(scrollPtr);
HIThemeDrawTrack (&info, 0, dc.context, kHIThemeOrientationNormal);
TkMacOSXRestoreDrawingContext(&dc);
-
+
scrollPtr->flags &= ~REDRAW_PENDING;
}
@@ -278,7 +278,7 @@ TkpComputeScrollbarGeometry(
Tk_GeometryRequest(scrollPtr->tkwin, 2 * (scrollPtr->arrowLength + scrollPtr->borderWidth + scrollPtr->inset) + metrics[variant].minThumbHeight, scrollPtr->width + 2 * scrollPtr->inset);
}
Tk_SetInternalBorder(scrollPtr->tkwin, scrollPtr->inset);
-
+
}
/*
@@ -366,7 +366,7 @@ TkpScrollbarPosition(
{
/*Using code from tkUnixScrlbr.c because Unix scroll bindings are driving the display at the script level. All the Mac scrollbar has to do is re-draw itself.*/
-
+
int length, width, tmp;
register const int inset = scrollPtr->inset;
@@ -411,8 +411,8 @@ TkpScrollbarPosition(
* UpdateControlValues --
*
* This procedure updates the Macintosh scrollbar control to display the
- * values defined by the Tk scrollbar. This is the key interface to the Mac-native * scrollbar; the Unix bindings drive scrolling in the Tk window and all the Mac
- * scrollbar has to do is redraw itself.
+ * values defined by the Tk scrollbar. This is the key interface to the Mac-native * scrollbar; the Unix bindings drive scrolling in the Tk window and all the Mac
+ * scrollbar has to do is redraw itself.
*
* Results:
* None.
@@ -427,12 +427,12 @@ static void
UpdateControlValues(
TkScrollbar *scrollPtr) /* Scrollbar data struct. */
{
-
+
Tk_Window tkwin = scrollPtr->tkwin;
MacDrawable *macWin = (MacDrawable *) Tk_WindowId(scrollPtr->tkwin);
double dViewSize;
HIRect contrlRect;
- int variant, active;
+ int variant, active;
short width, height;
NSView *view = TkMacOSXDrawableView(macWin);
@@ -445,22 +445,22 @@ UpdateControlValues(
contrlRect = NSRectToCGRect(frame);
info.bounds = contrlRect;
-
+
width = contrlRect.size.width;
height = contrlRect.size.height;
variant = contrlRect.size.width < metrics[0].width ? 1 : 0;
-
+
/*
* Ensure we set scrollbar control bounds only once all size adjustments
* have been computed.
- */
+ */
info.bounds = contrlRect;
if (!scrollPtr->vertical) {
info.attributes |= kThemeTrackHorizontal;
}
-
+
/*
* Given the Tk parameters for the fractions of the start and end of the
* thumb, the following calculation determines the location for the
@@ -483,7 +483,7 @@ UpdateControlValues(
} else {
info.value = MIN_SCROLLBAR_VALUE + factor * scrollPtr->firstFraction;
}
-
+
if((scrollPtr->firstFraction <= 0.0 && scrollPtr->lastFraction >= 1.0)
|| height <= metrics[variant].minHeight) {
info.enableState = kThemeTrackHideTrack;
@@ -510,7 +510,7 @@ ScrollbarPress(TkScrollbar *scrollPtr, XEvent *eventPtr)
{
if (eventPtr->type == ButtonPress) {
- UpdateControlValues(scrollPtr);
+ UpdateControlValues(scrollPtr);
return TCL_OK;
}
}