Hello,

I sent an email [1] to this list about this problem in april, but got no
responses. I'm thinking now of trying to implement this in my applet, so
that's why i'm asking again.

The problem is that i have an applet [2], using the gnomeapplet pygtk
module. I build the applet context menu using the
gnomeapplet.setup_menu_from_file function, passing it a .xml file like
this:
<Root>
        <popups>
        <popup name="button3">
                <menuitem name="Alarm" verb="Alarm" _label="_Enable alarm"
pixtype="stock" pixname="gtk-apply"/>
                <separator/>
                <menuitem name="Prefs" verb="Prefs" _label="_Preferences"
pixtype="stock" pixname="gtk-properties"/>
                <menuitem name="About" verb="About" _label="_About" 
pixtype="stock"
pixname="gnome-stock-about"/>
                <menuitem name="Prueba" verb="Prueba" _label="Prueba" 
type="toggle"/>
        </popup>
        </popups>
</Root>

And i catch the signals from the menu options using this:
self.verbs = [("Alarm", self.menu_alarm_toggled),
        ("Prefs", self.prefs.preferences_show), 
        ("About", self.about_info),
        ("Prueba", self.prueba)]
self.applet.setup_menu_from_file (glob.resources_dir,
                "computertemp_menu.xml", "computertemp", self.verbs)

Ths signals for the normal menu items (About, Prefs, Alarm) work ok, but
i can't catch the signal for the toggle menu item.
Has anybody idea of how to catch this signal??

Thank you very much!

-- adolfo

[1] http://www.daa.com.au/pipermail/pygtk/2006-April/012117.html
[2] http://computertemp.berlios.de/

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to