diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-06-11 14:33:36 +0000 |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-06-11 14:33:36 +0000 |
commit | 19302d927e6688e02553df16177e4867e2d0e3b3 (patch) | |
tree | 38fbc0f20e5b05833d09a560ea8d081393f19768 /Lib/idlelib/configHandler.py | |
parent | 6aaccc6b55a684771abfdad74bea742c25ded506 (diff) | |
download | cpython-git-19302d927e6688e02553df16177e4867e2d0e3b3.tar.gz |
This patch improves the L&F of IDLE on OSX. The changes are conditionalized on
being in an IDLE.app bundle on darwin. This does a slight reorganisation of the
menus and adds support for file-open events.
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r-- | Lib/idlelib/configHandler.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index dcd9321ad7..5ae643a71d 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -20,6 +20,7 @@ configuration problem notification and resolution. import os import sys import string +import macosxSupport from ConfigParser import ConfigParser, NoOptionError, NoSectionError class InvalidConfigType(Exception): pass @@ -495,7 +496,18 @@ class IdleConf: return binding def GetCurrentKeySet(self): - return self.GetKeySet(self.CurrentKeys()) + result = self.GetKeySet(self.CurrentKeys()) + + 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 + # don't work reliably. + for k, v in result.items(): + v2 = [ x.replace('<Alt-', '<Option-') for x in v ] + if v != v2: + result[k] = v2 + + return result def GetKeySet(self,keySetName): """ |