changeset 1458:59b90d7fcf57

Lock UI event handlers for FSM_window
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 16 Apr 2011 22:30:40 +0800
parents 416a18409603
children 8eecaca2a125
files pyink/FSM_window.py pyink/comp_dock.py
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/FSM_window.py	Sat Apr 16 22:25:35 2011 +0800
+++ b/pyink/FSM_window.py	Sat Apr 16 22:30:40 2011 +0800
@@ -1,5 +1,6 @@
 import gtk
 import os
+import data_monitor
 
 class FSM_window_base(object):
     def __init__(self):
@@ -58,9 +59,14 @@
     pass
 
 class FSM_window(FSM_window_base):
-    def __init__(self, close_cb, destroy_cb):
+    __metaclass__ = data_monitor.data_monitor
+    __data_monitor_prefix__ = 'on_'
+    
+    def __init__(self, domview_ui, close_cb, destroy_cb):
         super(FSM_window, self).__init__()
 
+        self._locker = domview_ui
+        
         self._close_cb = close_cb # callback to close editor window (hide)
         self._destroy_cb = destroy_cb # callback to destroy editor window
         pass
--- a/pyink/comp_dock.py	Sat Apr 16 22:25:35 2011 +0800
+++ b/pyink/comp_dock.py	Sat Apr 16 22:30:40 2011 +0800
@@ -286,7 +286,8 @@
             self._fsm_editor_win = None
             pass
         
-        fsm_win = FSM_window.FSM_window(FSM_editor_close,
+        fsm_win = FSM_window.FSM_window(self._domview_ui,
+                                        FSM_editor_close,
                                         FSM_editor_destroy)
         self._fsm_editor_win = fsm_win