[Idle-dev] CVS: idle configDialog.py,1.38,1.39 keybindingDialog.py,1.6,1.7
Stephen M. Gava
elguavas@users.sourceforge.net
Mon, 04 Mar 2002 16:26:00 -0800
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv22565
Modified Files:
configDialog.py keybindingDialog.py
Log Message:
further work on new config system
Index: configDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configDialog.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** configDialog.py 2 Mar 2002 07:12:53 -0000 1.38
--- configDialog.py 5 Mar 2002 00:25:58 -0000 1.39
***************
*** 464,468 ****
value=self.themeIsBuiltin.get()
self.AddChangedItem('main','Theme','default',value)
! self.PaintThemeSample()
def VarChanged_highlightTarget(self,*params):
--- 464,471 ----
value=self.themeIsBuiltin.get()
self.AddChangedItem('main','Theme','default',value)
! if value:
! self.VarChanged_builtinTheme()
! else:
! self.VarChanged_customTheme()
def VarChanged_highlightTarget(self,*params):
***************
*** 496,502 ****
self.AddChangedItem('main','Keys','default',value)
if value:
! self.LoadKeysList(self.builtinKeys.get())
else:
! self.LoadKeysList(self.customKeys.get())
def VarChanged_winWidth(self,*params):
--- 499,505 ----
self.AddChangedItem('main','Keys','default',value)
if value:
! self.VarChanged_builtinKeys()
else:
! self.VarChanged_customKeys()
def VarChanged_winWidth(self,*params):
***************
*** 937,947 ****
--- 940,954 ----
##currently set theme
currentOption=idleConf.CurrentTheme()
+ print 'current option',currentOption
##load available theme option menus
if self.themeIsBuiltin.get(): #default theme selected
+ print 'builtin theme'
itemList=idleConf.GetSectionList('default','highlight')
itemList.sort()
+ print 'builtin items:',itemList
self.optMenuThemeBuiltin.SetMenu(itemList,currentOption)
itemList=idleConf.GetSectionList('user','highlight')
itemList.sort()
+ print 'user items:',itemList
if not itemList:
self.radioThemeCustom.config(state=DISABLED)
***************
*** 950,958 ****
--- 957,968 ----
self.optMenuThemeCustom.SetMenu(itemList,itemList[0])
else: #user theme selected
+ print 'user theme'
itemList=idleConf.GetSectionList('user','highlight')
itemList.sort()
+ print 'user items:',itemList
self.optMenuThemeCustom.SetMenu(itemList,currentOption)
itemList=idleConf.GetSectionList('default','highlight')
itemList.sort()
+ print 'builtin items:',itemList
self.optMenuThemeBuiltin.SetMenu(itemList,itemList[0])
self.SetThemeType()
***************
*** 1113,1115 ****
--- 1123,1126 ----
Button(root,text='Dialog',
command=lambda:ConfigDialog(root,'Settings')).pack()
+ root.instanceDict={}
root.mainloop()
Index: keybindingDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/keybindingDialog.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** keybindingDialog.py 11 Feb 2002 03:45:22 -0000 1.6
--- keybindingDialog.py 5 Mar 2002 00:25:58 -0000 1.7
***************
*** 143,147 ****
keyList=keyList+modifiers
if finalKey:
! if (not modifiers) and (finalKey in self.functionKeys):
finalKey='<'+self.TranslateKey(finalKey)
else:
--- 143,148 ----
keyList=keyList+modifiers
if finalKey:
! if (not modifiers) and (finalKey not
! in self.alphanumKeys+self.punctuationKeys):
finalKey='<'+self.TranslateKey(finalKey)
else:
***************
*** 226,239 ****
message='No final key specified.')
keysOk=0
! elif (not modifiers) and (finalKey not in self.functionKeys):
! #modifier required if not a function key
tkMessageBox.showerror(title='Key Sequence Error',
message='No modifier key(s) specified.')
keysOk=0
! elif (modifiers==['Shift']) and (finalKey not in self.functionKeys):
#shift alone is only a useful modifier with a function key
tkMessageBox.showerror(title='Key Sequence Error',
! message='Shift alone is only a useful modifier '+
! 'when used with a function key.')
keysOk=0
elif keySequence in self.currentKeySequences: #keys combo already in use
--- 227,242 ----
message='No final key specified.')
keysOk=0
! elif (not modifiers) and (finalKey in
! self.alphanumKeys+self.punctuationKeys):
! #modifier required
tkMessageBox.showerror(title='Key Sequence Error',
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
tkMessageBox.showerror(title='Key Sequence Error',
! message='Shift alone is not a useful modifier '+
! 'when used with this final key key.')
keysOk=0
elif keySequence in self.currentKeySequences: #keys combo already in use