mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
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.
This commit is contained in:
parent
6aaccc6b55
commit
19302d927e
8 changed files with 130 additions and 20 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue