[pygtk] Using a CheckButton on an applet Menu

Adolfo González Blázquez listas at infinicode.org
Wed Oct 11 20:50:50 WST 2006


I'm sorry to ask this but... could you please explain me a little bit
more what to do? I don't know exactly what you mean with that 'ui-event'
thing...

Thank you very much Gustavo.

-- adolfo

El mi=E9, 11-10-2006 a las 13:31 +0100, Gustavo J. A. M. Carneiro
escribi=F3:
> On Qua, 2006-10-11 at 14:07 +0200, Adolfo Gonz=E1lez Bl=E1zquez wrote:
> > 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=3D"button3">
> > 		<menuitem name=3D"Alarm" verb=3D"Alarm" _label=3D"_Enable alarm"
> > pixtype=3D"stock" pixname=3D"gtk-apply"/>
> > 		<separator/>
> > 		<menuitem name=3D"Prefs" verb=3D"Prefs" _label=3D"_Preferences"
> > pixtype=3D"stock" pixname=3D"gtk-properties"/>
> > 		<menuitem name=3D"About" verb=3D"About" _label=3D"_About" pixtype=3D"=
stock"
> > pixname=3D"gnome-stock-about"/>
> > 		<menuitem name=3D"Prueba" verb=3D"Prueba" _label=3D"Prueba" type=3D"t=
oggle"/>
> > 	</popup>
> > 	</popups>
> > </Root>
> > =

> > And i catch the signals from the menu options using this:
> > self.verbs =3D [("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??
> =

>   You need to connect to the 'ui-event' signal of the UIComponent.
> =

>   Regards,
> =

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Esta parte del mensaje =3D?ISO-8859-1?Q?est=3DE1?=3D firmada
	digitalmente
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20061011/c2b470df/a=
ttachment.pgp


More information about the pygtk mailing list