Exemplo n.º 1
0
 def perform_close(self, editor):
     if list(app.iter_editors_with_view_of_document(self.document)) == [editor]:
         info = app.context.put(editor)
         editor.current_view = self
         self.document.canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo_(
             self, "document:shouldClose:contextInfo:", info)
     else:
         editor.discard_and_focus_recent(self)
Exemplo n.º 2
0
 def perform_close(self, editor):
     if list(app.iter_editors_with_view_of_document(
             self.document)) == [editor]:
         info = app.context.put(editor)
         editor.current_view = self
         self.document.canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo_(
             self, "document:shouldClose:contextInfo:", info)
     else:
         editor.discard_and_focus_recent(self)
Exemplo n.º 3
0
 def iter_dirty_docs():
     for proj in self.projects:
         eds = app.find_editors_with_project(proj)
         if eds == [self]:
             for dv in proj.dirty_documents():
                 doc = dv.document
                 editors = app.iter_editors_with_view_of_document(doc)
                 if list(editors) == [self]:
                     yield dv
             yield proj
Exemplo n.º 4
0
 def dirty_docs():
     for dv in self.dirty_documents():
         itr = app.iter_editors_with_view_of_document(dv.document)
         if list(itr) == [editor]:
             yield dv
     yield self
Exemplo n.º 5
0
 def dirty_docs():
     for dv in self.dirty_documents():
         itr = app.iter_editors_with_view_of_document(dv.document)
         if list(itr) == [editor]:
             yield dv
     yield self