right-click menu (bonobo UI) states

I have a problem setting attributes like "sensitive" and "state" (for
radio buttons) in a right-click menu created using the bonobo UI XML.

For example, the Python code below - in large amount taken from the
documentation - doesn't show any entry in the menu.
Adding the label to the "menuitem" tag the label is shown, but the entry
is sensitive, despite the content of the "cmd" tag. :-/

I suppose I'm doing something wrong in the XML or maybe I forget to
call some method of the applet instance.
Does anyone have a working example of a "non sensitive" menu entry
created using an XML specification?

PS: no, it doesn't matter if the 'verb' has an associated call-back
or not. :-)




import gtk
import gnomeapplet

XML = """
    <cmd name="baa" label="Our Label" sensitive="0" />
    <menuitem name="foo" verb="baa" />

window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.set_size_request(200, 200)

applet = gnomeapplet.Applet()
applet.setup_menu(XML, [], None)




Davide Alberani <davide alberani gmail com> [GPG KeyID: 0x465BFD47]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]