mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 07:35:00 +02:00
Add select all/none buttons to the polish dialog
This commit is contained in:
parent
b3e81e4444
commit
19b77f2d98
1 changed files with 11 additions and 0 deletions
|
|
@ -98,11 +98,22 @@ def __init__(self, db, book_id_map, parent=None):
|
|||
self.load_button = lb = bb.addButton(_('&Load Settings'), bb.ActionRole)
|
||||
self.load_menu = QMenu(lb)
|
||||
lb.setMenu(self.load_menu)
|
||||
self.all_button = b = bb.addButton(_('Select &all'), bb.ActionRole)
|
||||
b.clicked.connect(partial(self.select_all, True))
|
||||
self.none_button = b = bb.addButton(_('Select &none'), bb.ActionRole)
|
||||
b.clicked.connect(partial(self.select_all, False))
|
||||
l.addWidget(bb, count+1, 0, 1, -1)
|
||||
self.setup_load_button()
|
||||
|
||||
self.resize(QSize(900, 600))
|
||||
|
||||
def select_all(self, enable):
|
||||
for action in self.all_actions:
|
||||
x = getattr(self, 'opt_'+action)
|
||||
x.blockSignals(True)
|
||||
x.setChecked(enable)
|
||||
x.blockSignals(False)
|
||||
|
||||
def save_settings(self):
|
||||
if not self.something_selected:
|
||||
return error_dialog(self, _('No actions selected'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue