diff pyink/domview_ui.py @ 1304:94e6594dea59

Make comp_dock being instantiated by domview_ui
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 19 Jan 2011 17:56:21 +0800
parents 6949e2b6cae2
children 573a51b1eb37
line wrap: on
line diff
--- a/pyink/domview_ui.py	Wed Jan 19 14:52:29 2011 +0800
+++ b/pyink/domview_ui.py	Wed Jan 19 17:56:21 2011 +0800
@@ -383,9 +383,14 @@
     _tween_type_names = ('normal', 'scale')
     
     def __init__(self):
+        from comp_dock import comp_dock
+        
 	super(domview_ui, self).__init__()
+        
 	self._fl_stack = frameline_stack()
 	self._dom = domview()
+        self._comp_dock = comp_dock(self)
+        self._desktop = None
         self._doc = None
         self._root = None
         self._lock = False
@@ -426,6 +431,15 @@
 	    pass
 	pass
     
+    ## \brief Setup desktop that the document will be serviced.
+    #
+    # This method must be called before handle_doc_root.
+    #
+    def set_desktop(self, desktop):
+        self._desktop = desktop
+        self._comp_dock.install_dock(desktop) # from component_manager
+        pass
+    
     ## \brief This method is called to handle a new document.
     #
     def handle_doc_root(self, doc, root):