comparison pyink/comp_dock.py @ 1336:0b5ee9c90af7

Update components and timelines list for async changes on DOM
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 01 Feb 2011 23:20:26 +0800
parents 194c7a831083
children d0e6f350b3fd
comparison
equal deleted inserted replaced
1335:194c7a831083 1336:0b5ee9c90af7
162 ## \brief Start handle UI events. 162 ## \brief Start handle UI events.
163 # 163 #
164 def start_handle_ui_events(self): 164 def start_handle_ui_events(self):
165 self._builder.connect_signals(self) 165 self._builder.connect_signals(self)
166 pass 166 pass
167
168 def install_dock(self, desktop):
169 doc = desktop.doc()
170 doc.connectCommit(self.on_commit)
171 pass
167 172
168 def _current_component(self): 173 def _current_component(self):
169 treeview = self._components_treeview 174 treeview = self._components_treeview
170 path, col = treeview.get_cursor() 175 path, col = treeview.get_cursor()
171 176
398 def on_switch_timeline_activate(self, *args): 403 def on_switch_timeline_activate(self, *args):
399 self._switch_timeline() 404 self._switch_timeline()
400 self._desktop.doc().done("None", 405 self._desktop.doc().done("None",
401 "Switch to another timeline") 406 "Switch to another timeline")
402 pass 407 pass
408
409 def on_commit(self):
410 print 'commit'
411 pass
403 pass 412 pass
404 413
405 ## \brief Component dock 414 ## \brief Component dock
406 # 415 #
407 # Mix base functions and event handlers together. 416 # Mix base functions and event handlers together.
410 def __init__(self, domview_ui, fname=None): 419 def __init__(self, domview_ui, fname=None):
411 super(comp_dock, self).__init__(domview_ui, fname) 420 super(comp_dock, self).__init__(domview_ui, fname)
412 421
413 self.start_handle_ui_events() 422 self.start_handle_ui_events()
414 pass 423 pass
424
425 def install_dock(self, desktop):
426 comp_dock_base.install_dock(self, desktop)
427 comp_dock_ui.install_dock(self, desktop)
428 pass
415 pass 429 pass