Module: deluge
Branch: master
Commit: e81a279dc2103ef3e259e13e9b4be9013a085ff4

Author: Nick Lanham <[email protected]>
Date:   Sat Mar 19 12:38:55 2011 +0100

fix naming issue with close callback in popups

---

 deluge/ui/console/modes/input_popup.py |    4 ++--
 deluge/ui/console/modes/popup.py       |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/deluge/ui/console/modes/input_popup.py 
b/deluge/ui/console/modes/input_popup.py
index 44f9de0..8c52f11 100644
--- a/deluge/ui/console/modes/input_popup.py
+++ b/deluge/ui/console/modes/input_popup.py
@@ -613,12 +613,12 @@ class InputPopup(Popup):
         elif c == curses.KEY_DOWN:
             self.current_input = min(len(self.inputs)-1,self.current_input+1)
         elif c == curses.KEY_ENTER or c == 10:
-            if self._close_cb:
+            if self.close_cb:
                 vals = {}
                 for ipt in self.inputs:
                     vals[ipt.name] = ipt.get_value()
                 curses.curs_set(0)
-                self._close_cb(vals)
+                self.close_cb(vals)
             return True # close the popup
         elif c == 27: # close on esc, no action
             return True
diff --git a/deluge/ui/console/modes/popup.py b/deluge/ui/console/modes/popup.py
index e742030..f4d00d4 100644
--- a/deluge/ui/console/modes/popup.py
+++ b/deluge/ui/console/modes/popup.py
@@ -78,7 +78,7 @@ class Popup:
         self.screen = curses.newwin(height_req,width_req,by,bx)
 
         self.title = title
-        self.__close_cb = close_cb
+        self.close_cb = close_cb
         self.height,self.width = self.screen.getmaxyx()
         self.divider = None
         self.lineoff = 0
@@ -130,13 +130,13 @@ class Popup:
                 self.lineoff += 1
 
         elif c == curses.KEY_ENTER or c == 10 or c == 27: # close on enter/esc
-            if self.__close_cb:
-                self.__close_cb()
+            if self.close_cb:
+                self.close_cb()
             return True # close the popup        
 
         if c > 31 and c < 256 and chr(c) == 'q':
-            if self.__close_cb:
-                self.__close_cb()
+            if self.close_cb:
+                self.close_cb()
             return True # close the popup
 
         self.refresh()

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to