diff options
Diffstat (limited to 'Lib/idlelib/configDialog.py')
-rw-r--r-- | Lib/idlelib/configDialog.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index e7a0690..d0e4066 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -980,16 +980,11 @@ class ConfigDialog(Toplevel): self.SetThemeType() ##load theme element option menu themeNames = list(self.themeElements.keys()) - themeNames.sort(self.__ThemeNameIndexCompare) + themeNames.sort(key=lambda x: self.themeElements[x][1]) self.optMenuHighlightTarget.SetMenu(themeNames,themeNames[0]) self.PaintThemeSample() self.SetHighlightTarget() - def __ThemeNameIndexCompare(self,a,b): - if self.themeElements[a][1]<self.themeElements[b][1]: return -1 - elif self.themeElements[a][1]==self.themeElements[b][1]: return 0 - else: return 1 - def LoadKeyCfg(self): ##current keys type radiobutton self.keysAreBuiltin.set(idleConf.GetOption('main','Keys','default', |