mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add the heart to the search store chooser
This commit is contained in:
parent
b244246fce
commit
66571550e9
@ -1417,7 +1417,7 @@ class StoreWeightlessBooksStore(StoreBase):
|
||||
class StoreWHSmithUKStore(StoreBase):
|
||||
name = 'WH Smith UK'
|
||||
author = 'Charles Haley'
|
||||
description = u"With over 550 stores on the high street and 490 stores at airports, train stations, hospitals and motorway services, WHSmith is one of the UK's leading retail groups and a household name."
|
||||
description = u"Shop for savings on Books, discounted Magazine subscriptions and great prices on Stationery, Toys & Games"
|
||||
actual_plugin = 'calibre.gui2.store.whsmith_uk_plugin:WHSmithUKStore'
|
||||
|
||||
drm_free_only = False
|
||||
|
@ -9,8 +9,8 @@ __docformat__ = 'restructuredtext en'
|
||||
import re
|
||||
from random import shuffle
|
||||
|
||||
from PyQt4.Qt import (Qt, QDialog, QDialogButtonBox, QTimer, QCheckBox,
|
||||
QVBoxLayout, QIcon, QWidget, QTabWidget)
|
||||
from PyQt4.Qt import (Qt, QDialog, QDialogButtonBox, QTimer, QCheckBox, QLabel,
|
||||
QVBoxLayout, QIcon, QWidget, QTabWidget, QGridLayout)
|
||||
|
||||
from calibre.gui2 import JSONConfig, info_dialog
|
||||
from calibre.gui2.progress_indicator import ProgressIndicator
|
||||
@ -92,14 +92,22 @@ class SearchDialog(QDialog, Ui_Dialog):
|
||||
self.store_checks = {}
|
||||
|
||||
stores_check_widget = QWidget()
|
||||
store_list_layout = QVBoxLayout()
|
||||
store_list_layout = QGridLayout()
|
||||
stores_check_widget.setLayout(store_list_layout)
|
||||
for x in sorted(self.gui.istores.keys(), key=lambda x: x.lower()):
|
||||
|
||||
icon = QIcon(I('donate.png'))
|
||||
i = 0 # just in case the list of stores is empty
|
||||
for i, x in enumerate(sorted(self.gui.istores.keys(), key=lambda x: x.lower())):
|
||||
cbox = QCheckBox(x)
|
||||
cbox.setChecked(existing.get(x, False))
|
||||
store_list_layout.addWidget(cbox)
|
||||
store_list_layout.addWidget(cbox, i, 0, 1, 1)
|
||||
if self.gui.istores[x].base_plugin.affiliate:
|
||||
iw = QLabel(self)
|
||||
iw.setPixmap(icon.pixmap(16, 16))
|
||||
store_list_layout.addWidget(iw, i, 1, 1, 1)
|
||||
self.store_checks[x] = cbox
|
||||
store_list_layout.addStretch()
|
||||
i += 1
|
||||
store_list_layout.setRowStretch(i, 10)
|
||||
self.store_list.setWidget(stores_check_widget)
|
||||
|
||||
def build_adv_search(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user