Ejemplo n.º 1
0
 def pretty_print(self, current):
     if current:
         ed = self.gui.central.current_editor
         for name, x in editors.iteritems():
             if x is ed:
                 break
         ed.pretty_print(name)
     else:
         self.commit_all_editors_to_container()
         with BusyCursor():
             self.add_savepoint(_('Beautify files'))
             pretty_all(current_container())
             self.update_editors_from_container()
             self.set_modified()
Ejemplo n.º 2
0
 def pretty_print(self, current):
     if current:
         ed = self.gui.central.current_editor
         for name, x in editors.iteritems():
             if x is ed:
                 break
         ed.pretty_print(name)
     else:
         self.commit_all_editors_to_container()
         with BusyCursor():
             self.add_savepoint(_('Beautify files'))
             pretty_all(current_container())
             self.update_editors_from_container()
             self.set_modified()
Ejemplo n.º 3
0
 def pretty_print(self, current):
     if current:
         ed = self.gui.central.current_editor
         for name, x in editors.iteritems():
             if x is ed:
                 break
         ed.pretty_print(name)
     else:
         if not self.check_dirtied():
             return
         QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
         try:
             self.add_savepoint(_('Beautify files'))
             pretty_all(current_container())
             self.update_editors_from_container()
             self.set_modified()
         finally:
             QApplication.restoreOverrideCursor()