commit f1c638c50933341e32b1277a23d5dc2ab4d8547b
parent 6fec75d9a21b1fd937f4419d8767ea9d1361b55f
Author: thomasv <thomasv@gitorious>
Date: Sun, 3 Mar 2013 12:14:24 +0100
fix: generate functions
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gui/gui_classic.py b/gui/gui_classic.py
@@ -2249,12 +2249,14 @@ class ElectrumWindow(QMainWindow):
grid_plugins = QGridLayout(tab5)
grid_plugins.setColumnStretch(0,1)
tabs.addTab(tab5, _('Plugins') )
+ def mk_toggle(cb, p):
+ return lambda: cb.setChecked(p.toggle(self))
for i, p in enumerate(self.wallet.plugins):
try:
name, description = p.get_info()
cb = QCheckBox(name)
cb.setChecked(p.is_enabled())
- cb.stateChanged.connect(lambda: cb.setChecked(p.toggle(self)))
+ cb.stateChanged.connect(mk_toggle(cb,p))
grid_plugins.addWidget(cb, i, 0)
grid_plugins.addWidget(HelpButton(description), i, 2)
except: