[pygtk] Updating tooltip on gtk.StatusIcon

Adolfo González Blázquez listas at infinicode.org
Thu Oct 18 02:26:30 WST 2007


It this maybe a bug (or feature)? Because with one applet that i wrote,
with the previous version of pygtk (2.10) the tooltip gets updated. Now
(with 2.12) it doesn't update.

This was how it worked on 2.10:
http://computertemp.berlios.de/screenshots/screenshot_action.gif

El mi=E9, 17-10-2007 a las 19:40 +0200, Adolfo Gonz=E1lez Bl=E1zquez escrib=
i=F3:
> Hello,
> =

> I'm writing a little app that uses gtk.StatusIcon, and I would like to
> know if is there any way to update the tooltip text while the pointer is
> hold over the icon. The behaviour I mean is something like Rhythmbox
> does while playing a song.
> =

> The tooltip text gets updated when I move the mouse pointer over the
> icon, but when it stills, no text updating .
> =

> The related code is quite simple:
> =

> =

> def __init__(self):
> 			=

> 	self.image =3D 'icon.png'
> 	self.mls =3D MlStats()
> 		=

> 	self.icon =3D gtk.StatusIcon()
> 	self.icon.set_from_file(self.image)
> 	self.icon.set_visible(True)
> 			=

> 	self.icon.connect('activate', self.on_icon_activate)
> 			=

> 	self.menu =3D self.create_menu()
> 			=

> 	self.timeout =3D 1000
> 	gobject.timeout_add(self.timeout, self.update)
> 			=

> =

> def update(self):
> 	stats =3D self.mls.get_stats()
> 	self.icon.set_tooltip(stats)	=

> 	return True
> =

> Thanks in advance for any help!
> =

> -- adolfo
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 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/20071017/c19c098d/a=
ttachment.pgp


More information about the pygtk mailing list