mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: Check all stores in search dialog on first run.
This commit is contained in:
parent
7e4ea69a1f
commit
0cd5e1c9d1
@ -82,6 +82,8 @@ class SearchDialog(QDialog, Ui_Dialog):
|
|||||||
self.restore_state()
|
self.restore_state()
|
||||||
|
|
||||||
def setup_store_checks(self):
|
def setup_store_checks(self):
|
||||||
|
first_run = self.config.get('first_run', True)
|
||||||
|
|
||||||
# Add check boxes for each store so the user
|
# Add check boxes for each store so the user
|
||||||
# can disable searching specific stores on a
|
# can disable searching specific stores on a
|
||||||
# per search basis.
|
# per search basis.
|
||||||
@ -98,7 +100,7 @@ class SearchDialog(QDialog, Ui_Dialog):
|
|||||||
icon = QIcon(I('donate.png'))
|
icon = QIcon(I('donate.png'))
|
||||||
for i, x in enumerate(sorted(self.gui.istores.keys(), key=lambda x: x.lower())):
|
for i, x in enumerate(sorted(self.gui.istores.keys(), key=lambda x: x.lower())):
|
||||||
cbox = QCheckBox(x)
|
cbox = QCheckBox(x)
|
||||||
cbox.setChecked(existing.get(x, False))
|
cbox.setChecked(existing.get(x, first_run))
|
||||||
store_list_layout.addWidget(cbox, i, 0, 1, 1)
|
store_list_layout.addWidget(cbox, i, 0, 1, 1)
|
||||||
if self.gui.istores[x].base_plugin.affiliate:
|
if self.gui.istores[x].base_plugin.affiliate:
|
||||||
iw = QLabel(self)
|
iw = QLabel(self)
|
||||||
@ -109,6 +111,8 @@ class SearchDialog(QDialog, Ui_Dialog):
|
|||||||
store_list_layout.setRowStretch(store_list_layout.rowCount(), 10)
|
store_list_layout.setRowStretch(store_list_layout.rowCount(), 10)
|
||||||
self.store_list.setWidget(stores_check_widget)
|
self.store_list.setWidget(stores_check_widget)
|
||||||
|
|
||||||
|
self.config['first_run'] = False
|
||||||
|
|
||||||
def build_adv_search(self):
|
def build_adv_search(self):
|
||||||
adv = AdvSearchBuilderDialog(self)
|
adv = AdvSearchBuilderDialog(self)
|
||||||
if adv.exec_() == QDialog.Accepted:
|
if adv.exec_() == QDialog.Accepted:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user