Invoking a menu callback causes an Illegal instruction failure, or at least
in the code attached to this mail. Am I doing something wrong ?

Frédéric
from gnome.ui import *
from gtk import *


mdi = GnomeMDI ('test', 'test')

mdi.connect ('destroy', mainquit)

mdi.set_menubar_template ([
    UIINFO_SUBTREE ("File", []),
    UIINFO_SUBTREE ("Documents", [])
    ])

mdi.set_child_menu_path ("File")
mdi.set_child_list_path ("Documents/")

child = GnomeMDIGenericChild ('child')

def create_view (* arg):
    return GtkLabel ("Hi !")
 
def callback (*arg):
    print arg
    
child.set_view_creator (create_view)
child.set_menu_template ([UIINFO_SUBTREE ("Test",
                                          [UIINFO_ITEM ("gronf", None, callback)])])

mdi.add_child (child)
mdi.add_view  (child)

mainloop ()

Reply via email to