示例#1
0
文件: boss.py 项目: alfaniel/calibre
 def fix_html(self, current):
     if current:
         ed = self.gui.central.current_editor
         if hasattr(ed, 'fix_html'):
             ed.fix_html()
     else:
         if not self.check_dirtied():
             return
         self.add_savepoint(_('Fix HTML'))
         fix_all_html(current_container())
         self.update_editors_from_container()
示例#2
0
 def fix_html(self, current):
     if current:
         ed = self.gui.central.current_editor
         if hasattr(ed, 'fix_html'):
             ed.fix_html()
     else:
         self.commit_all_editors_to_container()
         with BusyCursor():
             self.add_savepoint(_('Fix HTML'))
             fix_all_html(current_container())
             self.update_editors_from_container()
             self.set_modified()
示例#3
0
文件: boss.py 项目: kmshi/calibre
 def fix_html(self, current):
     if current:
         ed = self.gui.central.current_editor
         if hasattr(ed, 'fix_html'):
             ed.fix_html()
     else:
         self.commit_all_editors_to_container()
         with BusyCursor():
             self.add_savepoint(_('Fix HTML'))
             fix_all_html(current_container())
             self.update_editors_from_container()
             self.set_modified()
示例#4
0
文件: boss.py 项目: Gondulf/calibre
 def fix_html(self, current):
     if current:
         ed = self.gui.central.current_editor
         if hasattr(ed, 'fix_html'):
             ed.fix_html()
     else:
         if not self.check_dirtied():
             return
         QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
         try:
             self.add_savepoint(_('Fix HTML'))
             fix_all_html(current_container())
             self.update_editors_from_container()
             self.set_modified()
         finally:
             QApplication.restoreOverrideCursor()