# HG changeset patch # User Thinker K.F. Li # Date 1302964240 -28800 # Node ID 59b90d7fcf57f343a2e133949a9287402a3ac452 # Parent 416a18409603d39ca94693cd24381b3afa945266 Lock UI event handlers for FSM_window diff -r 416a18409603 -r 59b90d7fcf57 pyink/FSM_window.py --- 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 diff -r 416a18409603 -r 59b90d7fcf57 pyink/comp_dock.py --- 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