comparison pyink/pyink.py @ 1326:0a2034f490e5

Show/hide components by showing/hiding component group.
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 30 Jan 2011 21:58:57 +0800
parents ffbbd3aa218d
children 599b606c4669
comparison
equal deleted inserted replaced
1325:e155064f6c7e 1326:0a2034f490e5
24 top = desktop.getToplevel() 24 top = desktop.getToplevel()
25 mbscene = MBScene(desktop,top) 25 mbscene = MBScene(desktop,top)
26 mbscene.show() 26 mbscene.show()
27 27
28 all_desktop_mbscenes[desktop] = mbscene 28 all_desktop_mbscenes[desktop] = mbscene
29
30 print hash(desktop)
31 pass 29 pass
32 30
33 31
34 ## \brief Handler for events of activating a desktop. 32 ## \brief Handler for events of activating a desktop.
35 # 33 #
52 pybInkscape.inkscape.connect('activate_desktop', act_desktop) 50 pybInkscape.inkscape.connect('activate_desktop', act_desktop)
53 pass 51 pass
54 52
55 53
56 def pyink_context_menu(view, item, menu_factory): 54 def pyink_context_menu(view, item, menu_factory):
57 print hash(view)
58 if view in all_desktop_mbscenes: 55 if view in all_desktop_mbscenes:
59 mbscene = all_desktop_mbscenes[view] 56 mbscene = all_desktop_mbscenes[view]
60 mbscene.context_menu(item, menu_factory) 57 mbscene.context_menu(item, menu_factory)
61 pass 58 pass
62 pass 59 pass