mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
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.
This commit is contained in:
parent
1ee401fcf6
commit
c9a5b5c72e
1 changed files with 11 additions and 3 deletions
|
@ -567,13 +567,21 @@ class EditorWindow:
|
||||||
#print self.flist.inversedict
|
#print self.flist.inversedict
|
||||||
#print self.top.instanceDict
|
#print self.top.instanceDict
|
||||||
#print self
|
#print self
|
||||||
|
ullist = "1234567890ABCDEFGHIJ"
|
||||||
if rfList:
|
if rfList:
|
||||||
for instance in self.top.instanceDict.keys():
|
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:
|
for file in rfList:
|
||||||
fileName=file[0:-1]
|
fileName=file[0:-1]
|
||||||
instance.menuRecentFiles.add_command(label=fileName,
|
callback = instance.__RecentFileCallback(fileName)
|
||||||
command=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):
|
def __CleanRecentFiles(self,rfList):
|
||||||
origRfList=rfList[:]
|
origRfList=rfList[:]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue