GUI: Convert, allow single convert when specifically selected.

This commit is contained in:
John Schember 2009-07-01 07:52:57 -04:00
parent be516ba66b
commit 03fe8b6261

View File

@ -316,7 +316,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
QObject.connect(cm.actions()[1], QObject.connect(cm.actions()[1],
SIGNAL('triggered(bool)'), partial(self.convert_ebook, bulk=True)) SIGNAL('triggered(bool)'), partial(self.convert_ebook, bulk=True))
QObject.connect(self.action_convert, QObject.connect(self.action_convert,
SIGNAL('triggered(bool)'), partial(self.convert_ebook, bulk=False)) SIGNAL('triggered(bool)'), partial(self.convert_ebook))
self.convert_menu = cm self.convert_menu = cm
pm = QMenu() pm = QMenu()
@ -1162,7 +1162,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
previous = self.library_view.currentIndex() previous = self.library_view.currentIndex()
rows = [x.row() for x in \ rows = [x.row() for x in \
self.library_view.selectionModel().selectedRows()] self.library_view.selectionModel().selectedRows()]
if bulk or (not bulk and len(book_ids) > 1): if bulk or (bulk is None and len(book_ids) > 1):
jobs, changed, bad = convert_bulk_ebook(self, jobs, changed, bad = convert_bulk_ebook(self,
self.library_view.model().db, book_ids, out_format=prefs['output_format']) self.library_view.model().db, book_ids, out_format=prefs['output_format'])
else: else: