コード例 #1
0
ファイル: intpyapp.py プロジェクト: beiske/play
 def OnFileSaveAll(self, id, code):
     # Only attempt to save editor documents.
     from pywin.framework.editor import editorTemplate
     docs = filter(lambda doc: doc.IsModified() and doc.GetPathName(),
                   editorTemplate.GetDocumentList())
     map(lambda doc: doc.OnSaveDocument(doc.GetPathName()), docs)
     win32ui.SetStatusText("%d documents saved" % len(docs), 1)
コード例 #2
0
 def OnFileSaveAll(self, id, code):
     # Only attempt to save editor documents.
     from pywin.framework.editor import editorTemplate
     num = 0
     for doc in editorTemplate.GetDocumentList():
         if doc.IsModified() and doc.GetPathName():
             num = num = 1
             doc.OnSaveDocument(doc.GetPathName())
     win32ui.SetStatusText("%d documents saved" % num, 1)