From 1d2043815b63c31ff407079fe5fb48e819658310 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 May 2010 09:27:23 -0600 Subject: [PATCH 1/2] Fix #5408 (allow customization of the view command) --- src/calibre/gui2/ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 392e6428eb..62178c4fc4 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -355,7 +355,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): self.view_menu = QMenu() self.view_menu.addAction(_('View')) ac = self.view_menu.addAction(_('View specific format')) - ac.setShortcut(Qt.AltModifier+Qt.Key_V) + ac.setShortcut((Qt.ControlModifier if isosx else Qt.AltModifier)+Qt.Key_V) self.action_view.setMenu(self.view_menu) self.delete_menu = QMenu() From 440eb3f438940fdd0c3733cf04e0dc4bd79865d6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 May 2010 09:47:42 -0600 Subject: [PATCH 2/2] Make 0.6.x work with db and settings from 0.7.x --- src/calibre/gui2/library.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/library.py b/src/calibre/gui2/library.py index 3fe1cbc908..da6b03737d 100644 --- a/src/calibre/gui2/library.py +++ b/src/calibre/gui2/library.py @@ -186,6 +186,7 @@ class BooksModel(QAbstractTableModel): QAbstractTableModel.__init__(self, parent) self.db = None self.column_map = config['column_map'] + self.column_map = [x for x in self.column_map if x in self.headers] self.editable_cols = ['title', 'authors', 'rating', 'publisher', 'tags', 'series', 'timestamp', 'pubdate'] self.default_image = QImage(I('book.svg')) @@ -202,6 +203,7 @@ class BooksModel(QAbstractTableModel): def read_config(self): self.use_roman_numbers = config['use_roman_numerals_for_series_number'] cols = config['column_map'] + cols = [x for x in cols if x in self.headers] if cols != self.column_map: self.column_map = cols self.reset()