[Idle-dev] CVS: idle aboutDialog.py,1.8,1.9 boolcheck.py,1.1,1.2 configDialog.py,1.48,1.49 configHandler.py,1.26,1.27 configHelpSourceEdit.py,1.2,1.3 configSectionNameDialog.py,1.2,1.3 dynOptionMenuWidget.py,1.4,1.5 keybindingDialog.py,1.9,1.10 macosx_main.py,1.5,1.6 rpc.py,1.11,1.12 tabpage.py,1.4,1.5 textView.py,1.2,1.3

Kurt B. Kaiser kbk@users.sourceforge.net
Tue, 31 Dec 2002 08:03:28 -0800


Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv30934

Modified Files:
	aboutDialog.py boolcheck.py configDialog.py configHandler.py 
	configHelpSourceEdit.py configSectionNameDialog.py 
	dynOptionMenuWidget.py keybindingDialog.py macosx_main.py 
	rpc.py tabpage.py textView.py 
Log Message:
Whitespace Normalization


Index: aboutDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/aboutDialog.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** aboutDialog.py	30 Nov 2002 19:12:41 -0000	1.8
--- aboutDialog.py	31 Dec 2002 16:03:22 -0000	1.9
***************
*** 11,15 ****
      """
      modal about dialog for idle
!     """ 
      def __init__(self,parent,title):
          Toplevel.__init__(self, parent)
--- 11,15 ----
      """
      modal about dialog for idle
!     """
      def __init__(self,parent,title):
          Toplevel.__init__(self, parent)
***************
*** 19,23 ****
          self.bg="#707070"
          self.fg="#ffffff"
!         
          self.CreateWidgets()
          self.resizable(height=FALSE,width=FALSE)
--- 19,23 ----
          self.bg="#707070"
          self.fg="#ffffff"
! 
          self.CreateWidgets()
          self.resizable(height=FALSE,width=FALSE)
***************
*** 34,38 ****
          self.bind('<Escape>',self.Ok) #dismiss dialog
          self.wait_window()
!         
      def CreateWidgets(self):
          frameMain = Frame(self,borderwidth=2,relief=SUNKEN)
--- 34,38 ----
          self.bind('<Escape>',self.Ok) #dismiss dialog
          self.wait_window()
! 
      def CreateWidgets(self):
          frameMain = Frame(self,borderwidth=2,relief=SUNKEN)
***************
*** 84,88 ****
          tkVer = `TkVersion`.split('.')
          tkVer[len(tkVer)-1] = str('%.3g' % (float('.'+tkVer[len(tkVer)-1])))[2:]
!         if tkVer[len(tkVer)-1] == '': 
              tkVer[len(tkVer)-1] = '0'
          tkVer = string.join(tkVer,'.')
--- 84,88 ----
          tkVer = `TkVersion`.split('.')
          tkVer[len(tkVer)-1] = str('%.3g' % (float('.'+tkVer[len(tkVer)-1])))[2:]
!         if tkVer[len(tkVer)-1] == '':
              tkVer[len(tkVer)-1] = '0'
          tkVer = string.join(tkVer,'.')
***************
*** 106,110 ****
      def ShowLicense(self):
          self.ViewFile('About - License','LICENSE.txt')
!         
      def ShowCredits(self):
          self.ViewFile('About - Credits','CREDITS.txt')
--- 106,110 ----
      def ShowLicense(self):
          self.ViewFile('About - License','LICENSE.txt')
! 
      def ShowCredits(self):
          self.ViewFile('About - Credits','CREDITS.txt')
***************
*** 116,120 ****
      def Ok(self, event=None):
          self.destroy()
!     
  if __name__ == '__main__':
      #test the dialog
--- 116,120 ----
      def Ok(self, event=None):
          self.destroy()
! 
  if __name__ == '__main__':
      #test the dialog

Index: boolcheck.py
===================================================================
RCS file: /cvsroot/idlefork/idle/boolcheck.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** boolcheck.py	20 Dec 2002 04:24:43 -0000	1.1
--- boolcheck.py	31 Dec 2002 16:03:22 -0000	1.2
***************
*** 1,4 ****
  "boolcheck - import this module to ensure True, False, bool() builtins exist."
! try: 
      True
  except NameError:
--- 1,4 ----
  "boolcheck - import this module to ensure True, False, bool() builtins exist."
! try:
      True
  except NameError:
***************
*** 8,10 ****
      from operator import truth
      __builtin__.bool = truth
- 
--- 8,9 ----

Index: configDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configDialog.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** configDialog.py	4 Nov 2002 03:17:45 -0000	1.48
--- configDialog.py	31 Dec 2002 16:03:22 -0000	1.49
***************
*** 15,19 ****
      """
      configuration dialog for idle
!     """ 
      def __init__(self,parent,title):
          Toplevel.__init__(self, parent)
--- 15,19 ----
      """
      configuration dialog for idle
!     """
      def __init__(self,parent,title):
          Toplevel.__init__(self, parent)
***************
*** 23,27 ****
          #Theme Elements. Each theme element key is it's display name.
          #The first value of the tuple is the sample area tag name.
!         #The second value is the display name list sort index. 
          self.themeElements={'Normal Text':('normal','00'),
              'Python Keywords':('keyword','01'),
--- 23,27 ----
          #Theme Elements. Each theme element key is it's display name.
          #The first value of the tuple is the sample area tag name.
!         #The second value is the display name list sort index.
          self.themeElements={'Normal Text':('normal','00'),
              'Python Keywords':('keyword','01'),
***************
*** 49,55 ****
          #self.bind('<F1>',self.Help) #context help
          self.LoadConfigs()
!         self.AttachVarCallbacks() #avoid callbacks during LoadConfigs 
          self.wait_window()
!         
      def CreateWidgets(self):
          self.tabPages = TabPageSet(self,
--- 49,55 ----
          #self.bind('<F1>',self.Help) #context help
          self.LoadConfigs()
!         self.AttachVarCallbacks() #avoid callbacks during LoadConfigs
          self.wait_window()
! 
      def CreateWidgets(self):
          self.tabPages = TabPageSet(self,
***************
*** 76,80 ****
          frameActionButtons.pack(side=BOTTOM)
          self.tabPages.pack(side=TOP,expand=TRUE,fill=BOTH)
!    
      def CreatePageFontTab(self):
          #tkVars
--- 76,80 ----
          frameActionButtons.pack(side=BOTTOM)
          self.tabPages.pack(side=TOP,expand=TRUE,fill=BOTH)
! 
      def CreatePageFontTab(self):
          #tkVars
***************
*** 84,88 ****
          self.spaceNum=IntVar(self)
          #self.tabCols=IntVar(self)
!         self.indentBySpaces=BooleanVar(self) 
          self.editFont=tkFont.Font(self,('courier',12,'normal'))
          ##widget creation
--- 84,88 ----
          self.spaceNum=IntVar(self)
          #self.tabCols=IntVar(self)
!         self.indentBySpaces=BooleanVar(self)
          self.editFont=tkFont.Font(self,('courier',12,'normal'))
          ##widget creation
***************
*** 169,173 ****
          self.colour=StringVar(self)
          self.fontName=StringVar(self)
!         self.themeIsBuiltin=BooleanVar(self) 
          self.highlightTarget=StringVar(self)
          ##widget creation
--- 169,173 ----
          self.colour=StringVar(self)
          self.fontName=StringVar(self)
!         self.themeIsBuiltin=BooleanVar(self)
          self.highlightTarget=StringVar(self)
          ##widget creation
***************
*** 195,199 ****
          for txTa in textAndTags:
              text.insert(END,txTa[0],txTa[1])
!         for element in self.themeElements.keys(): 
              text.tag_bind(self.themeElements[element][0],'<ButtonPress-1>',
                  lambda event,elem=element: event.widget.winfo_toplevel()
--- 195,199 ----
          for txTa in textAndTags:
              text.insert(END,txTa[0],txTa[1])
!         for element in self.themeElements.keys():
              text.tag_bind(self.themeElements[element][0],'<ButtonPress-1>',
                  lambda event,elem=element: event.widget.winfo_toplevel()
***************
*** 212,216 ****
              value=0,text='Background',command=self.SetColourSampleBinding)
          self.fgHilite.set(1)
!         buttonSaveCustomTheme=Button(frameCustom, 
              text='Save as New Custom Theme',command=self.SaveAsNewTheme)
          #frameTheme
--- 212,216 ----
              value=0,text='Background',command=self.SetColourSampleBinding)
          self.fgHilite.set(1)
!         buttonSaveCustomTheme=Button(frameCustom,
              text='Save as New Custom Theme',command=self.SaveAsNewTheme)
          #frameTheme
***************
*** 241,245 ****
          self.radioFg.pack(side=LEFT,anchor=E)
          self.radioBg.pack(side=RIGHT,anchor=W)
!         buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5)        
          #frameTheme
          labelThemeTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
--- 241,245 ----
          self.radioFg.pack(side=LEFT,anchor=E)
          self.radioBg.pack(side=RIGHT,anchor=W)
!         buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5)
          #frameTheme
          labelThemeTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
***************
*** 257,261 ****
          self.builtinKeys=StringVar(self)
          self.customKeys=StringVar(self)
!         self.keysAreBuiltin=BooleanVar(self) 
          self.keyBinding=StringVar(self)
          ##widget creation
--- 257,261 ----
          self.builtinKeys=StringVar(self)
          self.customKeys=StringVar(self)
!         self.keysAreBuiltin=BooleanVar(self)
          self.keyBinding=StringVar(self)
          ##widget creation
***************
*** 301,306 ****
          #frameCustom
          labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5)        
!         self.buttonNewKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5)        
          frameTarget.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH)
          #frame target
--- 301,306 ----
          #frameCustom
          labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5)
!         self.buttonNewKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5)
          frameTarget.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH)
          #frame target
***************
*** 322,329 ****
  
      def CreatePageGeneral(self):
!         #tkVars        
!         self.winWidth=StringVar(self)       
          self.winHeight=StringVar(self)
!         self.startupEdit=IntVar(self)       
          self.userHelpBrowser=BooleanVar(self)
          self.helpBrowser=StringVar(self)
--- 322,329 ----
  
      def CreatePageGeneral(self):
!         #tkVars
!         self.winWidth=StringVar(self)
          self.winHeight=StringVar(self)
!         self.startupEdit=IntVar(self)
          self.userHelpBrowser=BooleanVar(self)
          self.helpBrowser=StringVar(self)
***************
*** 331,335 ****
          #body
          frame=self.tabPages.pages['General']['page']
!         #body section frames        
          frameRun=Frame(frame,borderwidth=2,relief=GROOVE)
          frameWinSize=Frame(frame,borderwidth=2,relief=GROOVE)
--- 331,335 ----
          #body
          frame=self.tabPages.pages['General']['page']
!         #body section frames
          frameRun=Frame(frame,borderwidth=2,relief=GROOVE)
          frameWinSize=Frame(frame,borderwidth=2,relief=GROOVE)
***************
*** 384,388 ****
          labelRunChoiceTitle.pack(side=LEFT,anchor=W,padx=5,pady=5)
          radioStartupEdit.pack(side=LEFT,anchor=W,padx=5,pady=5)
!         radioStartupShell.pack(side=LEFT,anchor=W,padx=5,pady=5)     
          #frameWinSize
          labelWinSizeTitle.pack(side=LEFT,anchor=W,padx=5,pady=5)
--- 384,388 ----
          labelRunChoiceTitle.pack(side=LEFT,anchor=W,padx=5,pady=5)
          radioStartupEdit.pack(side=LEFT,anchor=W,padx=5,pady=5)
!         radioStartupShell.pack(side=LEFT,anchor=W,padx=5,pady=5)
          #frameWinSize
          labelWinSizeTitle.pack(side=LEFT,anchor=W,padx=5,pady=5)
***************
*** 415,424 ****
          self.builtinTheme.trace_variable('w',self.VarChanged_builtinTheme)
          self.customTheme.trace_variable('w',self.VarChanged_customTheme)
!         self.themeIsBuiltin.trace_variable('w',self.VarChanged_themeIsBuiltin) 
          self.highlightTarget.trace_variable('w',self.VarChanged_highlightTarget)
          self.keyBinding.trace_variable('w',self.VarChanged_keyBinding)
          self.builtinKeys.trace_variable('w',self.VarChanged_builtinKeys)
          self.customKeys.trace_variable('w',self.VarChanged_customKeys)
!         self.keysAreBuiltin.trace_variable('w',self.VarChanged_keysAreBuiltin) 
          self.winWidth.trace_variable('w',self.VarChanged_winWidth)
          self.winHeight.trace_variable('w',self.VarChanged_winHeight)
--- 415,424 ----
          self.builtinTheme.trace_variable('w',self.VarChanged_builtinTheme)
          self.customTheme.trace_variable('w',self.VarChanged_customTheme)
!         self.themeIsBuiltin.trace_variable('w',self.VarChanged_themeIsBuiltin)
          self.highlightTarget.trace_variable('w',self.VarChanged_highlightTarget)
          self.keyBinding.trace_variable('w',self.VarChanged_keyBinding)
          self.builtinKeys.trace_variable('w',self.VarChanged_builtinKeys)
          self.customKeys.trace_variable('w',self.VarChanged_customKeys)
!         self.keysAreBuiltin.trace_variable('w',self.VarChanged_keysAreBuiltin)
          self.winWidth.trace_variable('w',self.VarChanged_winWidth)
          self.winHeight.trace_variable('w',self.VarChanged_winHeight)
***************
*** 428,432 ****
          value=self.fontSize.get()
          self.AddChangedItem('main','EditorWindow','font-size',value)
!         
      def VarChanged_fontName(self,*params):
          value=self.fontName.get()
--- 428,432 ----
          value=self.fontSize.get()
          self.AddChangedItem('main','EditorWindow','font-size',value)
! 
      def VarChanged_fontName(self,*params):
          value=self.fontName.get()
***************
*** 473,477 ****
      def VarChanged_highlightTarget(self,*params):
          self.SetHighlightTarget()
!         
      def VarChanged_keyBinding(self,*params):
          value=self.keyBinding.get()
--- 473,477 ----
      def VarChanged_highlightTarget(self,*params):
          self.SetHighlightTarget()
! 
      def VarChanged_keyBinding(self,*params):
          value=self.keyBinding.get()
***************
*** 485,489 ****
              extKeybindSection=extName+'_cfgBindings'
              self.AddChangedItem('extensions',extKeybindSection,event,value)
!         
      def VarChanged_builtinKeys(self,*params):
          value=self.builtinKeys.get()
--- 485,489 ----
              extKeybindSection=extName+'_cfgBindings'
              self.AddChangedItem('extensions',extKeybindSection,event,value)
! 
      def VarChanged_builtinKeys(self,*params):
          value=self.builtinKeys.get()
***************
*** 498,504 ****
  
      def VarChanged_keysAreBuiltin(self,*params):
!         value=self.keysAreBuiltin.get() 
          self.AddChangedItem('main','Keys','default',value)
!         if value: 
              self.VarChanged_builtinKeys()
          else:
--- 498,504 ----
  
      def VarChanged_keysAreBuiltin(self,*params):
!         value=self.keysAreBuiltin.get()
          self.AddChangedItem('main','Keys','default',value)
!         if value:
              self.VarChanged_builtinKeys()
          else:
***************
*** 519,524 ****
      def ResetChangedItems(self):
          #When any config item is changed in this dialog, an entry
!         #should be made in the relevant section (config type) of this 
!         #dictionary. The key should be the config file section name and the 
          #value a dictionary, whose key:value pairs are item=value pairs for
          #that config file section.
--- 519,524 ----
      def ResetChangedItems(self):
          #When any config item is changed in this dialog, an entry
!         #should be made in the relevant section (config type) of this
!         #dictionary. The key should be the config file section name and the
          #value a dictionary, whose key:value pairs are item=value pairs for
          #that config file section.
***************
*** 528,534 ****
          value=str(value) #make sure we use a string
          if not self.changedItems[type].has_key(section):
!             self.changedItems[type][section]={}    
          self.changedItems[type][section][item]=value
!     
      def GetDefaultItems(self):
          dItems={'main':{},'highlight':{},'keys':{},'extensions':{}}
--- 528,534 ----
          value=str(value) #make sure we use a string
          if not self.changedItems[type].has_key(section):
!             self.changedItems[type][section]={}
          self.changedItems[type][section][item]=value
! 
      def GetDefaultItems(self):
          dItems={'main':{},'highlight':{},'keys':{},'extensions':{}}
***************
*** 538,546 ****
                  dItems[configType][section]={}
                  options=idleConf.defaultCfg[configType].GetOptionList(section)
!                 for option in options:            
                      dItems[configType][section][option]=(
                              idleConf.defaultCfg[configType].Get(section,option))
          return dItems
!             
      def SetThemeType(self):
          if self.themeIsBuiltin.get():
--- 538,546 ----
                  dItems[configType][section]={}
                  options=idleConf.defaultCfg[configType].GetOptionList(section)
!                 for option in options:
                      dItems[configType][section][option]=(
                              idleConf.defaultCfg[configType].Get(section,option))
          return dItems
! 
      def SetThemeType(self):
          if self.themeIsBuiltin.get():
***************
*** 564,575 ****
              self.optMenuKeysCustom.config(state=NORMAL)
              self.buttonDeleteCustomKeys.config(state=NORMAL)
!     
      def GetNewKeys(self):
          listIndex=self.listBindings.index(ANCHOR)
          binding=self.listBindings.get(listIndex)
          bindName=binding.split()[0] #first part, up to first space
!         if self.keysAreBuiltin.get(): 
              currentKeySetName=self.builtinKeys.get()
!         else:  
              currentKeySetName=self.customKeys.get()
          currentBindings=idleConf.GetCurrentKeySet()
--- 564,575 ----
              self.optMenuKeysCustom.config(state=NORMAL)
              self.buttonDeleteCustomKeys.config(state=NORMAL)
! 
      def GetNewKeys(self):
          listIndex=self.listBindings.index(ANCHOR)
          binding=self.listBindings.get(listIndex)
          bindName=binding.split()[0] #first part, up to first space
!         if self.keysAreBuiltin.get():
              currentKeySetName=self.builtinKeys.get()
!         else:
              currentKeySetName=self.customKeys.get()
          currentBindings=idleConf.GetCurrentKeySet()
***************
*** 590,595 ****
                      self.listBindings.select_anchor(listIndex)
                      return
!                 else: #create new custom key set based on previously active key set 
!                     self.CreateNewKeySet(newKeySet)    
              self.listBindings.delete(listIndex)
              self.listBindings.insert(listIndex,bindName+' - '+newKeys)
--- 590,595 ----
                      self.listBindings.select_anchor(listIndex)
                      return
!                 else: #create new custom key set based on previously active key set
!                     self.CreateNewKeySet(newKeySet)
              self.listBindings.delete(listIndex)
              self.listBindings.insert(listIndex,bindName+' - '+newKeys)
***************
*** 607,611 ****
                  message,usedNames).result
          return newKeySet
!     
      def SaveAsNewKeySet(self):
          newKeysName=self.GetNewKeysName('New Key Set Name:')
--- 607,611 ----
                  message,usedNames).result
          return newKeySet
! 
      def SaveAsNewKeySet(self):
          newKeysName=self.GetNewKeysName('New Key Set Name:')
***************
*** 619,625 ****
          #creates new custom key set based on the previously active key set,
          #and makes the new key set active
!         if self.keysAreBuiltin.get(): 
              prevKeySetName=self.builtinKeys.get()
!         else:  
              prevKeySetName=self.customKeys.get()
          prevKeys=idleConf.GetCoreKeys(prevKeySetName)
--- 619,625 ----
          #creates new custom key set based on the previously active key set,
          #and makes the new key set active
!         if self.keysAreBuiltin.get():
              prevKeySetName=self.builtinKeys.get()
!         else:
              prevKeySetName=self.customKeys.get()
          prevKeys=idleConf.GetCoreKeys(prevKeySetName)
***************
*** 642,646 ****
          self.keysAreBuiltin.set(0)
          self.SetKeysType()
!     
      def LoadKeysList(self,keySetName):
          reselect=0
--- 642,646 ----
          self.keysAreBuiltin.set(0)
          self.SetKeysType()
! 
      def LoadKeysList(self,keySetName):
          reselect=0
***************
*** 653,657 ****
          bindNames.sort()
          self.listBindings.delete(0,END)
!         for bindName in bindNames: 
              key=string.join(keySet[bindName]) #make key(s) into a string
              bindName=bindName[2:-2] #trim off the angle brackets
--- 653,657 ----
          bindNames.sort()
          self.listBindings.delete(0,END)
!         for bindName in bindNames:
              key=string.join(keySet[bindName]) #make key(s) into a string
              bindName=bindName[2:-2] #trim off the angle brackets
***************
*** 691,695 ****
          self.Apply()
          self.SetKeysType()
!     
      def DeleteCustomTheme(self):
          themeName=self.customTheme.get()
--- 691,695 ----
          self.Apply()
          self.SetKeysType()
! 
      def DeleteCustomTheme(self):
          themeName=self.customTheme.get()
***************
*** 723,727 ****
          rgbTuplet, colourString = tkColorChooser.askcolor(parent=self,
              title='Pick new colour for : '+target,initialcolor=prevColour)
!         if colourString and (colourString!=prevColour): 
              #user didn't cancel, and they chose a new colour
              if self.themeIsBuiltin.get(): #current theme is a built-in
--- 723,727 ----
          rgbTuplet, colourString = tkColorChooser.askcolor(parent=self,
              title='Pick new colour for : '+target,initialcolor=prevColour)
!         if colourString and (colourString!=prevColour):
              #user didn't cancel, and they chose a new colour
              if self.themeIsBuiltin.get(): #current theme is a built-in
***************
*** 731,740 ****
                  if not newTheme: #user cancelled custom theme creation
                      return
!                 else: #create new custom theme based on previously active theme 
!                     self.CreateNewTheme(newTheme)    
                      self.colour.set(colourString)
              else: #current theme is user defined
                  self.colour.set(colourString)
!     
      def OnNewColourSet(self):
          newColour=self.colour.get()
--- 731,740 ----
                  if not newTheme: #user cancelled custom theme creation
                      return
!                 else: #create new custom theme based on previously active theme
!                     self.CreateNewTheme(newTheme)
                      self.colour.set(colourString)
              else: #current theme is user defined
                  self.colour.set(colourString)
! 
      def OnNewColourSet(self):
          newColour=self.colour.get()
***************
*** 755,759 ****
                  message,usedNames).result
          return newTheme
!     
      def SaveAsNewTheme(self):
          newThemeName=self.GetNewThemeName('New Theme Name:')
--- 755,759 ----
                  message,usedNames).result
          return newTheme
! 
      def SaveAsNewTheme(self):
          newThemeName=self.GetNewThemeName('New Theme Name:')
***************
*** 764,771 ****
          #creates new custom theme based on the previously active theme,
          #and makes the new theme active
!         if self.themeIsBuiltin.get(): 
              themeType='default'
              themeName=self.builtinTheme.get()
!         else:  
              themeType='user'
              themeName=self.customTheme.get()
--- 764,771 ----
          #creates new custom theme based on the previously active theme,
          #and makes the new theme active
!         if self.themeIsBuiltin.get():
              themeType='default'
              themeName=self.builtinTheme.get()
!         else:
              themeType='user'
              themeName=self.customTheme.get()
***************
*** 784,797 ****
          self.themeIsBuiltin.set(0)
          self.SetThemeType()
!     
      def OnListFontButtonRelease(self,event):
          self.fontName.set(self.listFontName.get(ANCHOR))
          self.SetFontSample()
!         
      def SetFontSample(self,event=None):
          fontName=self.fontName.get()
!         if self.fontBold.get(): 
              fontWeight=tkFont.BOLD
!         else: 
              fontWeight=tkFont.NORMAL
          self.editFont.config(size=self.fontSize.get(),
--- 784,797 ----
          self.themeIsBuiltin.set(0)
          self.SetThemeType()
! 
      def OnListFontButtonRelease(self,event):
          self.fontName.set(self.listFontName.get(ANCHOR))
          self.SetFontSample()
! 
      def SetFontSample(self,event=None):
          fontName=self.fontName.get()
!         if self.fontBold.get():
              fontWeight=tkFont.BOLD
!         else:
              fontWeight=tkFont.NORMAL
          self.editFont.config(size=self.fontSize.get(),
***************
*** 808,815 ****
              self.fgHilite.set(1)
          self.SetColourSample()
!     
      def SetColourSampleBinding(self,*args):
          self.SetColourSample()
!         
      def SetColourSample(self):
          #set the colour smaple area
--- 808,815 ----
              self.fgHilite.set(1)
          self.SetColourSample()
! 
      def SetColourSampleBinding(self,*args):
          self.SetColourSample()
! 
      def SetColourSample(self):
          #set the colour smaple area
***************
*** 819,823 ****
          colour=self.textHighlightSample.tag_cget(tag,plane)
          self.frameColourSet.config(bg=colour)
!     
      def PaintThemeSample(self):
          if self.themeIsBuiltin.get(): #a default theme
--- 819,823 ----
          colour=self.textHighlightSample.tag_cget(tag,plane)
          self.frameColourSet.config(bg=colour)
! 
      def PaintThemeSample(self):
          if self.themeIsBuiltin.get(): #a default theme
***************
*** 829,833 ****
              colours=idleConf.GetHighlight(theme,element)
              if element=='cursor': #cursor sample needs special painting
!                 colours['background']=idleConf.GetHighlight(theme, 
                          'normal', fgBg='bg')
              #handle any unsaved changes to this theme
--- 829,833 ----
              colours=idleConf.GetHighlight(theme,element)
              if element=='cursor': #cursor sample needs special painting
!                 colours['background']=idleConf.GetHighlight(theme,
                          'normal', fgBg='bg')
              #handle any unsaved changes to this theme
***************
*** 840,844 ****
              apply(self.textHighlightSample.tag_config,(element,),colours)
          self.SetColourSample()
!     
      def OnCheckUserHelpBrowser(self):
          if self.userHelpBrowser.get():
--- 840,844 ----
              apply(self.textHighlightSample.tag_config,(element,),colours)
          self.SetColourSample()
! 
      def OnCheckUserHelpBrowser(self):
          if self.userHelpBrowser.get():
***************
*** 846,853 ****
          else:
              self.entryHelpBrowser.config(state=DISABLED)
!     
      def HelpSourceSelected(self,event):
          self.SetHelpListButtonStates()
!     
      def SetHelpListButtonStates(self):
          if self.listHelp.size()<1: #no entries in list
--- 846,853 ----
          else:
              self.entryHelpBrowser.config(state=DISABLED)
! 
      def HelpSourceSelected(self,event):
          self.SetHelpListButtonStates()
! 
      def SetHelpListButtonStates(self):
          if self.listHelp.size()<1: #no entries in list
***************
*** 869,873 ****
              self.UpdateUserHelpChangedItems()
          self.SetHelpListButtonStates()
!     
      def HelpListItemEdit(self):
          itemIndex=self.listHelp.index(ANCHOR)
--- 869,873 ----
              self.UpdateUserHelpChangedItems()
          self.SetHelpListButtonStates()
! 
      def HelpListItemEdit(self):
          itemIndex=self.listHelp.index(ANCHOR)
***************
*** 882,886 ****
          self.UpdateUserHelpChangedItems()
          self.SetHelpListButtonStates()
!     
      def HelpListItemRemove(self):
          itemIndex=self.listHelp.index(ANCHOR)
--- 882,886 ----
          self.UpdateUserHelpChangedItems()
          self.SetHelpListButtonStates()
! 
      def HelpListItemRemove(self):
          itemIndex=self.listHelp.index(ANCHOR)
***************
*** 889,893 ****
          self.UpdateUserHelpChangedItems()
          self.SetHelpListButtonStates()
!     
      def UpdateUserHelpChangedItems(self):
          #clear and rebuild the HelpFiles secion in self.changedItems
--- 889,893 ----
          self.UpdateUserHelpChangedItems()
          self.SetHelpListButtonStates()
! 
      def UpdateUserHelpChangedItems(self):
          #clear and rebuild the HelpFiles secion in self.changedItems
***************
*** 897,901 ****
              self.AddChangedItem('main','HelpFiles',str(num),
                      string.join(self.userHelpList[num-1],';'))
!     
      def LoadFontCfg(self):
          ##base editor font selection list
--- 897,901 ----
              self.AddChangedItem('main','HelpFiles',str(num),
                      string.join(self.userHelpList[num-1],';'))
! 
      def LoadFontCfg(self):
          ##base editor font selection list
***************
*** 920,926 ****
          self.fontBold.set(idleConf.GetOption('main','EditorWindow',
                  'font-bold',default=0,type='bool'))
!         ##font sample 
          self.SetFontSample()
!     
      def LoadTabCfg(self):
          ##indent type radiobuttons
--- 920,926 ----
          self.fontBold.set(idleConf.GetOption('main','EditorWindow',
                  'font-bold',default=0,type='bool'))
!         ##font sample
          self.SetFontSample()
! 
      def LoadTabCfg(self):
          ##indent type radiobuttons
***************
*** 935,939 ****
          self.spaceNum.set(spaceNum)
          #self.tabCols.set(tabCols)
!     
      def LoadThemeCfg(self):
          ##current theme type radiobutton
--- 935,939 ----
          self.spaceNum.set(spaceNum)
          #self.tabCols.set(tabCols)
! 
      def LoadThemeCfg(self):
          ##current theme type radiobutton
***************
*** 951,955 ****
              if not itemList:
                  self.radioThemeCustom.config(state=DISABLED)
!                 self.customTheme.set('- no custom themes -')    
              else:
                  self.optMenuThemeCustom.SetMenu(itemList,itemList[0])
--- 951,955 ----
              if not itemList:
                  self.radioThemeCustom.config(state=DISABLED)
!                 self.customTheme.set('- no custom themes -')
              else:
                  self.optMenuThemeCustom.SetMenu(itemList,itemList[0])
***************
*** 965,977 ****
          themeNames=self.themeElements.keys()
          themeNames.sort(self.__ThemeNameIndexCompare)
!         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
--- 965,977 ----
          themeNames=self.themeElements.keys()
          themeNames.sort(self.__ThemeNameIndexCompare)
!         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
***************
*** 988,993 ****
              itemList.sort()
              if not itemList:
!                 self.radioKeysCustom.config(state=DISABLED)    
!                 self.customKeys.set('- no custom keys -')    
              else:
                  self.optMenuKeysCustom.SetMenu(itemList,itemList[0])
--- 988,993 ----
              itemList.sort()
              if not itemList:
!                 self.radioKeysCustom.config(state=DISABLED)
!                 self.customKeys.set('- no custom keys -')
              else:
                  self.optMenuKeysCustom.SetMenu(itemList,itemList[0])
***************
*** 999,1007 ****
              itemList.sort()
              self.optMenuKeysBuiltin.SetMenu(itemList,itemList[0])
!         self.SetKeysType()   
          ##load keyset element list
          keySetName=idleConf.CurrentKeys()
          self.LoadKeysList(keySetName)
!     
      def LoadGeneralCfg(self):
          #startup state
--- 999,1007 ----
              itemList.sort()
              self.optMenuKeysBuiltin.SetMenu(itemList,itemList[0])
!         self.SetKeysType()
          ##load keyset element list
          keySetName=idleConf.CurrentKeys()
          self.LoadKeysList(keySetName)
! 
      def LoadGeneralCfg(self):
          #startup state
***************
*** 1009,1013 ****
                  'editor-on-startup',default=1,type='bool'))
          #initial window size
!         self.winWidth.set(idleConf.GetOption('main','EditorWindow','width'))       
          self.winHeight.set(idleConf.GetOption('main','EditorWindow','height'))
          #help browsing
--- 1009,1013 ----
                  'editor-on-startup',default=1,type='bool'))
          #initial window size
!         self.winWidth.set(idleConf.GetOption('main','EditorWindow','width'))
          self.winHeight.set(idleConf.GetOption('main','EditorWindow','height'))
          #help browsing
***************
*** 1021,1025 ****
          #        'user-help-browser-command',default=''))
          #self.OnCheckUserHelpBrowser()
!     
      def LoadConfigs(self):
          """
--- 1021,1025 ----
          #        'user-help-browser-command',default=''))
          #self.OnCheckUserHelpBrowser()
! 
      def LoadConfigs(self):
          """
***************
*** 1028,1033 ****
          """
          ### fonts / tabs page
!         self.LoadFontCfg()        
!         self.LoadTabCfg()        
          ### highlighting page
          self.LoadThemeCfg()
--- 1028,1033 ----
          """
          ### fonts / tabs page
!         self.LoadFontCfg()
!         self.LoadTabCfg()
          ### highlighting page
          self.LoadThemeCfg()
***************
*** 1036,1040 ****
          ### general page
          self.LoadGeneralCfg()
!         
      def SaveNewKeySet(self,keySetName,keySet):
          """
--- 1036,1040 ----
          ### general page
          self.LoadGeneralCfg()
! 
      def SaveNewKeySet(self,keySetName,keySet):
          """
***************
*** 1048,1052 ****
              value=keySet[event]
              idleConf.userCfg['keys'].SetOption(keySetName,event,value)
!     
      def SaveNewTheme(self,themeName,theme):
          """
--- 1048,1052 ----
              value=keySet[event]
              idleConf.userCfg['keys'].SetOption(keySetName,event,value)
! 
      def SaveNewTheme(self,themeName,theme):
          """
***************
*** 1060,1064 ****
              value=theme[element]
              idleConf.userCfg['highlight'].SetOption(themeName,element,value)
!     
      def SetUserValue(self,configType,section,item,value):
          if idleConf.defaultCfg[configType].has_option(section,item):
--- 1060,1064 ----
              value=theme[element]
              idleConf.userCfg['highlight'].SetOption(themeName,element,value)
! 
      def SetUserValue(self,configType,section,item,value):
          if idleConf.defaultCfg[configType].has_option(section,item):
***************
*** 1068,1072 ****
          #if we got here set the option
          return idleConf.userCfg[configType].SetOption(section,item,value)
!             
      def SaveAllChangedConfigs(self):
          """
--- 1068,1072 ----
          #if we got here set the option
          return idleConf.userCfg[configType].SetOption(section,item,value)
! 
      def SaveAllChangedConfigs(self):
          """
***************
*** 1083,1092 ****
                      if self.SetUserValue(configType,section,item,value):
                          cfgTypeHasChanges=1
!             if cfgTypeHasChanges: 
!                 idleConf.userCfg[configType].Save()                
          self.ResetChangedItems() #clear the changed items dict
!          
      def ActivateConfigChanges(self):
!         #things that need to be done to make 
          #applied config changes dynamic:
          #update editor/shell font and repaint
--- 1083,1092 ----
                      if self.SetUserValue(configType,section,item,value):
                          cfgTypeHasChanges=1
!             if cfgTypeHasChanges:
!                 idleConf.userCfg[configType].Save()
          self.ResetChangedItems() #clear the changed items dict
! 
      def ActivateConfigChanges(self):
!         #things that need to be done to make
          #applied config changes dynamic:
          #update editor/shell font and repaint
***************
*** 1101,1105 ****
              instance.ResetKeybindings()
              instance.ResetExtraHelpMenu()
!         
      def Cancel(self):
          self.destroy()
--- 1101,1105 ----
              instance.ResetKeybindings()
              instance.ResetExtraHelpMenu()
! 
      def Cancel(self):
          self.destroy()

Index: configHandler.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configHandler.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** configHandler.py	30 Nov 2002 19:10:19 -0000	1.26
--- configHandler.py	31 Dec 2002 16:03:23 -0000	1.27
***************
*** 6,11 ****
  # idle. This is to allow idle to continue to function in spite of errors in
  # the retrieval of config information. When a default is returned instead of
! # a requested config value, a message is printed to stderr to aid in 
! # configuration problem notification and resolution. 
  
  import os, sys, string
--- 6,11 ----
  # idle. This is to allow idle to continue to function in spite of errors in
  # the retrieval of config information. When a default is returned instead of
! # a requested config value, a message is printed to stderr to aid in
! # configuration problem notification and resolution.
  
  import os, sys, string
***************
*** 27,31 ****
          self.file=cfgFile
          ConfigParser.__init__(self,defaults=cfgDefaults)
!     
      def Get(self, section, option, type=None, default=None):
          """
--- 27,31 ----
          self.file=cfgFile
          ConfigParser.__init__(self,defaults=cfgDefaults)
! 
      def Get(self, section, option, type=None, default=None):
          """
***************
*** 33,41 ****
          If type is specified, return as type.
          """
!         if type=='bool': 
              getVal=self.getboolean
!         elif type=='int': 
              getVal=self.getint
!         else: 
              getVal=self.get
          if self.has_option(section,option):
--- 33,41 ----
          If type is specified, return as type.
          """
!         if type=='bool':
              getVal=self.getboolean
!         elif type=='int':
              getVal=self.getint
!         else:
              getVal=self.get
          if self.has_option(section,option):
***************
*** 55,63 ****
  
      def Load(self):
!         """ 
!         Load the configuration file from disk 
          """
          self.read(self.file)
!         
  class IdleUserConfParser(IdleConfParser):
      """
--- 55,63 ----
  
      def Load(self):
!         """
!         Load the configuration file from disk
          """
          self.read(self.file)
! 
  class IdleUserConfParser(IdleConfParser):
      """
***************
*** 71,75 ****
          if not self.has_section(section):
              self.add_section(section)
!     
      def RemoveEmptySections(self):
          """
--- 71,75 ----
          if not self.has_section(section):
              self.add_section(section)
! 
      def RemoveEmptySections(self):
          """
***************
*** 78,83 ****
          for section in self.sections():
              if not self.GetOptionList(section):
!                 self.remove_section(section) 
!     
      def IsEmpty(self):
          """
--- 78,83 ----
          for section in self.sections():
              if not self.GetOptionList(section):
!                 self.remove_section(section)
! 
      def IsEmpty(self):
          """
***************
*** 90,94 ****
          else:
              return 1
!     
      def RemoveOption(self,section,option):
          """
--- 90,94 ----
          else:
              return 1
! 
      def RemoveOption(self,section,option):
          """
***************
*** 98,102 ****
          if self.has_section(section):
              return self.remove_option(section,option)
!     
      def SetOption(self,section,option,value):
          """
--- 98,102 ----
          if self.has_section(section):
              return self.remove_option(section,option)
! 
      def SetOption(self,section,option,value):
          """
***************
*** 115,119 ****
              self.set(section,option,value)
              return 1
!      
      def RemoveFile(self):
          """
--- 115,119 ----
              self.set(section,option,value)
              return 1
! 
      def RemoveFile(self):
          """
***************
*** 121,126 ****
          """
          if os.path.exists(self.file):
!             os.remove(self.file)    
!     
      def Save(self):
          """
--- 121,126 ----
          """
          if os.path.exists(self.file):
!             os.remove(self.file)
! 
      def Save(self):
          """
***************
*** 155,162 ****
          self.LoadCfgFiles()
          #self.LoadCfg()
!             
      def CreateConfigHandlers(self):
          """
!         set up a dictionary of config parsers for default and user 
          configurations respectively
          """
--- 155,162 ----
          self.LoadCfgFiles()
          #self.LoadCfg()
! 
      def CreateConfigHandlers(self):
          """
!         set up a dictionary of config parsers for default and user
          configurations respectively
          """
***************
*** 171,183 ****
          usrCfgFiles={}
          for cfgType in configTypes: #build config file names
!             defCfgFiles[cfgType]=os.path.join(idleDir,'config-'+cfgType+'.def')                    
!             usrCfgFiles[cfgType]=os.path.join(userDir,'config-'+cfgType+'.cfg')                    
          for cfgType in configTypes: #create config parsers
              self.defaultCfg[cfgType]=IdleConfParser(defCfgFiles[cfgType])
              self.userCfg[cfgType]=IdleUserConfParser(usrCfgFiles[cfgType])
!     
      def GetUserCfgDir(self):
          """
!         Creates (if required) and returns a filesystem directory for storing 
          user config files.
          """
--- 171,183 ----
          usrCfgFiles={}
          for cfgType in configTypes: #build config file names
!             defCfgFiles[cfgType]=os.path.join(idleDir,'config-'+cfgType+'.def')
!             usrCfgFiles[cfgType]=os.path.join(userDir,'config-'+cfgType+'.cfg')
          for cfgType in configTypes: #create config parsers
              self.defaultCfg[cfgType]=IdleConfParser(defCfgFiles[cfgType])
              self.userCfg[cfgType]=IdleUserConfParser(usrCfgFiles[cfgType])
! 
      def GetUserCfgDir(self):
          """
!         Creates (if required) and returns a filesystem directory for storing
          user config files.
          """
***************
*** 193,199 ****
              #traditionally idle has defaulted to os.getcwd(), is this adeqate?
              userDir = os.getcwd() #hack for no real homedir
!         userDir=os.path.join(userDir,cfgDir)    
          if not os.path.exists(userDir):
!             try: #make the config dir if it doesn't exist yet 
                  os.mkdir(userDir)
              except IOError:
--- 193,199 ----
              #traditionally idle has defaulted to os.getcwd(), is this adeqate?
              userDir = os.getcwd() #hack for no real homedir
!         userDir=os.path.join(userDir,cfgDir)
          if not os.path.exists(userDir):
!             try: #make the config dir if it doesn't exist yet
                  os.mkdir(userDir)
              except IOError:
***************
*** 202,213 ****
                  sys.stderr.write(warn)
          return userDir
!     
      def GetOption(self, configType, section, option, default=None, type=None):
          """
!         Get an option value for given config type and given general 
          configuration section/option or return a default. If type is specified,
!         return as type. Firstly the user configuration is checked, with a 
!         fallback to the default configuration, and a final 'catch all' 
!         fallback to a useable passed-in default if the option isn't present in 
          either the user or the default configuration.
          configType must be one of ('main','extensions','highlight','keys')
--- 202,213 ----
                  sys.stderr.write(warn)
          return userDir
! 
      def GetOption(self, configType, section, option, default=None, type=None):
          """
!         Get an option value for given config type and given general
          configuration section/option or return a default. If type is specified,
!         return as type. Firstly the user configuration is checked, with a
!         fallback to the default configuration, and a final 'catch all'
!         fallback to a useable passed-in default if the option isn't present in
          either the user or the default configuration.
          configType must be one of ('main','extensions','highlight','keys')
***************
*** 225,234 ****
              sys.stderr.write(warning)
              return default
!     
      def GetSectionList(self, configSet, configType):
          """
!         Get a list of sections from either the user or default config for 
          the given config type.
!         configSet must be either 'user' or 'default' 
          configType must be one of ('main','extensions','highlight','keys')
          """
--- 225,234 ----
              sys.stderr.write(warning)
              return default
! 
      def GetSectionList(self, configSet, configType):
          """
!         Get a list of sections from either the user or default config for
          the given config type.
!         configSet must be either 'user' or 'default'
          configType must be one of ('main','extensions','highlight','keys')
          """
***************
*** 242,252 ****
              raise InvalidConfigSet, 'Invalid configSet specified'
          return cfgParser.sections()
!     
      def GetHighlight(self, theme, element, fgBg=None):
          """
          return individual highlighting theme elements.
          fgBg - string ('fg'or'bg') or None, if None return a dictionary
!         containing fg and bg colours (appropriate for passing to Tkinter in, 
!         e.g., a tag_config call), otherwise fg or bg colour only as specified. 
          """
          if self.defaultCfg['highlight'].has_section(theme):
--- 242,252 ----
              raise InvalidConfigSet, 'Invalid configSet specified'
          return cfgParser.sections()
! 
      def GetHighlight(self, theme, element, fgBg=None):
          """
          return individual highlighting theme elements.
          fgBg - string ('fg'or'bg') or None, if None return a dictionary
!         containing fg and bg colours (appropriate for passing to Tkinter in,
!         e.g., a tag_config call), otherwise fg or bg colour only as specified.
          """
          if self.defaultCfg['highlight'].has_section(theme):
***************
*** 257,261 ****
          if element=='cursor': #there is no config value for cursor bg
              back=themeDict['normal-background']
!         else:    
              back=themeDict[element+'-background']
          highlight={"foreground": fore,"background": back}
--- 257,261 ----
          if element=='cursor': #there is no config value for cursor bg
              back=themeDict['normal-background']
!         else:
              back=themeDict[element+'-background']
          highlight={"foreground": fore,"background": back}
***************
*** 267,271 ****
              if fgBg == 'bg':
                  return highlight["background"]
!             else:    
                  raise InvalidFgBg, 'Invalid fgBg specified'
  
--- 267,271 ----
              if fgBg == 'bg':
                  return highlight["background"]
!             else:
                  raise InvalidFgBg, 'Invalid fgBg specified'
  
***************
*** 276,280 ****
          Returns a dictionary which holds {option:value} for each element
          in the specified theme. Values are loaded over a set of ultimate last
!         fallback defaults to guarantee that all theme elements are present in 
          a newly created theme.
          """
--- 276,280 ----
          Returns a dictionary which holds {option:value} for each element
          in the specified theme. Values are loaded over a set of ultimate last
!         fallback defaults to guarantee that all theme elements are present in
          a newly created theme.
          """
***************
*** 289,301 ****
          #by idle, to allow for their use in the future. Default values are
          #generally black and white.
!         theme={ 'normal-foreground':'#000000', 
!                 'normal-background':'#ffffff', 
!                 'keyword-foreground':'#000000', 
!                 'keyword-background':'#ffffff', 
!                 'comment-foreground':'#000000', 
!                 'comment-background':'#ffffff', 
                  'string-foreground':'#000000',
                  'string-background':'#ffffff',
!                 'definition-foreground':'#000000', 
                  'definition-background':'#ffffff',
                  'hilite-foreground':'#000000',
--- 289,301 ----
          #by idle, to allow for their use in the future. Default values are
          #generally black and white.
!         theme={ 'normal-foreground':'#000000',
!                 'normal-background':'#ffffff',
!                 'keyword-foreground':'#000000',
!                 'keyword-background':'#ffffff',
!                 'comment-foreground':'#000000',
!                 'comment-background':'#ffffff',
                  'string-foreground':'#000000',
                  'string-background':'#ffffff',
!                 'definition-foreground':'#000000',
                  'definition-background':'#ffffff',
                  'hilite-foreground':'#000000',
***************
*** 306,312 ****
                  'hit-background':'#000000',
                  'error-foreground':'#ffffff',
!                 'error-background':'#000000', 
!                 #cursor (only foreground can be set) 
!                 'cursor-foreground':'#000000', 
                  #shell window
                  'stdout-foreground':'#000000',
--- 306,312 ----
                  'hit-background':'#000000',
                  'error-foreground':'#ffffff',
!                 'error-background':'#000000',
!                 #cursor (only foreground can be set)
!                 'cursor-foreground':'#000000',
                  #shell window
                  'stdout-foreground':'#000000',
***************
*** 324,343 ****
                             ' returning default value: '+`theme[element]`+'\n')
                  sys.stderr.write(warning)
!             colour=cfgParser.Get(themeName,element,default=theme[element])        
              theme[element]=colour
          return theme
!         
      def CurrentTheme(self):
          """
!         Returns the name of the currently active theme        
          """
          return self.GetOption('main','Theme','name',default='')
!         
      def CurrentKeys(self):
          """
!         Returns the name of the currently active key set       
          """
          return self.GetOption('main','Keys','name',default='')
!     
      def GetExtensions(self, activeOnly=1):
          """
--- 324,343 ----
                             ' returning default value: '+`theme[element]`+'\n')
                  sys.stderr.write(warning)
!             colour=cfgParser.Get(themeName,element,default=theme[element])
              theme[element]=colour
          return theme
! 
      def CurrentTheme(self):
          """
!         Returns the name of the currently active theme
          """
          return self.GetOption('main','Theme','name',default='')
! 
      def CurrentKeys(self):
          """
!         Returns the name of the currently active key set
          """
          return self.GetOption('main','Keys','name',default='')
! 
      def GetExtensions(self, activeOnly=1):
          """
***************
*** 351,355 ****
          for extn in userExtns:
              if extn not in extns: #user has added own extension
!                 extns.append(extn) 
          if activeOnly:
              activeExtns=[]
--- 351,355 ----
          for extn in userExtns:
              if extn not in extns: #user has added own extension
!                 extns.append(extn)
          if activeOnly:
              activeExtns=[]
***************
*** 361,365 ****
              return activeExtns
          else:
!             return extns        
  
      def RemoveKeyBindNames(self,extnNameList):
--- 361,365 ----
              return activeExtns
          else:
!             return extns
  
      def RemoveKeyBindNames(self,extnNameList):
***************
*** 368,379 ****
          kbNameIndicies=[]
          for name in names:
!             if name.endswith('_bindings') or name.endswith('_cfgBindings'): 
!                     kbNameIndicies.append(names.index(name))
          kbNameIndicies.sort()
          kbNameIndicies.reverse()
!         for index in kbNameIndicies: #delete each keybinding section name    
              del(names[index])
          return names
!         
      def GetExtnNameForEvent(self,virtualEvent):
          """
--- 368,379 ----
          kbNameIndicies=[]
          for name in names:
!             if name.endswith('_bindings') or name.endswith('_cfgBindings'):
!                 kbNameIndicies.append(names.index(name))
          kbNameIndicies.sort()
          kbNameIndicies.reverse()
!         for index in kbNameIndicies: #delete each keybinding section name
              del(names[index])
          return names
! 
      def GetExtnNameForEvent(self,virtualEvent):
          """
***************
*** 390,394 ****
                      extName=extn
          return extName
!     
      def GetExtensionKeys(self,extensionName):
          """
--- 390,394 ----
                      extName=extn
          return extName
! 
      def GetExtensionKeys(self,extensionName):
          """
***************
*** 406,411 ****
                  binding=activeKeys[event]
                  extKeys[event]=binding
!         return extKeys 
!         
      def __GetRawExtensionKeys(self,extensionName):
          """
--- 406,411 ----
                  binding=activeKeys[event]
                  extKeys[event]=binding
!         return extKeys
! 
      def __GetRawExtensionKeys(self,extensionName):
          """
***************
*** 423,433 ****
                  event='<<'+eventName+'>>'
                  extKeys[event]=binding
!         return extKeys 
!     
      def GetExtensionBindings(self,extensionName):
          """
          Returns a dictionary of all the event bindings for a particular
          extension. The configurable keybindings are returned as they exist in
!         the dictionary returned by GetCurrentKeySet; that is, where re-used 
          keybindings are disabled.
          """
--- 423,433 ----
                  event='<<'+eventName+'>>'
                  extKeys[event]=binding
!         return extKeys
! 
      def GetExtensionBindings(self,extensionName):
          """
          Returns a dictionary of all the event bindings for a particular
          extension. The configurable keybindings are returned as they exist in
!         the dictionary returned by GetCurrentKeySet; that is, where re-used
          keybindings are disabled.
          """
***************
*** 442,453 ****
                  event='<<'+eventName+'>>'
                  extBinds[event]=binding
!         
!         return extBinds 
!         
      def GetKeyBinding(self, keySetName, eventStr):
          """
          returns the keybinding for a specific event.
          keySetName - string, name of key binding set
!         eventStr - string, the virtual event we want the binding for, 
                     represented as a string, eg. '<<event>>'
          """
--- 442,453 ----
                  event='<<'+eventName+'>>'
                  extBinds[event]=binding
! 
!         return extBinds
! 
      def GetKeyBinding(self, keySetName, eventStr):
          """
          returns the keybinding for a specific event.
          keySetName - string, name of key binding set
!         eventStr - string, the virtual event we want the binding for,
                     represented as a string, eg. '<<event>>'
          """
***************
*** 458,465 ****
      def GetCurrentKeySet(self):
          return self.GetKeySet(self.CurrentKeys())
!     
      def GetKeySet(self,keySetName):
          """
!         Returns a dictionary of: all requested core keybindings, plus the 
          keybindings for all currently active extensions. If a binding defined
          in an extension is already in use, that binding is disabled.
--- 458,465 ----
      def GetCurrentKeySet(self):
          return self.GetKeySet(self.CurrentKeys())
! 
      def GetKeySet(self,keySetName):
          """
!         Returns a dictionary of: all requested core keybindings, plus the
          keybindings for all currently active extensions. If a binding defined
          in an extension is already in use, that binding is disabled.
***************
*** 484,488 ****
          """
          return ('<<'+virtualEvent+'>>') in self.GetCoreKeys().keys()
!     
      def GetCoreKeys(self, keySetName=None):
          """
--- 484,488 ----
          """
          return ('<<'+virtualEvent+'>>') in self.GetCoreKeys().keys()
! 
      def GetCoreKeys(self, keySetName=None):
          """
***************
*** 505,509 ****
              '<<end-of-file>>': ['<Control-d>'],
              '<<python-docs>>': ['<F1>'],
!             '<<python-context-help>>': ['<Shift-F1>'], 
              '<<history-next>>': ['<Alt-n>'],
              '<<history-previous>>': ['<Alt-p>'],
--- 505,509 ----
              '<<end-of-file>>': ['<Control-d>'],
              '<<python-docs>>': ['<F1>'],
!             '<<python-context-help>>': ['<Shift-F1>'],
              '<<history-next>>': ['<Alt-n>'],
              '<<history-previous>>': ['<Alt-p>'],
***************
*** 528,532 ****
              '<<find>>': ['<Control-f>'],
              '<<replace>>': ['<Control-h>'],
!             '<<goto-line>>': ['<Alt-g>'], 
              '<<smart-backspace>>': ['<Key-BackSpace>'],
              '<<newline-and-indent>>': ['<Key-Return> <Key-KP_Enter>'],
--- 528,532 ----
              '<<find>>': ['<Control-f>'],
              '<<replace>>': ['<Control-h>'],
!             '<<goto-line>>': ['<Alt-g>'],
              '<<smart-backspace>>': ['<Key-BackSpace>'],
              '<<newline-and-indent>>': ['<Key-Return> <Key-KP_Enter>'],
***************
*** 553,557 ****
                      sys.stderr.write(warning)
          return keyBindings
!     
      def GetExtraHelpSourceList(self,configSet):
          """
--- 553,557 ----
                      sys.stderr.write(warning)
          return keyBindings
! 
      def GetExtraHelpSourceList(self,configSet):
          """
***************
*** 560,568 ****
          , or an empty list if there are none. Returned tuples are of the form
          form (menu_item , path_to_help_file , option).
!         """    
          helpSources=[]
          if configSet=='user':
              cfgParser=self.userCfg['main']
!         elif configSet=='default':   
              cfgParser=self.defaultCfg['main']
          else:
--- 560,568 ----
          , or an empty list if there are none. Returned tuples are of the form
          form (menu_item , path_to_help_file , option).
!         """
          helpSources=[]
          if configSet=='user':
              cfgParser=self.userCfg['main']
!         elif configSet=='default':
              cfgParser=self.defaultCfg['main']
          else:
***************
*** 584,602 ****
      def GetAllExtraHelpSourcesList(self):
          """
!         Returns a list of tuples containing the details of all additional help 
          sources configured, or an empty list if there are none. Tuples are of
          the format returned by GetExtraHelpSourceList.
!         """ 
!         allHelpSources=( self.GetExtraHelpSourceList('default')+ 
                  self.GetExtraHelpSourceList('user') )
!         return allHelpSources   
!         
      def LoadCfgFiles(self):
!         """ 
          load all configuration files.
          """
          for key in self.defaultCfg.keys():
!             self.defaultCfg[key].Load()                    
!             self.userCfg[key].Load() #same keys                    
  
      def SaveUserCfgFiles(self):
--- 584,602 ----
      def GetAllExtraHelpSourcesList(self):
          """
!         Returns a list of tuples containing the details of all additional help
          sources configured, or an empty list if there are none. Tuples are of
          the format returned by GetExtraHelpSourceList.
!         """
!         allHelpSources=( self.GetExtraHelpSourceList('default')+
                  self.GetExtraHelpSourceList('user') )
!         return allHelpSources
! 
      def LoadCfgFiles(self):
!         """
          load all configuration files.
          """
          for key in self.defaultCfg.keys():
!             self.defaultCfg[key].Load()
!             self.userCfg[key].Load() #same keys
  
      def SaveUserCfgFiles(self):
***************
*** 605,609 ****
          """
          for key in self.userCfg.keys():
!             self.userCfg[key].Save()    
  
  idleConf=IdleConf()
--- 605,609 ----
          """
          for key in self.userCfg.keys():
!             self.userCfg[key].Save()
  
  idleConf=IdleConf()
***************
*** 619,623 ****
              for section in sections:
                  options=cfg[key].options(section)
!                 print section    
                  print options
                  for option in options:
--- 619,623 ----
              for section in sections:
                  options=cfg[key].options(section)
!                 print section
                  print options
                  for option in options:

Index: configHelpSourceEdit.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configHelpSourceEdit.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** configHelpSourceEdit.py	27 Mar 2002 02:24:54 -0000	1.2
--- configHelpSourceEdit.py	31 Dec 2002 16:03:23 -0000	1.3
***************
*** 28,32 ****
          self.update_idletasks()
          #needs to be done here so that the winfo_reqwidth is valid
!         self.geometry("+%d+%d" % 
              ((parent.winfo_rootx()+((parent.winfo_width()/2)
                  -(self.winfo_reqwidth()/2)),
--- 28,32 ----
          self.update_idletasks()
          #needs to be done here so that the winfo_reqwidth is valid
!         self.geometry("+%d+%d" %
              ((parent.winfo_rootx()+((parent.winfo_width()/2)
                  -(self.winfo_reqwidth()/2)),
***************
*** 64,68 ****
  
      def MenuOk(self):
!         #simple validity check for a sensible 
          #menu item name
          menuOk=1
--- 64,68 ----
  
      def MenuOk(self):
!         #simple validity check for a sensible
          #menu item name
          menuOk=1
***************
*** 81,87 ****
              menuOk=0
          return menuOk
!     
      def PathOk(self):
!         #simple validity check for menu file path 
          pathOk=1
          path=self.path.get()
--- 81,87 ----
              menuOk=0
          return menuOk
! 
      def PathOk(self):
!         #simple validity check for menu file path
          pathOk=1
          path=self.path.get()
***************
*** 98,108 ****
              pathOk=0
          return pathOk
!             
      def Ok(self, event=None):
          if self.MenuOk():
              if self.PathOk():
!                 self.result=( self.menu.get().strip(),self.path.get().strip() ) 
                  self.destroy()
!         
      def Cancel(self, event=None):
          self.result=None
--- 98,108 ----
              pathOk=0
          return pathOk
! 
      def Ok(self, event=None):
          if self.MenuOk():
              if self.PathOk():
!                 self.result=( self.menu.get().strip(),self.path.get().strip() )
                  self.destroy()
! 
      def Cancel(self, event=None):
          self.result=None
***************
*** 118,121 ****
      Button(root,text='Dialog',command=run).pack()
      root.mainloop()
-     
-  
--- 118,119 ----

Index: configSectionNameDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configSectionNameDialog.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** configSectionNameDialog.py	5 Feb 2002 04:52:32 -0000	1.2
--- configSectionNameDialog.py	31 Dec 2002 16:03:23 -0000	1.3
***************
*** 28,32 ****
          #needs to be done here so that the winfo_reqwidth is valid
          self.messageInfo.config(width=self.frameMain.winfo_reqwidth())
!         self.geometry("+%d+%d" % 
              ((parent.winfo_rootx()+((parent.winfo_width()/2)
                  -(self.winfo_reqwidth()/2)),
--- 28,32 ----
          #needs to be done here so that the winfo_reqwidth is valid
          self.messageInfo.config(width=self.frameMain.winfo_reqwidth())
!         self.geometry("+%d+%d" %
              ((parent.winfo_rootx()+((parent.winfo_width()/2)
                  -(self.winfo_reqwidth()/2)),
***************
*** 57,61 ****
  
      def NameOk(self):
!         #simple validity check for a sensible 
          #ConfigParser file section name
          nameOk=1
--- 57,61 ----
  
      def NameOk(self):
!         #simple validity check for a sensible
          #ConfigParser file section name
          nameOk=1
***************
*** 76,85 ****
              nameOk=0
          return nameOk
!     
      def Ok(self, event=None):
          if self.NameOk():
              self.result=self.name.get().strip()
              self.destroy()
!         
      def Cancel(self, event=None):
          self.result=''
--- 76,85 ----
              nameOk=0
          return nameOk
! 
      def Ok(self, event=None):
          if self.NameOk():
              self.result=self.name.get().strip()
              self.destroy()
! 
      def Cancel(self, event=None):
          self.result=''
***************
*** 96,99 ****
      Button(root,text='Dialog',command=run).pack()
      root.mainloop()
-     
-  
--- 96,97 ----

Index: dynOptionMenuWidget.py
===================================================================
RCS file: /cvsroot/idlefork/idle/dynOptionMenuWidget.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dynOptionMenuWidget.py	19 Jan 2002 00:29:54 -0000	1.4
--- dynOptionMenuWidget.py	31 Dec 2002 16:03:23 -0000	1.5
***************
*** 21,30 ****
          self.variable=variable
          self.command=kwargs.get('command')
!     
      def SetMenu(self,valueList,value=None):
          """
          clear and reload the menu with a new set of options.
          valueList - list of new options
!         value - initial value to set the optionmenu's menubutton to 
          """
          self['menu'].delete(0,'end')
--- 21,30 ----
          self.variable=variable
          self.command=kwargs.get('command')
! 
      def SetMenu(self,valueList,value=None):
          """
          clear and reload the menu with a new set of options.
          valueList - list of new options
!         value - initial value to set the optionmenu's menubutton to
          """
          self['menu'].delete(0,'end')

Index: keybindingDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/keybindingDialog.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** keybindingDialog.py	29 Sep 2002 00:23:08 -0000	1.9
--- keybindingDialog.py	31 Dec 2002 16:03:23 -0000	1.10
***************
*** 1,4 ****
  """
! dialog for building tkinter accelerator key bindings 
  """
  from Tkinter import *
--- 1,4 ----
  """
! dialog for building tkinter accelerator key bindings
  """
  from Tkinter import *
***************
*** 12,16 ****
                   mapped to
          currentKeys - list, a list of all key sequence lists currently mapped
!                  to virtual events, for overlap checking   
          """
          Toplevel.__init__(self, parent)
--- 12,16 ----
                   mapped to
          currentKeys - list, a list of all key sequence lists currently mapped
!                  to virtual events, for overlap checking
          """
          Toplevel.__init__(self, parent)
***************
*** 37,41 ****
          self.withdraw() #hide while setting geometry
          self.update_idletasks()
!         self.geometry("+%d+%d" % 
              ((parent.winfo_rootx()+((parent.winfo_width()/2)
                  -(self.winfo_reqwidth()/2)),
--- 37,41 ----
          self.withdraw() #hide while setting geometry
          self.update_idletasks()
!         self.geometry("+%d+%d" %
              ((parent.winfo_rootx()+((parent.winfo_width()/2)
                  -(self.winfo_reqwidth()/2)),
***************
*** 44,48 ****
          self.deiconify() #geometry set, unhide
          self.wait_window()
!         
      def CreateWidgets(self):
          frameMain = Frame(self,borderwidth=2,relief=SUNKEN)
--- 44,48 ----
          self.deiconify() #geometry set, unhide
          self.wait_window()
! 
      def CreateWidgets(self):
          frameMain = Frame(self,borderwidth=2,relief=SUNKEN)
***************
*** 144,152 ****
              self.buttonLevel.config(text='Advanced Key Binding Entry >>')
              self.frameKeySeqBasic.lift()
!             self.frameControlsBasic.lift()    
!     
      def FinalKeySelected(self,event):
          self.BuildKeyString()
!         
      def BuildKeyString(self):
          keyList=[]
--- 144,152 ----
              self.buttonLevel.config(text='Advanced Key Binding Entry >>')
              self.frameKeySeqBasic.lift()
!             self.frameControlsBasic.lift()
! 
      def FinalKeySelected(self,event):
          self.BuildKeyString()
! 
      def BuildKeyString(self):
          keyList=[]
***************
*** 155,160 ****
          if modifiers: modifiers[0]='<'+modifiers[0]
          keyList=keyList+modifiers
!         if finalKey: 
!             if (not modifiers) and (finalKey not 
                      in self.alphanumKeys+self.punctuationKeys):
                  finalKey='<'+self.TranslateKey(finalKey)
--- 155,160 ----
          if modifiers: modifiers[0]='<'+modifiers[0]
          keyList=keyList+modifiers
!         if finalKey:
!             if (not modifiers) and (finalKey not
                      in self.alphanumKeys+self.punctuationKeys):
                  finalKey='<'+self.TranslateKey(finalKey)
***************
*** 164,168 ****
          keyStr=string.join(keyList,'-')
          self.keyString.set(keyStr)
!         
      def GetModifiers(self):
          modList = [variable.get() for variable in self.modifier_vars]
--- 164,168 ----
          keyStr=string.join(keyList,'-')
          self.keyString.set(keyStr)
! 
      def GetModifiers(self):
          modList = [variable.get() for variable in self.modifier_vars]
***************
*** 175,179 ****
              variable.set('')
          self.keyString.set('')
!     
      def LoadFinalKeyList(self):
          #these tuples are also available for use in validity checks
--- 175,179 ----
              variable.set('')
          self.keyString.set('')
! 
      def LoadFinalKeyList(self):
          #these tuples are also available for use in validity checks
***************
*** 191,195 ****
          apply(self.listKeysFinal.insert,
              (END,)+keys)
!     
      def TranslateKey(self,key):
          #translate from key list value to tkinter key-id
--- 191,195 ----
          apply(self.listKeysFinal.insert,
              (END,)+keys)
! 
      def TranslateKey(self,key):
          #translate from key list value to tkinter key-id
***************
*** 207,220 ****
          key='Key-'+key
          return key
!     
      def Ok(self, event=None):
          if self.KeysOk():
              self.result=self.keyString.get()
              self.destroy()
!         
      def Cancel(self, event=None):
          self.result=''
          self.destroy()
!     
      def KeysOk(self):
          #simple validity check
--- 207,220 ----
          key='Key-'+key
          return key
! 
      def Ok(self, event=None):
          if self.KeysOk():
              self.result=self.keyString.get()
              self.destroy()
! 
      def Cancel(self, event=None):
          self.result=''
          self.destroy()
! 
      def KeysOk(self):
          #simple validity check
***************
*** 233,237 ****
                      message='No final key specified.')
              keysOk=0
!         elif (not modifiers) and (finalKey in 
                  self.alphanumKeys+self.punctuationKeys):
              #modifier required
--- 233,237 ----
                      message='No final key specified.')
              keysOk=0
!         elif (not modifiers) and (finalKey in
                  self.alphanumKeys+self.punctuationKeys):
              #modifier required
***************
*** 239,243 ****
                      message='No modifier key(s) specified.')
              keysOk=0
!         elif (modifiers==['Shift']) and (finalKey not 
                  in self.functionKeys+('Tab',)):
              #shift alone is only a useful modifier with a function key
--- 239,243 ----
                      message='No modifier key(s) specified.')
              keysOk=0
!         elif (modifiers==['Shift']) and (finalKey not
                  in self.functionKeys+('Tab',)):
              #shift alone is only a useful modifier with a function key
***************
*** 251,255 ****
              keysOk=0
          return keysOk
!     
  if __name__ == '__main__':
      #test the dialog
--- 251,255 ----
              keysOk=0
          return keysOk
! 
  if __name__ == '__main__':
      #test the dialog

Index: macosx_main.py
===================================================================
RCS file: /cvsroot/idlefork/idle/macosx_main.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** macosx_main.py	24 Dec 2002 17:22:53 -0000	1.5
--- macosx_main.py	31 Dec 2002 16:03:23 -0000	1.6
***************
*** 4,9 ****
  Installation:
    see the install_IDLE target in python/dist/src/Mac/OSX/Makefile
!   
! Usage: 
  
  1. Double clicking IDLE icon will open IDLE.
--- 4,9 ----
  Installation:
    see the install_IDLE target in python/dist/src/Mac/OSX/Makefile
! 
! Usage:
  
  1. Double clicking IDLE icon will open IDLE.
***************
*** 27,31 ****
  idlelib = join(split(__file__)[0], 'idlelib')
  if isdir(idlelib):
!   sys.path.append(idlelib)
  
  # see if we are being asked to execute the subprocess code
--- 27,31 ----
  idlelib = join(split(__file__)[0], 'idlelib')
  if isdir(idlelib):
!     sys.path.append(idlelib)
  
  # see if we are being asked to execute the subprocess code

Index: rpc.py
===================================================================
RCS file: /cvsroot/idlefork/idle/rpc.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** rpc.py	23 Dec 2002 22:51:03 -0000	1.11
--- rpc.py	31 Dec 2002 16:03:23 -0000	1.12
***************
*** 57,61 ****
  #      assert isinstance(fn, type.FunctionType)
  #      return `fn`
!  
  copy_reg.pickle(types.CodeType, pickle_code, unpickle_code)
  # copy_reg.pickle(types.FunctionType, pickle_function, unpickle_function)
--- 57,61 ----
  #      assert isinstance(fn, type.FunctionType)
  #      return `fn`
! 
  copy_reg.pickle(types.CodeType, pickle_code, unpickle_code)
  # copy_reg.pickle(types.FunctionType, pickle_function, unpickle_function)
***************
*** 76,80 ****
      def server_activate(self):
          """Override TCPServer method, connect() instead of listen()
!         
          Due to the reversed connection, self.server_address is actually the
          address of the Idle Client to which we are connecting.
--- 76,80 ----
      def server_activate(self):
          """Override TCPServer method, connect() instead of listen()
! 
          Due to the reversed connection, self.server_address is actually the
          address of the Idle Client to which we are connecting.
***************
*** 82,86 ****
          """
          self.socket.connect(self.server_address)
!         
      def get_request(self):
          "Override TCPServer method, return already connected socket"
--- 82,86 ----
          """
          self.socket.connect(self.server_address)
! 
      def get_request(self):
          "Override TCPServer method, return already connected socket"
***************
*** 127,131 ****
  
      def localcall(self, request):
!         self.debug("localcall:", request) 
          try:
              how, (oid, methodname, args, kwargs) = request
--- 127,131 ----
  
      def localcall(self, request):
!         self.debug("localcall:", request)
          try:
              how, (oid, methodname, args, kwargs) = request
***************
*** 175,179 ****
  
      def remotecall(self, oid, methodname, args, kwargs):
!         self.debug("remotecall:") 
          seq = self.asynccall(oid, methodname, args, kwargs)
          return self.asyncreturn(seq)
--- 175,179 ----
  
      def remotecall(self, oid, methodname, args, kwargs):
!         self.debug("remotecall:")
          seq = self.asynccall(oid, methodname, args, kwargs)
          return self.asyncreturn(seq)
***************
*** 216,220 ****
              raise name, args
          if how == "ERROR":
!             self.debug("decoderesponse: Internal ERROR:", what)            
              raise RuntimeError, what
          raise SystemError, (how, what)
--- 216,220 ----
              raise name, args
          if how == "ERROR":
!             self.debug("decoderesponse: Internal ERROR:", what)
              raise RuntimeError, what
          raise SystemError, (how, what)
***************
*** 360,364 ****
                  self.statelock.release()
                  continue
!             
  #----------------- end class SocketIO --------------------
  
--- 360,364 ----
                  self.statelock.release()
                  continue
! 
  #----------------- end class SocketIO --------------------
  
***************
*** 466,470 ****
          attr = getattr(obj, name)
          if not callable(attr):
!            attributes[name] = 1
  
  class MethodProxy:
--- 466,470 ----
          attr = getattr(obj, name)
          if not callable(attr):
!             attributes[name] = 1
  
  class MethodProxy:
***************
*** 487,491 ****
      class RemotePerson:
          def __init__(self,name):
!             self.name = name 
          def greet(self, name):
              print "(someone called greet)"
--- 487,491 ----
      class RemotePerson:
          def __init__(self,name):
!             self.name = name
          def greet(self, name):
              print "(someone called greet)"
***************
*** 494,498 ****
          def getName(self):
              print "(someone called getName)"
!             print 
              return self.name
          def greet_this_guy(self, name):
--- 494,498 ----
          def getName(self):
              print "(someone called getName)"
!             print
              return self.name
          def greet_this_guy(self, name):
***************
*** 503,507 ****
              print "Done."
              print
!             
      person = RemotePerson("Thomas Edison")
      svr = RPCServer(addr)
--- 503,507 ----
              print "Done."
              print
! 
      person = RemotePerson("Thomas Edison")
      svr = RPCServer(addr)
***************
*** 527,536 ****
      #clt.remotecall("thomas","greet",("Alexander Bell",), {})
      print "Done."
!     print 
      time.sleep(2)
      # demonstrates remote server calling local instance
      class LocalPerson:
          def __init__(self,name):
!             self.name = name 
          def greet(self, name):
              print "You've greeted me!"
--- 527,536 ----
      #clt.remotecall("thomas","greet",("Alexander Bell",), {})
      print "Done."
!     print
      time.sleep(2)
      # demonstrates remote server calling local instance
      class LocalPerson:
          def __init__(self,name):
!             self.name = name
          def greet(self, name):
              print "You've greeted me!"
***************
*** 552,555 ****
  if __name__ == '__main__':
      test()
- 
-         
--- 552,553 ----

Index: tabpage.py
===================================================================
RCS file: /cvsroot/idlefork/idle/tabpage.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** tabpage.py	30 Nov 2002 19:10:19 -0000	1.4
--- tabpage.py	31 Dec 2002 16:03:23 -0000	1.5
***************
*** 11,15 ****
      """
      a 'page tab' like framed button
!     """ 
      def __init__(self,parent):
          Frame.__init__(self, parent,borderwidth=2,relief=RIDGE)
--- 11,15 ----
      """
      a 'page tab' like framed button
!     """
      def __init__(self,parent):
          Frame.__init__(self, parent,borderwidth=2,relief=RIDGE)
***************
*** 18,31 ****
                  borderwidth=0,selectcolor=self.cget('bg'))
          self.button.pack()
!       
  class TabPageSet(Frame):
      """
      a set of 'pages' with TabButtons for controlling their display
!     """ 
      def __init__(self,parent,pageNames=[],**kw):
          """
          pageNames - a list of strings, each string will be the dictionary key
!         to a page's data, and the name displayed on the page's tab. Should be 
!         specified in desired page order. The first page will be the default 
          and first active page.
          """
--- 18,31 ----
                  borderwidth=0,selectcolor=self.cget('bg'))
          self.button.pack()
! 
  class TabPageSet(Frame):
      """
      a set of 'pages' with TabButtons for controlling their display
!     """
      def __init__(self,parent,pageNames=[],**kw):
          """
          pageNames - a list of strings, each string will be the dictionary key
!         to a page's data, and the name displayed on the page's tab. Should be
!         specified in desired page order. The first page will be the default
          and first active page.
          """
***************
*** 49,58 ****
                  raise InvalidTabPage, 'Invalid TabPage Name'
          ## pop up the active 'tab' only
!         for page in self.pages.keys(): 
              self.pages[page]['tab'].config(relief=RIDGE)
          self.pages[self.GetActivePage()]['tab'].config(relief=RAISED)
          ## switch page
          self.pages[self.GetActivePage()]['page'].lift()
!         
      def GetActivePage(self):
          return self.activePage.get()
--- 49,58 ----
                  raise InvalidTabPage, 'Invalid TabPage Name'
          ## pop up the active 'tab' only
!         for page in self.pages.keys():
              self.pages[page]['tab'].config(relief=RIDGE)
          self.pages[self.GetActivePage()]['tab'].config(relief=RAISED)
          ## switch page
          self.pages[self.GetActivePage()]['page'].lift()
! 
      def GetActivePage(self):
          return self.activePage.get()
***************
*** 68,72 ****
          self.pages[pageName]['tab'].pack(side=LEFT)
          self.pages[pageName]['page'].grid(row=1,column=0,sticky=NSEW)
!         if len(self.pages)==1: # adding first page    
              self.defaultPage=pageName
              self.activePage.set(self.defaultPage)
--- 68,72 ----
          self.pages[pageName]['tab'].pack(side=LEFT)
          self.pages[pageName]['page'].grid(row=1,column=0,sticky=NSEW)
!         if len(self.pages)==1: # adding first page
              self.defaultPage=pageName
              self.activePage.set(self.defaultPage)
***************
*** 84,92 ****
          if not self.pages: # removed last remaining page
              self.defaultPage=''
!             return 
          if pageName==self.defaultPage: # set a new default page
              self.defaultPage=\
                  self.tabBar.winfo_children()[0].button.cget('text')
!         if pageName==self.GetActivePage(): # set a new active page 
              self.activePage.set(self.defaultPage)
          self.ChangePage()
--- 84,92 ----
          if not self.pages: # removed last remaining page
              self.defaultPage=''
!             return
          if pageName==self.defaultPage: # set a new default page
              self.defaultPage=\
                  self.tabBar.winfo_children()[0].button.cget('text')
!         if pageName==self.GetActivePage(): # set a new active page
              self.activePage.set(self.defaultPage)
          self.ChangePage()
***************
*** 112,114 ****
      tabPage.ChangePage()
      root.mainloop()
-         
--- 112,113 ----

Index: textView.py
===================================================================
RCS file: /cvsroot/idlefork/idle/textView.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** textView.py	31 Jul 2001 10:46:53 -0000	1.2
--- textView.py	31 Dec 2002 16:03:23 -0000	1.3
***************
*** 1,7 ****
  ##---------------------------------------------------------------------------##
  ##
! ## idle - simple text view dialog 
  ## elguavas
! ## 
  ##---------------------------------------------------------------------------##
  """
--- 1,7 ----
  ##---------------------------------------------------------------------------##
  ##
! ## idle - simple text view dialog
  ## elguavas
! ##
  ##---------------------------------------------------------------------------##
  """
***************
*** 14,18 ****
      """
      simple text viewer dialog for idle
!     """ 
      def __init__(self,parent,title,fileName):
          """
--- 14,18 ----
      """
      simple text viewer dialog for idle
!     """
      def __init__(self,parent,title,fileName):
          """
***************
*** 40,44 ****
          self.textView.config(state=DISABLED)
          self.wait_window()
!         
      def LoadTextFile(self, fileName):
          textFile = None
--- 40,44 ----
          self.textView.config(state=DISABLED)
          self.wait_window()
! 
      def LoadTextFile(self, fileName):
          textFile = None
***************
*** 50,54 ****
          else:
              self.textView.insert(0.0,textFile.read())
!         
      def CreateWidgets(self):
          frameText = Frame(self)
--- 50,54 ----
          else:
              self.textView.insert(0.0,textFile.read())
! 
      def CreateWidgets(self):
          frameText = Frame(self)
***************
*** 66,70 ****
          frameButtons.pack(side=BOTTOM,fill=X)
          frameText.pack(side=TOP,expand=TRUE,fill=BOTH)
!         
      def Ok(self, event=None):
          self.destroy()
--- 66,70 ----
          frameButtons.pack(side=BOTTOM,fill=X)
          frameText.pack(side=TOP,expand=TRUE,fill=BOTH)
! 
      def Ok(self, event=None):
          self.destroy()