mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
#7092: Drop the cmp argument.
This commit is contained in:
parent
d630c04ab1
commit
a7f242fa2a
2 changed files with 2 additions and 15 deletions
|
@ -989,16 +989,11 @@ class ConfigDialog(Toplevel):
|
||||||
self.SetThemeType()
|
self.SetThemeType()
|
||||||
##load theme element option menu
|
##load theme element option menu
|
||||||
themeNames=self.themeElements.keys()
|
themeNames=self.themeElements.keys()
|
||||||
themeNames.sort(self.__ThemeNameIndexCompare)
|
themeNames.sort(key=lambda x: self.themeElements[x][1])
|
||||||
self.optMenuHighlightTarget.SetMenu(themeNames,themeNames[0])
|
self.optMenuHighlightTarget.SetMenu(themeNames,themeNames[0])
|
||||||
self.PaintThemeSample()
|
self.PaintThemeSample()
|
||||||
self.SetHighlightTarget()
|
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):
|
def LoadKeyCfg(self):
|
||||||
##current keys type radiobutton
|
##current keys type radiobutton
|
||||||
self.keysAreBuiltin.set(idleConf.GetOption('main','Keys','default',
|
self.keysAreBuiltin.set(idleConf.GetOption('main','Keys','default',
|
||||||
|
|
|
@ -654,17 +654,9 @@ class IdleConf:
|
||||||
helpPath=value[1].strip()
|
helpPath=value[1].strip()
|
||||||
if menuItem and helpPath: #neither are empty strings
|
if menuItem and helpPath: #neither are empty strings
|
||||||
helpSources.append( (menuItem,helpPath,option) )
|
helpSources.append( (menuItem,helpPath,option) )
|
||||||
helpSources.sort(self.__helpsort)
|
helpSources.sort(key=lambda x: int(x[2]))
|
||||||
return helpSources
|
return helpSources
|
||||||
|
|
||||||
def __helpsort(self, h1, h2):
|
|
||||||
if int(h1[2]) < int(h2[2]):
|
|
||||||
return -1
|
|
||||||
elif int(h1[2]) > int(h2[2]):
|
|
||||||
return 1
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def GetAllExtraHelpSourcesList(self):
|
def GetAllExtraHelpSourcesList(self):
|
||||||
"""
|
"""
|
||||||
Returns a list of tuples containing the details of all additional help
|
Returns a list of tuples containing the details of all additional help
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue