From 13fbcfeb00a7ff21b11bc5856e1292dbdb37f111 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Jan 2010 22:27:42 -0700 Subject: [PATCH] Fix #4632 (Number of books with a given format not updated when dropping to zero) --- src/calibre/gui2/ui.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 796d58a3a5..889ad75645 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -1092,6 +1092,8 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): self.library_view.model().refresh_ids(ids) self.library_view.model().current_changed(self.library_view.currentIndex(), self.library_view.currentIndex()) + if ids: + self.tags_view.recount() def delete_all_but_selected_formats(self, *args): ids = self._get_selected_ids() @@ -1113,6 +1115,8 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): self.library_view.model().refresh_ids(ids) self.library_view.model().current_changed(self.library_view.currentIndex(), self.library_view.currentIndex()) + if ids: + self.tags_view.recount() def delete_covers(self, *args): @@ -1399,8 +1403,8 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): self.status_bar.showMessage(_('Catalog generated.'), 3000) self.sync_catalogs() if job.fmt in ['CSV','XML']: - export_dir = choose_dir(self, 'Export Catalog Directory', - 'Select destination for %s.%s' % (job.catalog_title, job.fmt.lower())) + export_dir = choose_dir(self, _('Export Catalog Directory'), + _('Select destination for %s.%s') % (job.catalog_title, job.fmt.lower())) if export_dir: destination = os.path.join(export_dir, '%s.%s' % (job.catalog_title, job.fmt.lower())) shutil.copyfile(job.catalog_file_path, destination)