diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2002-10-06 01:57:45 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2002-10-06 01:57:45 (GMT) |
commit | c9a5b5c72e6017c154b26d2796141091e7614d44 (patch) | |
tree | 27974b14e50ca644db907e67c2a58a89f8aec4cf /Lib/idlelib | |
parent | 1ee401fcf6a5b561cbed54051077784a11d9d438 (diff) | |
download | cpython-c9a5b5c72e6017c154b26d2796141091e7614d44.zip cpython-c9a5b5c72e6017c154b26d2796141091e7614d44.tar.gz cpython-c9a5b5c72e6017c154b26d2796141091e7614d44.tar.bz2 |
Apply Josh Robb's Patch:
[ 617097 ] EditorWindow.py: underline recent files
Added a couple of mods to reduce the indentation level.
Note that the recent files menu doesn't update until
Idle is restarted, pre-existing bug, at least on Linux.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 594a085..f5e3add 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -567,13 +567,21 @@ class EditorWindow: #print self.flist.inversedict #print self.top.instanceDict #print self + ullist = "1234567890ABCDEFGHIJ" if rfList: for instance in self.top.instanceDict.keys(): - instance.menuRecentFiles.delete(1,END) + menu = instance.menuRecentFiles + menu.delete(1,END) + i = 0 ; ul = 0; ullen = len(ullist) for file in rfList: fileName=file[0:-1] - instance.menuRecentFiles.add_command(label=fileName, - command=instance.__RecentFileCallback(fileName)) + callback = instance.__RecentFileCallback(fileName) + if i > ullen: # don't underline menuitems + ul=None + menu.add_command(label=ullist[i] + " " + fileName, + command=callback, + underline=ul) + i += 1 def __CleanRecentFiles(self,rfList): origRfList=rfList[:] |