[Idle-dev] CVS: idle configDialog.py,1.4,1.5

Stephen elguavas@users.sourceforge.net
Sun, 05 Aug 2001 01:00:30 -0700


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

Modified Files:
	configDialog.py 
Log Message:
began font / indentation page


Index: configDialog.py
===================================================================
RCS file: /cvsroot/idlefork/idle/configDialog.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** configDialog.py	2001/08/04 13:58:22	1.4
--- configDialog.py	2001/08/05 08:00:28	1.5
***************
*** 159,164 ****
          
      def CreatePageFontTab(self):
          frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN)
!         Button(frame,text='font/tabs page test').pack(padx=90,pady=90)
          return frame
  
--- 159,239 ----
          
      def CreatePageFontTab(self):
+         #tkVars
+         self.fontName=StringVar()
+         self.fontSize=StringVar()
+         self.spaceNum=IntVar()
+         self.tabCols=IntVar()
+         self.indentType=IntVar() 
+         ##widget creation
+         #body frame
          frame=Frame(self.framePages,borderwidth=2,relief=SUNKEN)
!         #body section frames
!         frameFont=Frame(frame,borderwidth=2,relief=GROOVE)
!         frameIndent=Frame(frame,borderwidth=2,relief=GROOVE)
!         #frameFont
!         labelFontTitle=Label(frameFont,text='Set Base Editor Font')
!         frameFontName=Frame(frameFont)
!         frameFontSize=Frame(frameFont)
!         labelFontNameTitle=Label(frameFontName,justify=LEFT,
!                 text='Choose from available\nmonospaced fonts :')
!         optFontName=OptionMenu(frameFontName,
!             self.fontName,'Courier','Font Name 2','Font Name 3')
!         self.fontName.set('Courier')
!         labelFontSizeTitle=Label(frameFontSize,text='Choose font size :')
!         optFontSize=OptionMenu(frameFontSize,
!             self.fontSize,'8','10','12','14','16','18','20')
!         self.fontSize.set('12')
!         frameFontSample=Frame(frameFont,relief=SOLID,borderwidth=1,
!                 bg=self.workingTestColours['Foo-Bg'])
!         labelFontSample=Label(frameFontSample,bg=self.workingTestColours['Foo-Bg'], 
!                 fg='#000000',text='Font\nSample',justify=LEFT,
!                 font=('courier',12,''))
!         #frameIndent
!         labelIndentTitle=Label(frameIndent,text='Set Indentation Defaults')
!         frameIndentType=Frame(frameIndent)
!         frameIndentSize=Frame(frameIndent)
!         labelIndentTypeTitle=Label(frameIndentType,
!                 text='Choose indentation type :')
!         radioUseSpaces=Radiobutton(frameIndentType,variable=self.indentType,
!             value=0,text='Tab key inserts spaces')
!         radioUseTabs=Radiobutton(frameIndentType,variable=self.indentType,
!             value=1,text='Tab key inserts tabs')
!         labelIndentSizeTitle=Label(frameIndentSize,
!                 text='Choose indentation size :')
!         labelSpaceNumTitle=Label(frameIndentSize,justify=LEFT,
!                 text='when tab key inserts spaces,\nspaces per tab')
!         self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum,
!                 orient='horizontal',tickinterval=2,from_=2,to=8)
!         labeltabColsTitle=Label(frameIndentSize,justify=LEFT,
!                 text='when tab key inserts tabs,\ncolumns per tab')
!         self.scaleTabCols=Scale(frameIndentSize,variable=self.tabCols,
!                 orient='horizontal',tickinterval=2,from_=2,to=8)
!         
!         #widget packing
!         #body
!         frameFont.pack(side=LEFT,padx=5,pady=10,fill=Y)
!         frameIndent.pack(side=LEFT,padx=5,pady=10,expand=TRUE,fill=BOTH)
!         #frameFont
!         labelFontTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         frameFontName.pack(side=TOP,padx=5,pady=5,fill=X)
!         frameFontSize.pack(side=TOP,padx=5,pady=5,fill=BOTH)
!         labelFontNameTitle.pack(side=TOP,anchor=W)
!         optFontName.pack(side=TOP,pady=5,fill=X)
!         labelFontSizeTitle.pack(side=TOP,anchor=W)
!         optFontSize.pack(side=TOP,pady=5,fill=X)
!         frameFontSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH)
!         labelFontSample.pack(expand=TRUE,fill=BOTH)
!         #frameIndent
!         labelIndentTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         frameIndentType.pack(side=TOP,padx=5,fill=X)
!         frameIndentSize.pack(side=TOP,padx=5,pady=5,fill=BOTH)
!         labelIndentTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         radioUseSpaces.pack(side=TOP,anchor=W,padx=5)
!         radioUseTabs.pack(side=TOP,anchor=W,padx=5)
!         labelIndentSizeTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         labelSpaceNumTitle.pack(side=TOP,anchor=W,padx=5)
!         self.scaleSpaceNum.pack(side=TOP,padx=5,fill=X)
!         labeltabColsTitle.pack(side=TOP,anchor=W,padx=5)
!         self.scaleTabCols.pack(side=TOP,padx=5,fill=X)
          return frame
  
***************
*** 199,204 ****
          checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic,
              onvalue='Italic',offvalue='',text='Italic')
!         labelTestSample=Label(frameSample,justify=LEFT,
!             text='def Ahem(foo,bar):\n    test=foo\n    text=bar\n    return',
              bg=self.workingTestColours['Foo-Bg'])        
          buttonSaveCustomTheme=Button(frameCustom, 
--- 274,282 ----
          checkFontItalic=Checkbutton(frameFontSet,variable=self.fontItalic,
              onvalue='Italic',offvalue='',text='Italic')
!         labelTestSample=Label(frameSample,justify=LEFT,font=('courier',12,''),
!             text='#when finished, this\n#sample area will\n#be interactive\n'+
!             'def Ahem(foo,bar):\n    '+
!             '"""'+'doc hazard'+'"""'+
!             '\n    test=foo\n    text=bar\n    return',
              bg=self.workingTestColours['Foo-Bg'])        
          buttonSaveCustomTheme=Button(frameCustom, 
***************
*** 228,232 ****
          #frameCustom
          labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         frameTarget.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=X)
          frameSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH)
          frameSet.pack(side=TOP,fill=X)
--- 306,310 ----
          #frameCustom
          labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5)
!         frameTarget.pack(side=TOP,padx=5,pady=5,fill=X)
          frameSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH)
          frameSet.pack(side=TOP,fill=X)
***************
*** 234,243 ****
          frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W)
          labelTargetTitle.pack(side=LEFT,anchor=E)
!         optMenuTarget.pack(side=RIGHT,anchor=W,fill=X,expand=TRUE)
          buttonSetColour.pack(expand=TRUE,fill=BOTH,padx=10,pady=10)
          labelFontTitle.pack(side=TOP,anchor=W)
          checkFontBold.pack(side=LEFT,anchor=W,pady=2)
          checkFontItalic.pack(side=RIGHT,anchor=W)
!         labelTestSample.pack()
          buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5)        
          #frameTheme
--- 312,321 ----
          frameFontSet.pack(side=RIGHT,padx=5,pady=5,anchor=W)
          labelTargetTitle.pack(side=LEFT,anchor=E)
!         optMenuTarget.pack(side=RIGHT,anchor=W,expand=TRUE,fill=X)
          buttonSetColour.pack(expand=TRUE,fill=BOTH,padx=10,pady=10)
          labelFontTitle.pack(side=TOP,anchor=W)
          checkFontBold.pack(side=LEFT,anchor=W,pady=2)
          checkFontItalic.pack(side=RIGHT,anchor=W)
!         labelTestSample.pack(anchor=CENTER,expand=TRUE,fill=BOTH)
          buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5)        
          #frameTheme
***************
*** 284,288 ****
          buttonSaveCustomKeys=Button(frameCustom,text='Save as a Custom Key Set')
          #frameKeySets
!         labelKeysTitle=Label(frameKeySets,text='Select a Key Binding Set')
          labelTypeTitle=Label(frameKeySets,text='Select : ')
          radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysType,
--- 362,366 ----
          buttonSaveCustomKeys=Button(frameCustom,text='Save as a Custom Key Set')
          #frameKeySets
!         labelKeysTitle=Label(frameKeySets,text='Select a Key Set')
          labelTypeTitle=Label(frameKeySets,text='Select : ')
          radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysType,