Store: Search: Fix scrolling of store checkboxes.

This commit is contained in:
John Schember 2011-05-15 20:10:51 -04:00
parent a26557414c
commit e4c6592dcf

View File

@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
import re
from random import shuffle
from PyQt4.Qt import (Qt, QDialog, QTimer, QCheckBox, QVBoxLayout, QIcon)
from PyQt4.Qt import (Qt, QDialog, QTimer, QCheckBox, QVBoxLayout, QIcon, QWidget)
from calibre.gui2 import JSONConfig, info_dialog
from calibre.gui2.progress_indicator import ProgressIndicator
@ -47,14 +47,16 @@ class SearchDialog(QDialog, Ui_Dialog):
# Add check boxes for each store so the user
# can disable searching specific stores on a
# per search basis.
stores_check_widget = QWidget()
stores_group_layout = QVBoxLayout()
self.stores_group.setLayout(stores_group_layout)
stores_check_widget.setLayout(stores_group_layout)
for x in sorted(self.store_plugins.keys(), key=lambda x: x.lower()):
cbox = QCheckBox(x)
cbox.setChecked(True)
stores_group_layout.addWidget(cbox)
setattr(self, 'store_check_' + x, cbox)
stores_group_layout.addStretch()
self.stores_group.setWidget(stores_check_widget)
# Set the search query
self.search_edit.setText(query)