1303
|
1 import gtk
|
|
2 import os
|
|
3
|
|
4 ## \brief User interface for management components and their timelines.
|
|
5 #
|
|
6 class comp_dock(gtk.VBox):
|
|
7 def __init__(self, fname=None):
|
|
8 super(comp_dock, self).__init__()
|
|
9
|
|
10 if not fname:
|
|
11 dirname = os.path.dirname(__file__)
|
|
12 fname = os.path.join(dirname, 'component_dock.glade')
|
|
13 print fname
|
|
14 pass
|
|
15
|
|
16 builder = gtk.Builder()
|
|
17 builder.add_from_file(fname)
|
|
18 dock_top = builder.get_object('component_dock_top')
|
|
19 dock_top_parent = dock_top.get_parent()
|
|
20 dock_top_parent.remove(dock_top)
|
|
21 self.pack_start(dock_top)
|
|
22 dock_top.show()
|
|
23
|
|
24 self._builder = builder
|
|
25 self._dock_top = dock_top
|
|
26 self._desktop = None
|
|
27 self._dock_item = None
|
|
28 pass
|
|
29
|
|
30 def install_dock(self, desktop):
|
|
31 self._desktop = desktop
|
|
32
|
|
33 dock = desktop.getDock()
|
|
34 item = dock.new_item('component_dock',
|
|
35 'Component and timeline manager',
|
|
36 'feBlend-icon', dock.ITEM_ST_DOCKED_STATE)
|
|
37 item_vbox = item.get_vbox()
|
|
38 item_vbox.pack_start(self)
|
|
39 self._dock_item = item
|
|
40
|
|
41 self.show()
|
|
42 pass
|
|
43 pass
|