[Idle-dev] CVS: idle EditorWindow.py,1.33,1.34
Kurt B. Kaiser
kbk@users.sourceforge.net
Sat, 05 Oct 2002 18:57:48 -0700
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv26116
Modified Files:
EditorWindow.py
Log Message:
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.
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** EditorWindow.py 4 Oct 2002 21:33:57 -0000 1.33
--- EditorWindow.py 6 Oct 2002 01:57:45 -0000 1.34
***************
*** 568,578 ****
#print self.top.instanceDict
#print self
if rfList:
for instance in self.top.instanceDict.keys():
! instance.menuRecentFiles.delete(1,END)
for file in rfList:
fileName=file[0:-1]
! instance.menuRecentFiles.add_command(label=fileName,
! command=instance.__RecentFileCallback(fileName))
def __CleanRecentFiles(self,rfList):
--- 568,586 ----
#print self.top.instanceDict
#print self
+ ullist = "1234567890ABCDEFGHIJ"
if rfList:
for instance in self.top.instanceDict.keys():
! menu = instance.menuRecentFiles
! menu.delete(1,END)
! i = 0 ; ul = 0; ullen = len(ullist)
for file in rfList:
fileName=file[0:-1]
! 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):