[Idle-dev] CVS: idle configDialog.py,1.18,1.19
Stephen M. Gava
elguavas@users.sourceforge.net
Tue, 20 Nov 2001 21:56:28 -0800
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv20906
Modified Files:
configDialog.py
Log Message:
back in harness on new config system
Index: configDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configDialog.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** configDialog.py 2001/11/04 11:53:10 1.18
--- configDialog.py 2001/11/21 05:56:26 1.19
***************
*** 18,25 ****
configuration dialog for idle
"""
! def __init__(self,parent,title,configDict):
! """
! configDict - dictionary of configuration items
! """
Toplevel.__init__(self, parent)
self.configure(borderwidth=5)
--- 18,22 ----
configuration dialog for idle
"""
! def __init__(self,parent,title):
Toplevel.__init__(self, parent)
self.configure(borderwidth=5)
***************
*** 161,164 ****
--- 158,173 ----
self.radioBg.config(state=NORMAL)
self.fgHilite.set(1) #default to setting foreground attribute
+ self.SetColourSample()
+
+ def SetColourSampleBinding(self,*args):
+ self.SetColourSample()
+
+ def SetColourSample(self):
+ #set the colour smaple area
+ tag=self.themeElements[self.highlightTarget.get()][0]
+ if self.fgHilite.get(): plane='foreground'
+ else: plane='background'
+ colour=self.textHighlightSample.tag_cget(tag,plane)
+ self.frameColourSet.config(bg=colour)
def CreateWidgets(self):
***************
*** 176,180 ****
command=self.Cancel,takefocus=FALSE)
#page buttons
! self.pageNum=IntVar()
self.pageNum.set(0)
pageButtonNames=('Fonts/Tabs','Highlighting','Keys','General')
--- 185,189 ----
command=self.Cancel,takefocus=FALSE)
#page buttons
! self.pageNum=IntVar(self)
self.pageNum.set(0)
pageButtonNames=('Fonts/Tabs','Highlighting','Keys','General')
***************
*** 212,220 ****
def CreatePageFontTab(self):
#tkVars
! self.fontSize=StringVar()
! self.fontBold=StringVar()
! self.spaceNum=IntVar()
! self.tabCols=IntVar()
! self.indentType=IntVar()
self.editFont=tkFont.Font(self,('courier',12,'normal'))
##widget creation
--- 221,229 ----
def CreatePageFontTab(self):
#tkVars
! self.fontSize=StringVar(self)
! self.fontBold=StringVar(self)
! self.spaceNum=IntVar(self)
! self.tabCols=IntVar(self)
! self.indentType=IntVar(self)
self.editFont=tkFont.Font(self,('courier',12,'normal'))
##widget creation
***************
*** 296,306 ****
def CreatePageHighlight(self):
! self.builtinTheme=StringVar()
! self.customTheme=StringVar()
! self.fgHilite=IntVar()
! self.colour=StringVar()
! self.fontName=StringVar()
! self.themeIsBuiltin=IntVar()
! self.highlightTarget=StringVar()
self.highlightTarget.trace_variable('w',self.SetHighlightTargetBinding)
##widget creation
--- 305,315 ----
def CreatePageHighlight(self):
! self.builtinTheme=StringVar(self)
! self.customTheme=StringVar(self)
! self.fgHilite=IntVar(self)
! self.colour=StringVar(self)
! self.fontName=StringVar(self)
! self.themeIsBuiltin=IntVar(self)
! self.highlightTarget=StringVar(self)
self.highlightTarget.trace_variable('w',self.SetHighlightTargetBinding)
##widget creation
***************
*** 341,347 ****
self.highlightTarget,None,highlightthickness=0)#,command=self.SetHighlightTargetBinding
self.radioFg=Radiobutton(frameFgBg,variable=self.fgHilite,
! value=1,text='Foreground')#,command=self.SetFgBg
self.radioBg=Radiobutton(frameFgBg,variable=self.fgHilite,
! value=0,text='Background')#,command=self.SetFgBg
self.fgHilite.set(1)
buttonSaveCustomTheme=Button(frameCustom,
--- 350,356 ----
self.highlightTarget,None,highlightthickness=0)#,command=self.SetHighlightTargetBinding
self.radioFg=Radiobutton(frameFgBg,variable=self.fgHilite,
! value=1,text='Foreground',command=self.SetColourSampleBinding)
self.radioBg=Radiobutton(frameFgBg,variable=self.fgHilite,
! value=0,text='Background',command=self.SetColourSampleBinding)
self.fgHilite.set(1)
buttonSaveCustomTheme=Button(frameCustom,
***************
*** 386,397 ****
def CreatePageKeys(self):
#tkVars
! self.bindingTarget=StringVar()
! self.builtinKeys=StringVar()
! self.customKeys=StringVar()
! self.keyChars=StringVar()
! self.keyCtrl=StringVar()
! self.keyAlt=StringVar()
! self.keyShift=StringVar()
! self.keysAreDefault=IntVar()
##widget creation
#body frame
--- 395,406 ----
def CreatePageKeys(self):
#tkVars
! self.bindingTarget=StringVar(self)
! self.builtinKeys=StringVar(self)
! self.customKeys=StringVar(self)
! self.keyChars=StringVar(self)
! self.keyCtrl=StringVar(self)
! self.keyAlt=StringVar(self)
! self.keyShift=StringVar(self)
! self.keysAreDefault=IntVar(self)
##widget creation
#body frame
***************
*** 461,468 ****
def CreatePageGeneral(self):
#tkVars
! self.runType=IntVar()
! self.winWidth=StringVar()
! self.winHeight=StringVar()
! self.extState=IntVar()
#widget creation
#body
--- 470,477 ----
def CreatePageGeneral(self):
#tkVars
! self.runType=IntVar(self)
! self.winWidth=StringVar(self)
! self.winHeight=StringVar(self)
! self.extState=IntVar(self)
#widget creation
#body
***************
*** 664,667 ****
root=Tk()
Button(root,text='Dialog',
! command=lambda:ConfigDialog(root,'Settings',None)).pack()
root.mainloop()
--- 673,676 ----
root=Tk()
Button(root,text='Dialog',
! command=lambda:ConfigDialog(root,'Settings')).pack()
root.mainloop()