From 60bc41b33ef0a25237ccd28e5d37143b6c562e2a Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 5 Jul 2009 12:43:26 -0400 Subject: [PATCH] GUI: view ebook, open formats that do not have an input plugin because those can be opened with an external viewer. --- src/calibre/gui2/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 927e73b519..cd1e545a29 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -1368,8 +1368,8 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): for row in rows: row = row.row() - formats = self.library_view.model().db.formats(row).lower() - formats = set(formats.split(',')).intersection(available_input_formats()) + formats = self.library_view.model().db.formats(row).upper() + formats = formats.split(',') title = self.library_view.model().db.title(row) if not formats: @@ -1377,10 +1377,14 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI): _('%s has no available formats.')%(title,), show=True) continue + in_prefs = False for format in prefs['input_format_order']: - if format.lower() in formats: + if format in formats: + in_prefs = True self.view_format(row, format) break + if not in_prefs: + self.view_format(row, format[0]) else: paths = self.current_view().model().paths(rows) for path in paths: