summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorSteven M. Gava <elguavas@python.net>2002-01-03 11:51:07 (GMT)
committerSteven M. Gava <elguavas@python.net>2002-01-03 11:51:07 (GMT)
commitdc72f48e262a7aaf177a37676c79ced4ddce0fff (patch)
tree3fba9deb8ec1e2d4200adc1fb9ee5b85ac159845 /Lib/idlelib
parent4b517854d0b99367d82523306465d6fc97da17d0 (diff)
downloadcpython-dc72f48e262a7aaf177a37676c79ced4ddce0fff.zip
cpython-dc72f48e262a7aaf177a37676c79ced4ddce0fff.tar.gz
cpython-dc72f48e262a7aaf177a37676c79ced4ddce0fff.tar.bz2
moving to new config system
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/EditorWindow.py34
1 files changed, 19 insertions, 15 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 2fe1810..6a69e4a 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -16,7 +16,8 @@ import tkMessageBox
import webbrowser
import idlever
import WindowList
-from IdleConf import idleconf
+#from IdleConf import idleconf
+from configHandler import idleConf
import aboutDialog, textView, configDialog
# The default tab setting for a Text widget, in average-width characters.
@@ -79,7 +80,6 @@ TK_TABWIDTH_DEFAULT = 8
#$ unix <Control-x>
class EditorWindow:
-
from Percolator import Percolator
from ColorDelegator import ColorDelegator
from UndoDelegator import UndoDelegator
@@ -91,8 +91,7 @@ class EditorWindow:
vars = {}
def __init__(self, flist=None, filename=None, key=None, root=None):
- edconf = idleconf.getsection('EditorWindow')
- coconf = idleconf.getsection('Colors')
+ currentTheme=idleConf.CurrentTheme()
self.flist = flist
root = root or flist.root
self.root = root
@@ -102,15 +101,19 @@ class EditorWindow:
self.top = top = self.Toplevel(root, menu=self.menubar)
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.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()
self.apply_bindings()
@@ -144,7 +147,8 @@ class EditorWindow:
vbar.pack(side=RIGHT, fill=Y)
text['yscrollcommand'] = vbar.set
- text['font'] = edconf.get('font-name'), edconf.get('font-size')
+ 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)
text.focus_set()
@@ -539,7 +543,7 @@ class EditorWindow:
traceback.print_exc()
def get_standard_extension_names(self):
- return idleconf.getextensions()
+ return idleConf.GetExtensions()
def load_extension(self, name):
mod = __import__(name, globals(), locals(), [])