summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/configDialog.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-01-14 22:03:31 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-01-14 22:03:31 (GMT)
commit8e92bf7699ac3617d3a0a9a55a38f642f5a6ecc6 (patch)
tree8e4486a10f7b3e00124724d0f1fe717fbb6c1f2e /Lib/idlelib/configDialog.py
parent50e92235e7fc7151f591f76b73fb539e34593405 (diff)
downloadcpython-8e92bf7699ac3617d3a0a9a55a38f642f5a6ecc6.zip
cpython-8e92bf7699ac3617d3a0a9a55a38f642f5a6ecc6.tar.gz
cpython-8e92bf7699ac3617d3a0a9a55a38f642f5a6ecc6.tar.bz2
M Bindings.py
M EditorWindow.py M NEWS.txt M config-main.def M configDialog.py M configHandler.py M configHelpSourceEdit.py M configSectionNameDialog.py - Change default: IDLE now starts with Python Shell. - Removed the File Path from the Additional Help Sources scrolled list. - Add capability to access Additional Help Sources on the web if the Help File Path begins with //http or www. (Otherwise local path is validated, as before.) - Additional Help Sources were not being posted on the Help menu in the order entered. Implement sorting the list by [HelpFiles] 'option' number. - Add Browse button to New Help Source dialog. Arrange to start in Python/Doc if platform is Windows, otherwise start in current directory. - Put the Additional Help Sources directly on the Help menu instead of in an Extra Help cascade menu. Rearrange the Help menu so the Additional Help Sources come last. Update help.txt appropriately. - Fix Tk root pop-ups in configSectionNameDialog.py and configDialog.py
Diffstat (limited to 'Lib/idlelib/configDialog.py')
-rw-r--r--Lib/idlelib/configDialog.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
index f8db74d..814689c 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -677,7 +677,8 @@ class ConfigDialog(Toplevel):
def DeleteCustomKeys(self):
keySetName=self.customKeys.get()
if not tkMessageBox.askyesno('Delete Key Set','Are you sure you wish '+
- 'to delete the key set '+`keySetName`+' ?'):
+ 'to delete the key set '+`keySetName`+' ?',
+ parent=self):
return
#remove key set from config
idleConf.userCfg['keys'].remove_section(keySetName)
@@ -703,7 +704,8 @@ class ConfigDialog(Toplevel):
def DeleteCustomTheme(self):
themeName=self.customTheme.get()
if not tkMessageBox.askyesno('Delete Theme','Are you sure you wish '+
- 'to delete the theme '+`themeName`+' ?'):
+ 'to delete the theme '+`themeName`+' ?',
+ parent=self):
return
#remove theme from config
idleConf.userCfg['highlight'].remove_section(themeName)
@@ -874,7 +876,7 @@ class ConfigDialog(Toplevel):
helpSource=GetHelpSourceDialog(self,'New Help Source').result
if helpSource:
self.userHelpList.append( (helpSource[0],helpSource[1]) )
- self.listHelp.insert(END,helpSource[0]+' '+helpSource[1])
+ self.listHelp.insert(END,helpSource[0])
self.UpdateUserHelpChangedItems()
self.SetHelpListButtonStates()
@@ -887,7 +889,7 @@ class ConfigDialog(Toplevel):
return #no changes
self.userHelpList[itemIndex]=newHelpSource
self.listHelp.delete(itemIndex)
- self.listHelp.insert(itemIndex,newHelpSource[0]+' '+newHelpSource[1])
+ self.listHelp.insert(itemIndex,newHelpSource[0])
self.UpdateUserHelpChangedItems()
self.SetHelpListButtonStates()
@@ -899,12 +901,11 @@ class ConfigDialog(Toplevel):
self.SetHelpListButtonStates()
def UpdateUserHelpChangedItems(self):
- #clear and rebuild the HelpFiles section in self.changedItems
- if self.changedItems['main'].has_key('HelpFiles'):
- del(self.changedItems['main']['HelpFiles'])
+ "Clear and rebuild the HelpFiles section in self.changedItems"
+ self.changedItems['main']['HelpFiles'] = {}
for num in range(1,len(self.userHelpList)+1):
self.AddChangedItem('main','HelpFiles',str(num),
- string.join(self.userHelpList[num-1],';'))
+ string.join(self.userHelpList[num-1][:2],';'))
def LoadFontCfg(self):
##base editor font selection list
@@ -1019,10 +1020,10 @@ class ConfigDialog(Toplevel):
#initial window size
self.winWidth.set(idleConf.GetOption('main','EditorWindow','width'))
self.winHeight.set(idleConf.GetOption('main','EditorWindow','height'))
- #help browsing
- self.userHelpList=idleConf.GetExtraHelpSourceList('user')
+ # additional help sources
+ self.userHelpList = idleConf.GetAllExtraHelpSourcesList()
for helpItem in self.userHelpList:
- self.listHelp.insert(END,helpItem[0]+' '+helpItem[1])
+ self.listHelp.insert(END,helpItem[0])
self.SetHelpListButtonStates()
#self.userHelpBrowser.set(idleConf.GetOption('main','General',
# 'user-help-browser',default=0,type='bool'))
@@ -1086,6 +1087,7 @@ class ConfigDialog(Toplevel):
if section == 'HelpFiles':
#this section gets completely replaced
idleConf.userCfg['main'].remove_section('HelpFiles')
+ cfgTypeHasChanges = True
for item in self.changedItems[configType][section].keys():
value = self.changedItems[configType][section][item]
if self.SetUserValue(configType,section,item,value):
@@ -1107,7 +1109,7 @@ class ConfigDialog(Toplevel):
instance.ResetColorizer()
instance.ResetFont()
instance.ResetKeybindings()
- instance.ResetExtraHelpMenu()
+ instance.reset_help_menu_entries()
def Cancel(self):
self.destroy()