Busy cursor when fixing/prettying all files

This commit is contained in:
Kovid Goyal 2013-11-26 19:15:42 +05:30
parent 7a7878f21c
commit 4077030da1

View File

@ -319,10 +319,14 @@ class Boss(QObject):
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()
def pretty_print(self, current):
if current:
@ -334,10 +338,14 @@ class Boss(QObject):
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()
def mark_selected_text(self):
ed = self.gui.central.current_editor