[pywin32-checkins] pywin32/Pythonwin/pywin/framework winout.py, 1.16, 1.17
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2009-04-18 19:25:09
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17156 Modified Files: winout.py Log Message: Add OnSaveDocument to WindowOutputDocument so that interactive window can be saved Index: winout.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/winout.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** winout.py 31 Jan 2009 05:56:01 -0000 1.16 --- winout.py 18 Apr 2009 19:25:05 -0000 1.17 *************** *** 50,53 **** --- 50,63 ---- return 1 # say it is OK to destroy my document + def OnSaveDocument( self, fileName ): + win32ui.SetStatusText("Saving file...",1) + try: + self.SaveFile(fileName) + except IOError, details: + win32ui.MessageBox("Error - could not save file\r\n\r\n%s"%details) + return 0 + win32ui.SetStatusText("Ready") + return 1 + class WindowOutputFrame(window.MDIChildWnd): def __init__(self, wnd = None): *************** *** 299,303 **** docview.DocTemplate.__init__(self, win32ui.IDR_PYTHONTYPE, \ makeDoc, makeFrame, makeView) ! self.SetDocStrings("\nOutput\n\n\n\n\n\n") win32ui.GetApp().AddDocTemplate(self) self.writeQueueing = queueing --- 309,313 ---- docview.DocTemplate.__init__(self, win32ui.IDR_PYTHONTYPE, \ makeDoc, makeFrame, makeView) ! self.SetDocStrings("\nOutput\n\nText Documents (*.txt)\n.txt\n\n\n") win32ui.GetApp().AddDocTemplate(self) self.writeQueueing = queueing |