tfix: generate functions - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit f1c638c50933341e32b1277a23d5dc2ab4d8547b (DIR) parent 6fec75d9a21b1fd937f4419d8767ea9d1361b55f (HTM) Author: thomasv <thomasv@gitorious> Date: Sun, 3 Mar 2013 12:14:24 +0100 fix: generate functions Diffstat: M gui/gui_classic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- (DIR) diff --git a/gui/gui_classic.py b/gui/gui_classic.py t@@ -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: