diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-06-11 19:42:51 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-06-11 19:42:51 (GMT) |
commit | 4f96f1f2b5068b8e8bd8d0f83f856b6e2883a3ab (patch) | |
tree | c53747593db6eac7dff992f88fec46f4318ae3ae /Lib/idlelib | |
parent | 0d5d222959e0422b93065f0661b06061b713e5af (diff) | |
download | cpython-4f96f1f2b5068b8e8bd8d0f83f856b6e2883a3ab.zip cpython-4f96f1f2b5068b8e8bd8d0f83f856b6e2883a3ab.tar.gz cpython-4f96f1f2b5068b8e8bd8d0f83f856b6e2883a3ab.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/Bindings.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/PyShell.py | 4 | ||||
-rw-r--r-- | Lib/idlelib/configHandler.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/macosxSupport.py | 72 |
4 files changed, 40 insertions, 40 deletions
diff --git a/Lib/idlelib/Bindings.py b/Lib/idlelib/Bindings.py index a695ab7..d24be3f 100644 --- a/Lib/idlelib/Bindings.py +++ b/Lib/idlelib/Bindings.py @@ -94,7 +94,7 @@ if sys.platform == 'darwin' and '.app' in sys.executable: del menudefs[0][1][-3:] menudefs[0][1].insert(6, closeItem) - # Remove the 'About' entry from the help menu, it is in the application + # Remove the 'About' entry from the help menu, it is in the application # menu del menudefs[-1][1][0:2] diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 0edd2d1..f7622f1 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1396,8 +1396,8 @@ def main(): if macosxSupport.runningAsOSXApp() and flist.dict: # On OSX: when the user has double-clicked on a file that causes - # IDLE to be launched the shell window will open just in front of - # the file she wants to see. Lower the interpreter window when + # IDLE to be launched the shell window will open just in front of + # the file she wants to see. Lower the interpreter window when # there are open files. shell.top.lower() diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 5ae643a..826fb5d 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -500,7 +500,7 @@ class IdleConf: if macosxSupport.runningAsOSXApp(): # We're using AquaTk, replace all keybingings that use the - # Alt key by ones that use the Option key because the former + # Alt key by ones that use the Option key because the former # don't work reliably. for k, v in result.items(): v2 = [ x.replace('<Alt-', '<Option-') for x in v ] diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index d403514..d55dbcb 100644 --- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -1,36 +1,36 @@ -""" -A number of function that enhance IDLE on MacOSX when it used as a normal -GUI application (as opposed to an X11 application). -""" -import sys - -def runningAsOSXApp(): - """ Returns True iff running from the IDLE.app bundle on OSX """ - return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0]) - -def addOpenEventSupport(root, flist): - """ - This ensures that the application will respont to open AppleEvents, which - makes is feaseable to use IDLE as the default application for python files. - """ - def doOpenFile(*args): - for fn in args: - flist.open(fn) - - # The command below is a hook in aquatk that is called whenever the app - # receives a file open event. The callback can have multiple arguments, - # one for every file that should be opened. - root.createcommand("::tk::mac::OpenDocument", doOpenFile) - -def hideTkConsole(root): - root.tk.call('console', 'hide') - - -def setupApp(root, flist): - """ - Perform setup for the OSX application bundle. - """ - if not runningAsOSXApp(): return - - hideTkConsole(root) - addOpenEventSupport(root, flist) +"""
+A number of function that enhance IDLE on MacOSX when it used as a normal
+GUI application (as opposed to an X11 application).
+"""
+import sys
+
+def runningAsOSXApp():
+ """ Returns True iff running from the IDLE.app bundle on OSX """
+ return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
+
+def addOpenEventSupport(root, flist):
+ """
+ This ensures that the application will respont to open AppleEvents, which
+ makes is feaseable to use IDLE as the default application for python files.
+ """
+ def doOpenFile(*args):
+ for fn in args:
+ flist.open(fn)
+
+ # The command below is a hook in aquatk that is called whenever the app
+ # receives a file open event. The callback can have multiple arguments,
+ # one for every file that should be opened.
+ root.createcommand("::tk::mac::OpenDocument", doOpenFile)
+
+def hideTkConsole(root):
+ root.tk.call('console', 'hide')
+
+
+def setupApp(root, flist):
+ """
+ Perform setup for the OSX application bundle.
+ """
+ if not runningAsOSXApp(): return
+
+ hideTkConsole(root)
+ addOpenEventSupport(root, flist)
|