changeset 1489:1e607ce4bf7d

Rename FSM_window._grab_hdl to _grab_mouse_hdl
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 30 Apr 2011 18:16:44 +0800
parents 757c5626d15d
children 3f107ceee9c1
files pyink/FSM_window.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/FSM_window.py	Sat Apr 30 15:22:45 2011 +0800
+++ b/pyink/FSM_window.py	Sat Apr 30 18:16:44 2011 +0800
@@ -702,7 +702,7 @@
     width = 1024
     height = 768
 
-    _grab_hdl = None
+    _grab_mouse_hdl = None
     _bg_hdl = None
 
     _leave_mode_cb = None
@@ -967,20 +967,20 @@
         pass
 
     def grab_mouse(self, callback):
-        assert self._grab_hdl is None
+        assert self._grab_mouse_hdl is None
         
         root = self._root()
         root.setAttribute('inkscape:groupmode', '')
-        self._grab_hdl = root.spitem.connect('mouse-event', callback)
+        self._grab_mouse_hdl = root.spitem.connect('mouse-event', callback)
         pass
 
     def ungrab_mouse(self):
-        if not self._grab_hdl:
+        if not self._grab_mouse_hdl:
             return
         
         root = self._root()
-        root.spitem.disconnect(self._grab_hdl)
-        self._grab_hdl = None
+        root.spitem.disconnect(self._grab_mouse_hdl)
+        self._grab_mouse_hdl = None
         root.setAttribute('inkscape:groupmode', 'layer')
         pass