From 527869d5c1d75b3ce8a4d123f630c090bcf3ab22 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 4 Dec 2011 09:28:29 +0530 Subject: [PATCH] Show a starting scan message when starting the check library scan --- src/calibre/gui2/actions/choose_library.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/calibre/gui2/actions/choose_library.py b/src/calibre/gui2/actions/choose_library.py index 01430f14f0..4990178a4b 100644 --- a/src/calibre/gui2/actions/choose_library.py +++ b/src/calibre/gui2/actions/choose_library.py @@ -9,7 +9,8 @@ import os from functools import partial from PyQt4.Qt import (QMenu, Qt, QInputDialog, QToolButton, QDialog, - QDialogButtonBox, QGridLayout, QLabel, QLineEdit, QIcon, QSize) + QDialogButtonBox, QGridLayout, QLabel, QLineEdit, QIcon, QSize, + QCoreApplication) from calibre import isbytestring from calibre.constants import filesystem_encoding, iswindows @@ -384,11 +385,18 @@ class ChooseLibraryAction(InterfaceAction): _('Database integrity check failed, click Show details' ' for details.'), show=True, det_msg=d.error[1]) - d = CheckLibraryDialog(self.gui, m.db) - if not d.do_exec(): - info_dialog(self.gui, _('No problems found'), - _('The files in your library match the information ' - 'in the database.'), show=True) + self.gui.status_bar.show_message( + _('Starting library scan, this may take a while')) + try: + QCoreApplication.processEvents() + d = CheckLibraryDialog(self.gui, m.db) + + if not d.do_exec(): + info_dialog(self.gui, _('No problems found'), + _('The files in your library match the information ' + 'in the database.'), show=True) + finally: + self.gui.status_bar.clear_message() def switch_requested(self, location): if not self.change_library_allowed():