This commit is contained in:
Kovid Goyal 2011-04-24 10:00:37 -06:00
commit c1720a1447
4 changed files with 8 additions and 20 deletions

View File

@ -161,18 +161,6 @@ class StorePlugin(object): # {{{
'''
return False
def get_settings(self):
'''
This is only useful for plugins that implement
:attr:`config_widget` that is the only way to save
settings. This is used by plugins to get the saved
settings and apply when necessary.
:return: A dictionary filled with the settings used
by this plugin.
'''
raise NotImplementedError()
def do_genesis(self):
self.genesis()

View File

@ -24,10 +24,9 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
class BaenWebScriptionStore(BasicStoreConfig, StorePlugin):
def open(self, parent=None, detail_item=None, external=False):
settings = self.get_settings()
url = 'http://www.webscription.net/'
if external or settings.get(self.name + '_open_external', False):
if external or self.config.get('open_external', False):
if detail_item:
url = url + detail_item
open_url(QUrl(url_slash_cleaner(url)))
@ -37,7 +36,7 @@ class BaenWebScriptionStore(BasicStoreConfig, StorePlugin):
detail_url = url + detail_item
d = WebStoreDialog(self.gui, url, parent, detail_url)
d.setWindowTitle(self.name)
d.set_tags(settings.get(self.name + '_tags', ''))
d.set_tags(self.config.get('tags', ''))
d.exec_()
def search(self, query, max_results=10, timeout=60):

View File

@ -37,7 +37,7 @@ class MobileReadStore(BasicStoreConfig, StorePlugin):
d.set_tags(self.config.get('tags', ''))
d.exec_()
else:
if self.update_cache(parent, 30):
self.update_cache(parent, 30)
d = MobeReadStoreDialog(self, parent)
d.setWindowTitle(self.name)
d.exec_()

View File

@ -206,7 +206,7 @@ class SearchDialog(QDialog, Ui_Dialog):
if res:
self.results_view.model().add_result(res, store_plugin)
if not self.results_view.model().has_results():
if not self.search_pool.threads_running() and not self.results_view.model().has_results():
info_dialog(self, _('No matches'), _('Couldn\'t find any books matching your query.'), show=True, show_copy_button=False)
@ -247,5 +247,6 @@ class SearchDialog(QDialog, Ui_Dialog):
def dialog_closed(self, result):
self.results_view.model().closing()
self.search_pool.abort()
self.cache_pool.abort()
self.save_state()