[Idle-dev] CVS: idle EditorWindow.py,1.11,1.12

Stephen M. Gava elguavas@users.sourceforge.net
Thu, 03 Jan 2002 03:51:10 -0800


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

Modified Files:
	EditorWindow.py 
Log Message:
moving to new config system


Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** EditorWindow.py	2001/11/21 05:55:06	1.11
--- EditorWindow.py	2002/01/03 11:51:07	1.12
***************
*** 17,21 ****
  import idlever
  import WindowList
! from IdleConf import idleconf
  import aboutDialog, textView, configDialog
  
--- 17,22 ----
  import idlever
  import WindowList
! #from IdleConf import idleconf
! from configHandler import idleConf
  import aboutDialog, textView, configDialog
  
***************
*** 80,84 ****
  
  class EditorWindow:
- 
      from Percolator import Percolator
      from ColorDelegator import ColorDelegator
--- 81,84 ----
***************
*** 92,97 ****
  
      def __init__(self, flist=None, filename=None, key=None, root=None):
!         edconf = idleconf.getsection('EditorWindow')
!         coconf = idleconf.getsection('Colors')
          self.flist = flist
          root = root or flist.root
--- 92,96 ----
  
      def __init__(self, flist=None, filename=None, key=None, root=None):
!         currentTheme=idleConf.CurrentTheme()
          self.flist = flist
          root = root or flist.root
***************
*** 103,115 ****
          self.vbar = vbar = Scrollbar(top, name='vbar')
          self.text_frame = text_frame = Frame(top)
!         self.text = text = Text(text_frame, name='text', padx=5,
!                       foreground=coconf.getdef('normal-foreground'),
!                       background=coconf.getdef('normal-background'),
!                       highlightcolor=coconf.getdef('hilite-foreground'),
!                       highlightbackground=coconf.getdef('hilite-background'),
!                       insertbackground=coconf.getdef('cursor-background'),
!                       width=edconf.getint('width'),
!                       height=edconf.getint('height'),
!                       wrap="none")
  
          self.createmenubar()
--- 102,118 ----
          self.vbar = vbar = Scrollbar(top, name='vbar')
          self.text_frame = text_frame = Frame(top)
!         self.text = text = Text(text_frame, name='text', padx=5, wrap=None,
!                 foreground=idleConf.GetHighlight(currentTheme,
!                         'normal',fgBg='fg'),
!                 background=idleConf.GetHighlight(currentTheme,
!                         'normal',fgBg='bg'),
!                 highlightcolor=idleConf.GetHighlight(currentTheme,
!                         'hilite',fgBg='fg'),
!                 highlightbackground=idleConf.GetHighlight(currentTheme,
!                         'hilite',fgBg='bg'),
!                 insertbackground=idleConf.GetHighlight(currentTheme,
!                         'cursor',fgBg='fg'),
!                 width=idleConf.GetOption('main','EditorWindow','width'),
!                 height=idleConf.GetOption('main','EditorWindow','height') )
  
          self.createmenubar()
***************
*** 145,149 ****
  
          text['yscrollcommand'] = vbar.set
!         text['font'] = edconf.get('font-name'), edconf.get('font-size')
          text_frame.pack(side=LEFT, fill=BOTH, expand=1)
          text.pack(side=TOP, fill=BOTH, expand=1)
--- 148,153 ----
  
          text['yscrollcommand'] = vbar.set
!         text.config(font=(idleConf.GetOption('main','EditorWindow','font'),
!                 idleConf.GetOption('main','EditorWindow','font-size')))
          text_frame.pack(side=LEFT, fill=BOTH, expand=1)
          text.pack(side=TOP, fill=BOTH, expand=1)
***************
*** 540,544 ****
  
      def get_standard_extension_names(self):
!         return idleconf.getextensions()
  
      def load_extension(self, name):
--- 544,548 ----
  
      def get_standard_extension_names(self):
!         return idleConf.GetExtensions()
  
      def load_extension(self, name):