Hello,

I'm writing a gnome applet using pygtk, and I need to add a CheckButton
to the applet menu (something like the play item on rhythmbox tray icon
context menu).

To create the applet menu, i use the method 'setup_menu' [1], which
comes in the 'applet' module from python-desktop.

What I need is a way to change the menu item from check activated to
deactivated when clicking on it.

The menu creating code is:
-------------------------------------------
self.verbs = [("Alarm", self.menu_alarm_toggled), 
("Log", self.menu_log_toggled), 
("Prefs", self.prefs.preferences_show), 
("About", self.about_info)]

self.applet.setup_menu_from_file (glob.resources_dir,
"laptoptemp_menu.xml", "laptoptemp", self.verbs)
-------------------------------------------

The .xml file for the menu is:
-------------------------------------------
<Root>
        <popups>
        <popup name="button3">
                <menuitem name="Alarm" verb="Alarm" _label="_Enable alarm?"
pixtype="stock" pixname=""/>
                <menuitem name="Log" verb="Log" _label="_Enable logging?"
pixtype="stock" pixname=""/>
                <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"/>
        </popup>
        </popups>
</Root>
-------------------------------------------

                
Thanks in advance for any help!

-- adolfo               

[1]
http://developer.gnome.org/doc/API/2.0/panel-applet/panelapplet.html#PANEL-APPLET-SETUP-MENU

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

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

Reply via email to