From 8e52d122efdc66268d17dee752ad03002d8bb0f5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 30 Oct 2015 09:15:23 +0530 Subject: [PATCH] Diff dialog: Hide busy indicator when showing no changes found message --- src/calibre/gui2/tweak_book/diff/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/tweak_book/diff/main.py b/src/calibre/gui2/tweak_book/diff/main.py index 7280b7fd7b..6015b48c5d 100644 --- a/src/calibre/gui2/tweak_book/diff/main.py +++ b/src/calibre/gui2/tweak_book/diff/main.py @@ -334,6 +334,7 @@ class Diff(Dialog): def __enter__(self): self.stacks.setCurrentIndex(0) + self.busy.setVisible(True) self.busy.pi.startAnimation() QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) QApplication.processEvents(QEventLoop.ExcludeUserInputEvents | QEventLoop.ExcludeSocketNotifiers) @@ -387,7 +388,9 @@ class Diff(Dialog): calls.append((args, kwargs)) 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) + self.busy.setVisible(True) return True kwargs = lambda name: {'context':self.context, 'beautify':self.beautify, 'syntax':syntax_map.get(name, None)}