Common subdirectories: idlelib/CVS and idlelibsource/CVS diff -c idlelib/EditorWindow.py idlelibsource/EditorWindow.py *** idlelib/EditorWindow.py Tue Jan 18 16:22:54 2005 --- idlelibsource/EditorWindow.py Mon Jan 24 10:23:49 2005 *************** *** 48,54 **** help_url = None ! def __init__(self, flist=None, filename=None, key=None, root=None): if EditorWindow.help_url is None: dochome = os.path.join(sys.prefix, 'Doc', 'index.html') if sys.platform.count('linux'): --- 48,54 ---- help_url = None ! def __init__(self, flist=None, filename=None, key=None, root=None, top=None, height=None, width=None): if EditorWindow.help_url is None: dochome = os.path.join(sys.prefix, 'Doc', 'index.html') if sys.platform.count('linux'): *************** *** 72,81 **** EditorWindow.help_url = "http://www.python.org/doc/current" currentTheme=idleConf.CurrentTheme() self.flist = flist ! root = root or flist.root self.root = root ! self.menubar = Menu(root) ! self.top = top = WindowList.ListedToplevel(root, menu=self.menubar) if flist: self.tkinter_vars = flist.vars #self.top.instance_dict makes flist.inversedict avalable to --- 72,91 ---- EditorWindow.help_url = "http://www.python.org/doc/current" currentTheme=idleConf.CurrentTheme() self.flist = flist ! root = root ! if root is None and flist is not None: ! root = flist.root self.root = root ! if top is None: ! if flist and flist.top: ! top = flist.top ! ! if top is None: ! top = self.Toplevel(root) ! ! self.top = top ! self.menubar = Menu(top) ! self.top.configure(menu=self.menubar) if flist: self.tkinter_vars = flist.vars #self.top.instance_dict makes flist.inversedict avalable to *************** *** 88,94 **** 'recent-files.lst') self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) ! self.width = idleConf.GetOption('main','EditorWindow','width') self.text = text = Text(text_frame, name='text', padx=5, wrap='none', foreground=idleConf.GetHighlight(currentTheme, 'normal',fgBg='fg'), --- 98,111 ---- 'recent-files.lst') self.vbar = vbar = Scrollbar(top, name='vbar') self.text_frame = text_frame = Frame(top) ! if width is None: ! self.width = idleConf.GetOption('main','EditorWindow','width') ! else: ! self.width = width ! if height is None: ! self.height = idleConf.GetOption('main','EditorWindow','height') ! else: ! self.height = height self.text = text = Text(text_frame, name='text', padx=5, wrap='none', foreground=idleConf.GetHighlight(currentTheme, 'normal',fgBg='fg'), *************** *** 101,107 **** insertbackground=idleConf.GetHighlight(currentTheme, 'cursor',fgBg='fg'), width=self.width, ! height=idleConf.GetOption('main','EditorWindow','height') ) self.top.focused_widget = self.text self.createmenubar() --- 118,124 ---- insertbackground=idleConf.GetHighlight(currentTheme, 'cursor',fgBg='fg'), width=self.width, ! height=self.height) self.top.focused_widget = self.text self.createmenubar() *************** *** 219,225 **** self.menudict['file'].insert_cascade(3, label='Recent Files', underline=0, menu=self.recent_files_menu) ! self.update_recent_files_list() if filename: if os.path.exists(filename) and not os.path.isdir(filename): --- 236,243 ---- self.menudict['file'].insert_cascade(3, label='Recent Files', underline=0, menu=self.recent_files_menu) ! if flist: ! self.update_recent_files_list() if filename: if os.path.exists(filename) and not os.path.isdir(filename): *************** *** 603,608 **** --- 621,628 ---- def update_recent_files_list(self, new_file=None): "Load and update the recent files list and menus" + if self.flist is None: + return rf_list = [] if os.path.exists(self.recent_files_path): rf_list_file = open(self.recent_files_path,'r') diff -c idlelib/FileList.py idlelibsource/FileList.py *** idlelib/FileList.py Sat Aug 21 22:14:32 2004 --- idlelibsource/FileList.py Mon Jan 24 10:24:24 2005 *************** *** 8,15 **** from EditorWindow import EditorWindow # class variable, may be overridden # e.g. by PyShellFileList ! def __init__(self, root): self.root = root self.dict = {} self.inversedict = {} self.vars = {} # For EditorWindow.getrawvar (shared Tcl variables) --- 8,16 ---- from EditorWindow import EditorWindow # class variable, may be overridden # e.g. by PyShellFileList ! def __init__(self, root,top = None): self.root = root + self.top = top self.dict = {} self.inversedict = {} self.vars = {} # For EditorWindow.getrawvar (shared Tcl variables) Common subdirectories: idlelib/Icons and idlelibsource/Icons diff -c idlelib/ScriptBinding.py idlelibsource/ScriptBinding.py *** idlelib/ScriptBinding.py Tue Jan 18 16:22:59 2005 --- idlelibsource/ScriptBinding.py Mon Jan 24 10:25:34 2005 *************** *** 54,60 **** # Provide instance variables referenced by Debugger # XXX This should be done differently self.flist = self.editwin.flist ! self.root = self.flist.root def check_module_event(self, event): filename = self.getfilename() --- 54,63 ---- # Provide instance variables referenced by Debugger # XXX This should be done differently self.flist = self.editwin.flist ! if self.flist: ! self.root = self.flist.root ! else: ! self.root = self.editwin.root def check_module_event(self, event): filename = self.getfilename()