[Idle-dev] CVS: idle EditorWindow.py,1.26,1.27 PyShell.py,1.19,1.20
Kurt B. Kaiser
kbk@users.sourceforge.net
Wed, 10 Jul 2002 21:33:43 -0700
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv6088
Modified Files:
EditorWindow.py PyShell.py
Log Message:
1. Prevent Undo before IOmark in PyShell.PyShell
2. Consolidate Undo code in EditorWindow.EditorWindow
3. Remove Formatting and Run menus from PyShell
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** EditorWindow.py 6 Jul 2002 04:22:25 -0000 1.26
--- EditorWindow.py 11 Jul 2002 04:33:41 -0000 1.27
***************
*** 152,159 ****
self.set_status_bar()
-
vbar['command'] = text.yview
vbar.pack(side=RIGHT, fill=Y)
-
text['yscrollcommand'] = vbar.set
fontWeight='normal'
--- 152,157 ----
***************
*** 169,179 ****
self.per = per = self.Percolator(text)
if self.ispythonsource(filename):
! self.color = color = self.ColorDelegator(); per.insertfilter(color)
##print "Initial colorizer"
else:
##print "No initial colorizer"
self.color = None
! self.undo = undo = self.UndoDelegator(); per.insertfilter(undo)
self.io = io = self.IOBinding(self)
#create the Recent Files submenu
self.menuRecentFiles=Menu(self.menubar)
--- 167,187 ----
self.per = per = self.Percolator(text)
if self.ispythonsource(filename):
! self.color = color = self.ColorDelegator()
! per.insertfilter(color)
##print "Initial colorizer"
else:
##print "No initial colorizer"
self.color = None
!
! self.undo = undo = self.UndoDelegator()
! per.insertfilter(undo)
! text.undo_block_start = undo.undo_block_start
! text.undo_block_stop = undo.undo_block_stop
! undo.set_saved_change_hook(self.saved_change_hook)
!
! # IOBinding implements file I/O and printing functionality
self.io = io = self.IOBinding(self)
+ io.set_filename_change_hook(self.filename_change_hook)
+
#create the Recent Files submenu
self.menuRecentFiles=Menu(self.menubar)
***************
*** 182,190 ****
self.UpdateRecentFilesList()
- text.undo_block_start = undo.undo_block_start
- text.undo_block_stop = undo.undo_block_stop
- undo.set_saved_change_hook(self.saved_change_hook)
- io.set_filename_change_hook(self.filename_change_hook)
-
if filename:
if os.path.exists(filename):
--- 190,193 ----
***************
*** 192,196 ****
else:
io.set_filename(filename)
-
self.saved_change_hook()
--- 195,198 ----
Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** PyShell.py 26 Jun 2002 02:32:08 -0000 1.19
--- PyShell.py 11 Jul 2002 04:33:41 -0000 1.20
***************
*** 451,457 ****
UndoDelegator = ModifiedUndoDelegator
! # Override menu bar specs
! menu_specs = PyShellEditorWindow.menu_specs[:]
! menu_specs.insert(len(menu_specs)-3, ("debug", "_Debug"))
# New classes
--- 451,463 ----
UndoDelegator = ModifiedUndoDelegator
! # Override menus: Run and Format not desired in shell; add Debug
! menu_specs = [
! ("file", "_File"),
! ("edit", "_Edit"),
! ("debug", "_Debug"),
! ("settings", "_Settings"),
! ("windows", "_Windows"),
! ("help", "_Help"),
! ]
# New classes
***************
*** 826,829 ****
--- 832,836 ----
self.text.mark_set("insert", "end-1c")
self.set_line_and_column()
+ self.io.reset_undo()
def resetoutput(self):