mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store search: save check state of stores.
This commit is contained in:
parent
e10b066b03
commit
02502674d2
@ -115,6 +115,11 @@ class SearchDialog(QDialog, Ui_Dialog):
|
|||||||
self.config['store_search_store_splitter_state'] = self.store_splitter.saveState()
|
self.config['store_search_store_splitter_state'] = self.store_splitter.saveState()
|
||||||
self.config['store_search_results_view_column_width'] = [self.results_view.columnWidth(i) for i in range(self.model.columnCount())]
|
self.config['store_search_results_view_column_width'] = [self.results_view.columnWidth(i) for i in range(self.model.columnCount())]
|
||||||
|
|
||||||
|
store_check = {}
|
||||||
|
for n in self.store_plugins:
|
||||||
|
store_check[n] = getattr(self, 'store_check_' + n).isChecked()
|
||||||
|
self.config['store_search_store_checked'] = store_check
|
||||||
|
|
||||||
def restore_state(self):
|
def restore_state(self):
|
||||||
geometry = self.config['store_search_geometry']
|
geometry = self.config['store_search_geometry']
|
||||||
if geometry:
|
if geometry:
|
||||||
@ -133,6 +138,12 @@ class SearchDialog(QDialog, Ui_Dialog):
|
|||||||
else:
|
else:
|
||||||
self.resize_columns()
|
self.resize_columns()
|
||||||
|
|
||||||
|
store_check = self.config['store_search_store_checked']
|
||||||
|
if store_check:
|
||||||
|
for n in store_check:
|
||||||
|
if hasattr(self, 'store_check_' + n):
|
||||||
|
getattr(self, 'store_check_' + n).setChecked(store_check[n])
|
||||||
|
|
||||||
def get_results(self):
|
def get_results(self):
|
||||||
# We only want the search plugins to run
|
# We only want the search plugins to run
|
||||||
# a maximum set amount of time before giving up.
|
# a maximum set amount of time before giving up.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user