diff --git a/src/calibre/gui2/catalog/catalog_epub_mobi.py b/src/calibre/gui2/catalog/catalog_epub_mobi.py
index 12971528b2..6ecab3c081 100644
--- a/src/calibre/gui2/catalog/catalog_epub_mobi.py
+++ b/src/calibre/gui2/catalog/catalog_epub_mobi.py
@@ -64,5 +64,4 @@ class PluginWidget(QWidget,Ui_Form):
opts_dict[opt[0]] = opt_value.split(',')
opts_dict['output_profile'] = [load_defaults('page_setup')['output_profile']]
-
return opts_dict
diff --git a/src/calibre/gui2/dialogs/catalog.py b/src/calibre/gui2/dialogs/catalog.py
index 880b7b0fd6..6a99306d09 100644
--- a/src/calibre/gui2/dialogs/catalog.py
+++ b/src/calibre/gui2/dialogs/catalog.py
@@ -8,7 +8,8 @@ __docformat__ = 'restructuredtext en'
import os, sys
-from PyQt4.Qt import QDialog
+from PyQt4 import QtGui
+from PyQt4.Qt import QDialog, SIGNAL
from calibre.customize.ui import config
from calibre.gui2.dialogs.catalog_ui import Ui_Dialog
@@ -119,9 +120,11 @@ class Catalog(QDialog, Ui_Dialog):
self.sync.setChecked(dynamic.get('catalog_sync_to_device', True))
self.format.currentIndexChanged.connect(self.show_plugin_tab)
+ self.connect(self.buttonBox.button(QtGui.QDialogButtonBox.Apply),
+ SIGNAL("clicked()"),
+ self.apply)
self.show_plugin_tab(None)
-
def show_plugin_tab(self, idx):
cf = unicode(self.format.currentText()).lower()
while self.tabs.count() > 1:
@@ -147,6 +150,18 @@ class Catalog(QDialog, Ui_Dialog):
ans = w.options()
return ans
+ def apply(self):
+ # Store current values without building catalog
+ self.catalog_format = unicode(self.format.currentText())
+ dynamic.set('catalog_preferred_format', self.catalog_format)
+ self.catalog_title = unicode(self.title.text())
+ dynamic.set('catalog_last_used_title', self.catalog_title)
+ self.catalog_sync = bool(self.sync.isChecked())
+ dynamic.set('catalog_sync_to_device', self.catalog_sync)
+ if self.tabs.count() > 1:
+ w = self.tabs.widget(1)
+ ans = w.options()
+
def accept(self):
self.catalog_format = unicode(self.format.currentText())
dynamic.set('catalog_preferred_format', self.catalog_format)
diff --git a/src/calibre/gui2/dialogs/catalog.ui b/src/calibre/gui2/dialogs/catalog.ui
index 3d62f36e85..f41afb637d 100644
--- a/src/calibre/gui2/dialogs/catalog.ui
+++ b/src/calibre/gui2/dialogs/catalog.ui
@@ -20,9 +20,9 @@
- 430
+ 383
470
- 164
+ 211
32
@@ -30,7 +30,7 @@
Qt::Horizontal
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+ QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok