Re: [pygtk] Updating tooltip on gtk.StatusIcon

2007-10-17 Thread Adolfo González Blázquez
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é, 17-10-2007 a las 19:40 +0200, Adolfo González Blázquez escribió:
> 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 = 'icon.png'
>   self.mls = MlStats()
>   
>   self.icon = gtk.StatusIcon()
>   self.icon.set_from_file(self.image)
>   self.icon.set_visible(True)
>   
>   self.icon.connect('activate', self.on_icon_activate)
>   
>   self.menu = self.create_menu()
>   
>   self.timeout = 1000
>   gobject.timeout_add(self.timeout, self.update)
>   
> 
> def update(self):
>   stats = self.mls.get_stats()
>   self.icon.set_tooltip(stats)
>   return True
> 
> Thanks in advance for any help!
> 
> -- adolfo
> ___
> 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/


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/


Re: [pygtk] Updating tooltip on gtk.StatusIcon

2007-10-17 Thread Adolfo González Blázquez

El mié, 17-10-2007 a las 19:59 +0200, François Ingelrest escribió:
> I may be wrong but I think that Rhythmbox uses a custom window to do
> this, it does not use the tooltip itself (try to compare the look of
> that window and the one of "real" tooltip).

Yes, the use libsexy to draw the tooltip.
Another question would be how to add a custom tooltip to a
gtk.StatusIcon

> 
> On 10/17/07, Adolfo González Blázquez <[EMAIL PROTECTED]> wrote:
> > 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 = 'icon.png'
> > self.mls = MlStats()
> >
> > self.icon = gtk.StatusIcon()
> > self.icon.set_from_file(self.image)
> > self.icon.set_visible(True)
> >
> > self.icon.connect('activate', self.on_icon_activate)
> >
> > self.menu = self.create_menu()
> >
> > self.timeout = 1000
> > gobject.timeout_add(self.timeout, self.update)
> >
> >
> > def update(self):
> > stats = self.mls.get_stats()
> > self.icon.set_tooltip(stats)
> > return True
> >
> > Thanks in advance for any help!
> >
> > -- adolfo
> >
> > ___
> > 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/
> >
> >
> >
> ___
> 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/


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/


Re: [pygtk] Updating tooltip on gtk.StatusIcon

2007-10-17 Thread François Ingelrest
I may be wrong but I think that Rhythmbox uses a custom window to do
this, it does not use the tooltip itself (try to compare the look of
that window and the one of "real" tooltip).

On 10/17/07, Adolfo González Blázquez <[EMAIL PROTECTED]> wrote:
> 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 = 'icon.png'
> self.mls = MlStats()
>
> self.icon = gtk.StatusIcon()
> self.icon.set_from_file(self.image)
> self.icon.set_visible(True)
>
> self.icon.connect('activate', self.on_icon_activate)
>
> self.menu = self.create_menu()
>
> self.timeout = 1000
> gobject.timeout_add(self.timeout, self.update)
>
>
> def update(self):
> stats = self.mls.get_stats()
> self.icon.set_tooltip(stats)
> return True
>
> Thanks in advance for any help!
>
> -- adolfo
>
> ___
> 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/
>
>
>
___
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/


[pygtk] Updating tooltip on gtk.StatusIcon

2007-10-17 Thread Adolfo González Blázquez
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 = 'icon.png'
self.mls = MlStats()

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

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

self.menu = self.create_menu()

self.timeout = 1000
gobject.timeout_add(self.timeout, self.update)


def update(self):
stats = self.mls.get_stats()
self.icon.set_tooltip(stats)
return True

Thanks in advance for any help!

-- adolfo


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/