From e0b6a9a7693bebe95b38dfb62a30181fe3c6f5fd Mon Sep 17 00:00:00 2001 From: John Schember Date: Wed, 2 Mar 2011 07:27:04 -0500 Subject: [PATCH] Get tags from settings. --- src/calibre/gui2/store/feedbooks_plugin.py | 3 ++- src/calibre/gui2/store/manybooks_plugin.py | 3 ++- src/calibre/gui2/store/smashwords_plugin.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/feedbooks_plugin.py b/src/calibre/gui2/store/feedbooks_plugin.py index 8f6c30f5c8..e07920fc4d 100644 --- a/src/calibre/gui2/store/feedbooks_plugin.py +++ b/src/calibre/gui2/store/feedbooks_plugin.py @@ -18,9 +18,10 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog class FeedbooksStore(BasicStoreConfig, StorePlugin): def open(self, parent=None, detail_item=None, external=False): + settings = self.get_settings() d = WebStoreDialog(self.gui, 'http://m.feedbooks.com/', parent, detail_item) d.setWindowTitle(self.name) - d.set_tags(self.name + ',' + _('store')) + d.set_tags(settings.get(self.name + '_tags', '')) d = d.exec_() def search(self, query, max_results=10, timeout=60): diff --git a/src/calibre/gui2/store/manybooks_plugin.py b/src/calibre/gui2/store/manybooks_plugin.py index e1eb5eaa13..4ca7018d00 100644 --- a/src/calibre/gui2/store/manybooks_plugin.py +++ b/src/calibre/gui2/store/manybooks_plugin.py @@ -19,9 +19,10 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog class ManyBooksStore(BasicStoreConfig, StorePlugin): def open(self, parent=None, detail_item=None, external=False): + settings = self.get_settings() d = WebStoreDialog(self.gui, 'http://manybooks.net/', parent, detail_item) d.setWindowTitle(self.name) - d.set_tags(self.name + ',' + _('store')) + d.set_tags(settings.get(self.name + '_tags', '')) d = d.exec_() def search(self, query, max_results=10, timeout=60): diff --git a/src/calibre/gui2/store/smashwords_plugin.py b/src/calibre/gui2/store/smashwords_plugin.py index dc9c308ad5..3d27d39c04 100644 --- a/src/calibre/gui2/store/smashwords_plugin.py +++ b/src/calibre/gui2/store/smashwords_plugin.py @@ -20,13 +20,14 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog class SmashwordsStore(BasicStoreConfig, StorePlugin): def open(self, parent=None, detail_item=None, external=False): + settings = self.get_settings() aff_id = 'usernone' # Use Kovid's affiliate id 30% of the time. if random.randint(1, 10) in (1, 2, 3): aff_id = 'kovidgoyal' d = WebStoreDialog(self.gui, 'http://www.smashwords.com/?ref=%s' % aff_id, parent, detail_item) d.setWindowTitle(self.name) - d.set_tags(self.name + ',' + _('store')) + d.set_tags(settings.get(self.name + '_tags', '')) d = d.exec_() def search(self, query, max_results=10, timeout=60):