kuuko pushed a commit to branch master.

http://git.enlightenment.org/apps/epour.git/commit/?id=73dc6cee0a0f991bee847059d0dd0a3b39068be6

commit 73dc6cee0a0f991bee847059d0dd0a3b39068be6
Author: Kai Huuhko <kai.huu...@gmail.com>
Date:   Sun Jul 13 20:21:32 2014 +0300

    Fix brainos in a few lambdas
---
 epour/gui/Preferences.py  | 2 +-
 epour/gui/TorrentProps.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/epour/gui/Preferences.py b/epour/gui/Preferences.py
index ece7031..077a747 100644
--- a/epour/gui/Preferences.py
+++ b/epour/gui/Preferences.py
@@ -672,7 +672,7 @@ class Limits(Frame):
             usw.size_hint_weight = EXPAND_HORIZ
             usw.size_hint_align = FILL_HORIZ
             usw.set_value(rfunc())
-            usw.callback_changed_add(lambda x, y: wfunc(y), delay=2.0)
+            usw.callback_changed_add(lambda x, y, z=wfunc: z(y), delay=2.0)
             t.pack(usw, 1, r, 1, 1)
             usw.show()
 
diff --git a/epour/gui/TorrentProps.py b/epour/gui/TorrentProps.py
index e8d50f6..c233c17 100644
--- a/epour/gui/TorrentProps.py
+++ b/epour/gui/TorrentProps.py
@@ -472,7 +472,7 @@ class TorrentSettings(Box):
             w.size_hint_align = ALIGN_RIGHT
             w.state = getattr(s, getter)
             setter = getattr(handle, self.status_checks[getter])
-            w.callback_changed_add(lambda x: setter(x.state))
+            w.callback_changed_add(lambda x, z=setter: z(x.state))
             t.pack(w, 1, i, 1, 1)
             w.show()
 
@@ -495,7 +495,7 @@ class TorrentSettings(Box):
             w.spinner.special_value_add(0, "disabled")
             w.set_value(getattr(handle, getter)())
             setter = getattr(handle, self.handle_unit_spinners[getter])
-            w.callback_changed_add(lambda x, y: setter(y))
+            w.callback_changed_add(lambda x, y, z=setter: z(y))
             t.pack(w, 1, i, 1, 1)
             w.show()
 
@@ -517,7 +517,7 @@ class TorrentSettings(Box):
             w.special_value_add(-1.0, "disabled")
             w.value = getattr(handle, getter)()
             setter = getattr(handle, self.handle_spinners[getter])
-            w.callback_delay_changed_add(lambda x: setter(int(x.value)))
+            w.callback_delay_changed_add(lambda x, z=setter: z(int(x.value)))
             t.pack(w, 1, i, 1, 1)
             w.show()
 

-- 


Reply via email to