diff -r 013aee248a62 -r 006ee31b4835 eric6/Tools/TrayStarter.py --- a/eric6/Tools/TrayStarter.py Sun Apr 11 11:34:32 2021 +0200 +++ b/eric6/Tools/TrayStarter.py Sun Apr 11 12:38:16 2021 +0200 @@ -427,8 +427,7 @@ self.recentProjectsMenu.clear() - idx = 1 - for rp in self.recentProjects: + for idx, rp in enumerate(self.recentProjects, start=1): if idx < 10: formatStr = '&{0:d}. {1}' else: @@ -437,7 +436,6 @@ formatStr.format( idx, Utilities.compactPath(rp, self.maxMenuFilePathLen))) act.setData(rp) - idx += 1 def __showRecentMultiProjectsMenu(self): """ @@ -449,8 +447,7 @@ self.recentMultiProjectsMenu.clear() - idx = 1 - for rmp in self.recentMultiProjects: + for idx, rmp in enumerate(self.recentMultiProjects, start=1): if idx < 10: formatStr = '&{0:d}. {1}' else: @@ -459,7 +456,6 @@ formatStr.format( idx, Utilities.compactPath(rmp, self.maxMenuFilePathLen))) act.setData(rmp) - idx += 1 def __showRecentFilesMenu(self): """ @@ -471,8 +467,7 @@ self.recentFilesMenu.clear() - idx = 1 - for rf in self.recentFiles: + for idx, rf in enumerate(self.recentFiles, start=1): if idx < 10: formatStr = '&{0:d}. {1}' else: @@ -481,7 +476,6 @@ formatStr.format( idx, Utilities.compactPath(rf, self.maxMenuFilePathLen))) act.setData(rf) - idx += 1 def __openRecent(self, act): """