Skip to content

Commit 32d8be3

Browse files
author
jan.nijtmans
committed
consistant use of mode: objc for OSX, strip spaces from the end of lines
2 parents 426c474 + 82c2300 commit 32d8be3

27 files changed

+205
-205
lines changed

ChangeLog

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
2012-09-17 Don Porter <[email protected]>
77

88
*** 8.6b2 TAGGED FOR RELEASE ***
9-
9+
1010
* macosx/tkMacOSXWm.c: [Bug 3567786] Stop segfault in [wm forget].
1111

1212
2012-09-15 Don Porter <[email protected]>
@@ -479,7 +479,7 @@
479479
2011-12-22 Don Porter <[email protected]>
480480

481481
* win/tkWinMenu.c: [Bug 3235256] Keep menu entry IDs out of system
482-
values. Thanks Colin McDonald.
482+
values. Thanks Colin McDonald.
483483

484484
2011-12-13 Donal K. Fellows <[email protected]>
485485

changes

+72-72
Large diffs are not rendered by default.

compat/unistd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define NULL 0
2424
#endif
2525

26-
/*
26+
/*
2727
* Strict POSIX stuff goes here. Extensions go down below, in the ifndef
2828
* _POSIX_SOURCE section.
2929
*/

license.terms

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ MODIFICATIONS.
2929

3030
GOVERNMENT USE: If you are acquiring this software on behalf of the
3131
U.S. government, the Government shall have only "Restricted Rights"
32-
in the software and related documentation as defined in the Federal
32+
in the software and related documentation as defined in the Federal
3333
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
3434
are acquiring the software on behalf of the Department of Defense, the
3535
software shall be classified as "Commercial Computer Software" and the

macosx/README

+10-10
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ available as an optional or default install on recent Mac OS X).
3232
TkAqua and TkX11 can be distinguished at runtime via [tk windowingsystem].
3333

3434
- At a minimum, Mac OS X 10.3 is required to run Tcl and TkX11.
35-
TkAqua requires Mac OS X 10.5 or later (starting with Tk 8.6b2).
35+
TkAqua requires Mac OS X 10.5 or later (starting with the Cocoa-based Tk 8.5.7).
3636

3737
- Unless weak-linking is used, Tcl/Tk built on Mac OS X 10.x will not run on
3838
10.y with y < x; on the other hand Tcl/Tk built on 10.y will always run on 10.x
@@ -105,7 +105,7 @@ normal scrollbar has a small dimension of 15, the small variant 11.
105105
Access to the small variant was added in Tk 8.4.2.
106106

107107
- The default metrics of native buttons, radiobuttons, checkboxes and
108-
menubuttons in the Cocoa-based Tk 8.6b2 and later preserve compatibility with
108+
menubuttons in the Cocoa-based Tk 8.5.7 and later preserve compatibility with
109109
the older Carbon-based implementation, you can turn off the compatibility
110110
metrics to get more native-looking spacing by setting:
111111
set tk::mac::useCompatibilityMetrics 0
@@ -127,13 +127,13 @@ where -kind is one of
127127
-systemType icon for given IconServices 4-char OSType
128128
-namedImage named NSImage for given name
129129
-imageFile image at given path
130-
This support was added with the Cocoa-based Tk 8.6b2.
130+
This support was added with the Cocoa-based Tk 8.5.7.
131131

132132
- TkAqua cursor names are interpred as follows (in order):
133133
- standard or platform-specific Tk cursor name (c.f. cursors.n)
134134
- @path to any image file readable by NSImage
135135
- NSImage named image name
136-
Support for the latter two was added with the Cocoa-based Tk 8.6b2.
136+
Support for the latter two was added with the Cocoa-based Tk 8.5.7.
137137

138138
- The standard Tk dialog commands [tk_getOpenFile], [tk_chooseDirectory],
139139
[tk_getSaveFile] and [tk_messageBox] all take an additional optional -command
@@ -142,15 +142,15 @@ the global level when the dialog closes, with the dialog command's result
142142
appended (the dialog command itself returning an emtpy result). If the -parent
143143
option is also present, the dialog is configured as a modeless (window-modal)
144144
sheet attached to the parent window and the dialog command returns immediately.
145-
Support for -command was added with the Cocoa-based Tk 8.6b2.
145+
Support for -command was added with the Cocoa-based Tk 8.5.7.
146146

147147
- The TkAqua-specific [tk::mac::standardAboutPanel] command brings the standard
148148
Cocoa about panel to the front, with all its information filled in from your
149149
application bundle files (i.e. standard about panel with no options specified).
150150
See Apple Technote TN2179 and the AppKit documentation for -[NSApplication
151151
orderFrontStandardAboutPanelWithOptions:] for details on the Info.plist keys and
152152
app bundle files used by the about panel.
153-
This support was added with the Cocoa-based Tk 8.6b2.
153+
This support was added with the Cocoa-based Tk 8.5.7.
154154

155155
- TkAqua has three special menu names that give access to the standard
156156
Application, Window and Help menus, see menu.n for details.
@@ -160,7 +160,7 @@ application's Info.plist (or displaying an alert if no Help Book is set). This
160160
action can be customized by defining a procedure named [tk::mac::ShowHelp], if
161161
present, this procedure is invoked instead by the standard Help menu item.
162162
Support for the Window menu and [tk::mac::ShowHelp] was added with the
163-
Cocoa-based Tk 8.6b2.
163+
Cocoa-based Tk 8.5.7.
164164

165165
- The TkAqua-specific command [tk::unsupported::MacWindowStyle style] is used to
166166
get and set Mac OS X-specific toplevel window class and attributes. Note that
@@ -179,12 +179,12 @@ Window attribute names:
179179
verticalZoom, closeBox, collapseBox, toolbarButton, sideTitlebar,
180180
noTitleBar, unifiedTitleAndToolbar, metal, hud, noShadow, doesNotCycle,
181181
noActivates, hideOnSuspend, inWindowMenu, ignoreClicks, doesNotHide,
182-
canJoinAllSpaces, moveToActiveSpace, nonActivating, black, dark, light,
182+
canJoinAllSpaces, moveToActiveSpace, nonActivating, black, dark, light,
183183
gray, red, green, blue, cyan, yellow, magenta, orange, purple,
184184
brown, clear, opacity
185185

186186
Note that not all attributes are valid for all window classes.
187-
Support for the 3 argument form was added with the Cocoa-based Tk 8.6b2, at the
187+
Support for the 3 argument form was added with the Cocoa-based Tk 8.5.7, at the
188188
same time support for some legacy Carbon-specific classes and attributes was
189189
removed (they are still accepted by the command but no longer have any effect).
190190

@@ -195,7 +195,7 @@ tk::unsupported::MacWindowStyle style .f document {metal light opaque closeBox c
195195

196196
pack [label .f.f -bg #ababab -text "This is a textured window\nwith opacity and a gray background\nsimilar to other Mac applications"] -fill both -expand yes
197197

198-
The color attributes correspond to system-defined NSColor constants (e.g., red is [NSColor redColor]. The "light" and "dark" attributes correspond to lightGrayColor and darkGrayColor, respectively (because of the way the attributes are parsed, using "lightgray" and "darkgray" would cause a conflict with the core "gray" attribute).
198+
The color attributes correspond to system-defined NSColor constants (e.g., red is [NSColor redColor]. The "light" and "dark" attributes correspond to lightGrayColor and darkGrayColor, respectively (because of the way the attributes are parsed, using "lightgray" and "darkgray" would cause a conflict with the core "gray" attribute).
199199

200200
Below are the corresponding hex and/or Tk-defined colors that can be used from Tk widgets to match the NSColor-based attributes:
201201

macosx/Wish.sdef

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
33
<!--
44
Copyright (c) 1997 Sun Microsystems, Inc.
5-
Copyright 2009 Kevin Walzer/WordTech Communications LLC.
5+
Copyright 2009 Kevin Walzer/WordTech Communications LLC.
66
Copyright (c) 2009 Daniel A. Steffen <[email protected]>
77
88
See the file "license.terms" for information on usage and redistribution of

macosx/configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
33
dnl generate the file "configure", which is run during Tk installation
44
dnl to configure the system for the local environment.
55

6-
dnl Ensure that the config (auto)headers support is used, then just
6+
dnl Ensure that the config (auto)headers support is used, then just
77
dnl include the configure sources from ../unix:
88

99
m4_include(../unix/aclocal.m4)

macosx/tkMacOSXCursor.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ FindCursorByName(
284284
kCGRenderingIntentDefault);
285285
CFRelease(provider);
286286
}
287-
provider = CGDataProviderCreateWithData(NULL, bitmap +
287+
provider = CGDataProviderCreateWithData(NULL, bitmap +
288288
pix*pix/8, pix*pix/8, NULL);
289289
if (provider) {
290290
mask = CGImageMaskCreate(pix, pix, 1, 1, pix/8, provider,

macosx/tkMacOSXDebug.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ TkMacOSXGetNamedDebugSymbol(
158158

159159
/*
160160
* Local Variables:
161-
* mode: c
161+
* mode: objc
162162
* c-basic-offset: 4
163163
* fill-column: 79
164164
* coding: utf-8

macosx/tkMacOSXDialog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ enum openOptions {
3333
};
3434
static const char *const saveOptionStrings[] = {
3535
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
36-
"-message", "-parent", "-title", "-typevariable", "-command",
36+
"-message", "-parent", "-title", "-typevariable", "-command",
3737
"-confirmoverwrite", NULL
3838
};
3939
enum saveOptions {

macosx/tkMacOSXEmbed.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ TkpCreateBusy(
11771177

11781178
/*
11791179
* Local Variables:
1180-
* mode: c
1180+
* mode: objc
11811181
* c-basic-offset: 4
11821182
* fill-column: 79
11831183
* coding: utf-8

macosx/tkMacOSXEntry.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ TkpDrawSpinboxButtons(
259259

260260
/*
261261
* Local Variables:
262-
* mode: c
262+
* mode: objc
263263
* c-basic-offset: 4
264264
* fill-column: 79
265265
* coding: utf-8

macosx/tkMacOSXInit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ TkpInit(
387387
Tcl_SetVar(interp, "auto_path", scriptPath,
388388
TCL_GLOBAL_ONLY|TCL_LIST_ELEMENT|TCL_APPEND_VALUE);
389389
}
390-
390+
391391
Tcl_CreateObjCommand(interp, "::tk::mac::standardAboutPanel",
392392
TkMacOSXStandardAboutPanelObjCmd, NULL, NULL);
393393
Tcl_CreateObjCommand(interp, "::tk::mac::iconBitmap",

macosx/tkMacOSXRegion.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ TkMacOSHIShapeUnion(
551551

552552
/*
553553
* Local Variables:
554-
* mode: c
554+
* mode: objc
555555
* c-basic-offset: 4
556556
* fill-column: 79
557557
* coding: utf-8

macosx/tkMacOSXScale.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ ScaleActionProc(
485485

486486
/*
487487
* Local Variables:
488-
* mode: c
488+
* mode: objc
489489
* c-basic-offset: 4
490490
* fill-column: 79
491491
* coding: utf-8

macosx/tkMacOSXSend.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ SendInit(
507507

508508
/*
509509
* Local Variables:
510-
* mode: c
510+
* mode: objc
511511
* c-basic-offset: 4
512512
* fill-column: 79
513513
* coding: utf-8

macosx/tkMacOSXTest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ DebuggerCmd(
8181

8282
/*
8383
* Local Variables:
84-
* mode: c
84+
* mode: objc
8585
* c-basic-offset: 4
8686
* fill-column: 79
8787
* coding: utf-8

macosx/tkMacOSXWindowEvent.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ GenerateUpdates(
343343
return 0;
344344
}
345345
HIShapeGetBounds(damageRgn, &damageBounds);
346-
346+
347347
CFRelease(damageRgn);
348348
CFRelease(boundsRgn);
349349

macosx/tkMacOSXWm.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -1657,14 +1657,14 @@ WmForgetCmd(
16571657
macWin = (MacDrawable *) winPtr->window;
16581658

16591659
TkFocusJoin(winPtr);
1660-
Tk_UnmapWindow(frameWin);
1660+
Tk_UnmapWindow(frameWin);
16611661

16621662
macWin->toplevel = winPtr->parentPtr->privatePtr->toplevel;
16631663
macWin->flags &= ~TK_HOST_EXISTS;
16641664

16651665
TkWmDeadWindow(winPtr);
16661666
RemapWindows(winPtr, (MacDrawable *) winPtr->parentPtr->window);
1667-
1667+
16681668
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
16691669

16701670
/*
@@ -5328,7 +5328,7 @@ WmWinStyle(
53285328

53295329
ApplyWindowAttributeFlagChanges(winPtr, NULL, oldAttributes, oldFlags,
53305330
0, 1);
5331-
5331+
53325332
return TCL_OK;
53335333

53345334
badClassAttrs:
@@ -5492,8 +5492,8 @@ TkMacOSXMakeRealWindowExist(
54925492
*/
54935493
[window setMovableByWindowBackground:NO];
54945494
}
5495-
5496-
5495+
5496+
54975497
/* Set background color and opacity of window if those flags are set. */
54985498
if (colorName != NULL) {
54995499
[window setBackgroundColor: colorName];
@@ -5502,7 +5502,7 @@ TkMacOSXMakeRealWindowExist(
55025502
if (opaqueTag != NULL) {
55035503
[window setOpaque: opaqueTag];
55045504
}
5505-
5505+
55065506
[window setDocumentEdited:NO];
55075507
wmPtr->window = window;
55085508
macWin->view = contentView;
@@ -6391,7 +6391,7 @@ TkMacOSXMakeFullscreen(
63916391
| NSApplicationPresentationAutoHideMenuBar];
63926392

63936393
} else {
6394-
wmPtr->flags &= ~WM_FULLSCREEN;
6394+
wmPtr->flags &= ~WM_FULLSCREEN;
63956395

63966396
[NSApp setPresentationOptions: prevPres];
63976397
[window setStyleMask: prevMask];

macosx/ttkMacOSXTheme.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2005 Neil Madden
88
* Copyright (c) 2006-2009 Daniel A. Steffen <[email protected]>
99
* Copyright 2008-2009, Apple Inc.
10-
* Copyright 2009 Kevin Walzer/WordTech Communications LLC.
10+
* Copyright 2009 Kevin Walzer/WordTech Communications LLC.
1111
*
1212
* See the file "license.terms" for information on usage and redistribution
1313
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -316,7 +316,7 @@ static void TabElementDraw(
316316
.size = kHIThemeTabSizeNormal,
317317
.adornment = Ttk_StateTableLookup(TabAdornmentTable, state),
318318
.kind = kHIThemeTabKindNormal,
319-
.position = Ttk_StateTableLookup(TabPositionTable, state),
319+
.position = Ttk_StateTableLookup(TabPositionTable, state),
320320
};
321321

322322
bounds.size.height += TAB_OVERLAP;
@@ -1194,7 +1194,7 @@ int Ttk_MacOSXPlatformInit(Tcl_Interp *interp)
11941194

11951195
/*
11961196
* Local Variables:
1197-
* mode: c
1197+
* mode: objc
11981198
* c-basic-offset: 4
11991199
* fill-column: 79
12001200
* coding: utf-8

unix/tkUnixWm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6418,7 +6418,7 @@ TkWmStackorderToplevel(
64186418
}
64196419

64206420
/*
6421-
* ASSERT: window_ptr - windows == table.numEntries
6421+
* ASSERT: window_ptr - windows == table.numEntries
64226422
* (#matched toplevel windows == #children) [Bug 1789819]
64236423
*/
64246424

0 commit comments

Comments
 (0)