[Idle-dev] CVS: idle configDialog.py,1.44,1.45 config-main.def,1.10,1.11 config-keys.def,1.8,1.9

Stephen M. Gava elguavas@users.sourceforge.net
Tue, 26 Mar 2002 18:25:46 -0800


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv5971

Modified Files:
	configDialog.py config-main.def config-keys.def 
Log Message:
further work on new config system;
user defined help items


Index: configDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configDialog.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** configDialog.py	18 Mar 2002 02:38:44 -0000	1.44
--- configDialog.py	27 Mar 2002 02:25:44 -0000	1.45
***************
*** 368,376 ****
          self.buttonHelpListRemove=Button(frameHelpListButtons,text='Remove',
                  state=DISABLED,width=8,command=self.HelpListItemRemove)
!         checkHelpBrowser=Checkbutton(frameHelp,variable=self.userHelpBrowser,
!             onvalue=1,offvalue=0,text='user specified (html) help browser:',
!             command=self.OnCheckUserHelpBrowser)
!         self.entryHelpBrowser=Entry(frameHelp,textvariable=self.helpBrowser,
!                 width=40)
          #widget packing
          #body
--- 368,378 ----
          self.buttonHelpListRemove=Button(frameHelpListButtons,text='Remove',
                  state=DISABLED,width=8,command=self.HelpListItemRemove)
!         # the following is better handled by the BROWSER environment
!         # variable under unix/linux
!         #checkHelpBrowser=Checkbutton(frameHelp,variable=self.userHelpBrowser,
!         #    onvalue=1,offvalue=0,text='user specified (html) help browser:',
!         #    command=self.OnCheckUserHelpBrowser)
!         #self.entryHelpBrowser=Entry(frameHelp,textvariable=self.helpBrowser,
!         #        width=40)
          #widget packing
          #body
***************
*** 399,404 ****
          self.buttonHelpListAdd.pack(side=TOP,anchor=W)
          self.buttonHelpListRemove.pack(side=TOP,anchor=W,pady=5)
!         checkHelpBrowser.pack(side=TOP,anchor=W,padx=5)
!         self.entryHelpBrowser.pack(side=TOP,anchor=W,padx=5,pady=5)
          return frame
  
--- 401,406 ----
          self.buttonHelpListAdd.pack(side=TOP,anchor=W)
          self.buttonHelpListRemove.pack(side=TOP,anchor=W,pady=5)
!         #checkHelpBrowser.pack(side=TOP,anchor=W,padx=5)
!         #self.entryHelpBrowser.pack(side=TOP,anchor=W,padx=5,pady=5)
          return frame
  
***************
*** 871,875 ****
          itemIndex=self.listHelp.index(ANCHOR)
          helpSource=self.userHelpList[itemIndex]
!         newHelpSource=GetHelpSourceDialog(self,'New Help Source',
                  menuItem=helpSource[0],filePath=helpSource[1]).result
          if (not newHelpSource) or (newHelpSource==helpSource):
--- 873,877 ----
          itemIndex=self.listHelp.index(ANCHOR)
          helpSource=self.userHelpList[itemIndex]
!         newHelpSource=GetHelpSourceDialog(self,'Edit Help Source',
                  menuItem=helpSource[0],filePath=helpSource[1]).result
          if (not newHelpSource) or (newHelpSource==helpSource):
***************
*** 1014,1022 ****
              self.listHelp.insert(END,helpItem[0]+'  '+helpItem[1])
          self.SetHelpListButtonStates()
!         self.userHelpBrowser.set(idleConf.GetOption('main','General',
!                 'user-help-browser',default=0,type='bool'))
!         self.helpBrowser.set(idleConf.GetOption('main','General',
!                 'user-help-browser-command',default=''))
!         self.OnCheckUserHelpBrowser()
      
      def LoadConfigs(self):
--- 1016,1024 ----
              self.listHelp.insert(END,helpItem[0]+'  '+helpItem[1])
          self.SetHelpListButtonStates()
!         #self.userHelpBrowser.set(idleConf.GetOption('main','General',
!         #        'user-help-browser',default=0,type='bool'))
!         #self.helpBrowser.set(idleConf.GetOption('main','General',
!         #        'user-help-browser-command',default=''))
!         #self.OnCheckUserHelpBrowser()
      
      def LoadConfigs(self):
***************
*** 1071,1077 ****
          save all configuration changes to user config files.
          """
!         if self.changedItems['main'].has_key('HelpFiles'):
!             #this section gets completely replaced
!             idleConf.userCfg['main'].remove_section('HelpFiles')
          for configType in self.changedItems.keys():
              cfgTypeHasChanges=0
--- 1073,1082 ----
          save all configuration changes to user config files.
          """
!         #if self.changedItems['main'].has_key('HelpFiles'):
!         #this section gets completely replaced
!         print idleConf.GetAllExtraHelpSourcesList()
!         idleConf.userCfg['main'].remove_section('HelpFiles')
!         idleConf.userCfg['main'].Save()
!         print idleConf.GetAllExtraHelpSourcesList()
          for configType in self.changedItems.keys():
              cfgTypeHasChanges=0
***************
*** 1082,1085 ****
--- 1087,1091 ----
                          cfgTypeHasChanges=1
              if cfgTypeHasChanges: 
+                 print configType,'- changed'
                  idleConf.userCfg[configType].Save()                
          self.ResetChangedItems() #clear the changed items dict
***************
*** 1098,1101 ****
--- 1104,1108 ----
              instance.ResetFont()
              instance.ResetKeybindings()
+             instance.ResetExtraHelpMenu()
          
      def Cancel(self):

Index: config-main.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-main.def,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** config-main.def	12 Mar 2002 00:52:42 -0000	1.10
--- config-main.def	27 Mar 2002 02:25:44 -0000	1.11
***************
*** 29,34 ****
  [General]
  editor-on-startup= 1
- user-help-browser= 0
- user-help-browser-command= 
  
  [EditorWindow]
--- 29,32 ----

Index: config-keys.def
===================================================================
RCS file: /cvsroot/idlefork/idle/config-keys.def,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** config-keys.def	18 Feb 2002 01:43:11 -0000	1.8
--- config-keys.def	27 Mar 2002 02:25:44 -0000	1.9
***************
*** 30,34 ****
  remove-selection=<Key-Escape>
  save-copy-of-window-as-file=<Alt-Shift-Key-s>
! save-window-as-file=<Alt-Key-s>
  save-window=<Control-Key-s>
  select-all=<Alt-Key-a>
--- 30,34 ----
  remove-selection=<Key-Escape>
  save-copy-of-window-as-file=<Alt-Shift-Key-s>
! save-window-as-file=<Control-Shift-Key-s>
  save-window=<Control-Key-s>
  select-all=<Alt-Key-a>