Mercurial > MadButterfly
comparison pyink/pyink.py @ 943:82321f404b5f
Change the implement to insert window into the toplevel of the spdesktop. However, we not not insert the scene editor after the aloat window since they are created latter.
author | wycc |
---|---|
date | Mon, 15 Nov 2010 00:53:18 +0800 |
parents | 9ba94c577a6f |
children | 6586cd10c92f |
comparison
equal
deleted
inserted
replaced
942:a3f2fbf79191 | 943:82321f404b5f |
---|---|
5 global ink_inited | 5 global ink_inited |
6 ink_inited=0 | 6 ink_inited=0 |
7 def start_desktop(inkscape,ptr): | 7 def start_desktop(inkscape,ptr): |
8 global ink_inited | 8 global ink_inited |
9 if ink_inited == 1: | 9 if ink_inited == 1: |
10 desktop = pybInkscape.GPointer_2_PYSPDesktop(ptr) | |
11 top = desktop.getToplevel() | |
12 #dock = desktop.getDock() | |
13 #item = dock.new_item("scene", "scene", "feBlend-icon", dock.ITEM_ST_DOCKED_STATE) | |
14 scene = MBScene(desktop,top) | |
15 scene.show() | |
10 return | 16 return |
11 | 17 |
12 desktop = pybInkscape.GPointer_2_PYSPDesktop(ptr) | |
13 top = desktop.getToplevel() | |
14 dock = desktop.getDock() | |
15 item = dock.new_item("scene", "scene", "feBlend-icon", dock.ITEM_ST_DOCKED_STATE) | |
16 | 18 |
17 ink_inited = 1 | 19 ink_inited = 1 |
18 scene = MBScene(desktop,item.get_vbox()) | |
19 scene.show() | |
20 | 20 |
21 | 21 |
22 def pyink_start(): | 22 def pyink_start(): |
23 print 'pyink_start()' | 23 print 'pyink_start()' |
24 pybInkscape.inkscape.connect('activate_desktop', start_desktop) | 24 pybInkscape.inkscape.connect('activate_desktop', start_desktop) |