mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Diff dialog: Hide busy indicator when showing no changes found message
This commit is contained in:
parent
da78f784a0
commit
8e52d122ef
@ -334,6 +334,7 @@ class Diff(Dialog):
|
|||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
self.stacks.setCurrentIndex(0)
|
self.stacks.setCurrentIndex(0)
|
||||||
|
self.busy.setVisible(True)
|
||||||
self.busy.pi.startAnimation()
|
self.busy.pi.startAnimation()
|
||||||
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
|
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
|
||||||
QApplication.processEvents(QEventLoop.ExcludeUserInputEvents | QEventLoop.ExcludeSocketNotifiers)
|
QApplication.processEvents(QEventLoop.ExcludeUserInputEvents | QEventLoop.ExcludeSocketNotifiers)
|
||||||
@ -387,7 +388,9 @@ class Diff(Dialog):
|
|||||||
calls.append((args, kwargs))
|
calls.append((args, kwargs))
|
||||||
|
|
||||||
if len(changed_names) + len(renamed_names) + len(removed_names) + len(added_names) < 1:
|
if len(changed_names) + len(renamed_names) + len(removed_names) + len(added_names) < 1:
|
||||||
|
self.busy.setVisible(False)
|
||||||
info_dialog(self, _('No changes found'), identical_msg, show=True)
|
info_dialog(self, _('No changes found'), identical_msg, show=True)
|
||||||
|
self.busy.setVisible(True)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
kwargs = lambda name: {'context':self.context, 'beautify':self.beautify, 'syntax':syntax_map.get(name, None)}
|
kwargs = lambda name: {'context':self.context, 'beautify':self.beautify, 'syntax':syntax_map.get(name, None)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user