GNOME Bugzilla – Bug 487624
Tooltips doesn't get updated if ther's no mouse motion over widget
Last modified: 2008-09-29 16:44:59 UTC
With pygtk 2.10, when you had a tooltip on a widget (image, hbox, statusicon, whatever) and you hold the mouse over it, you could watch the tooltip changing its text if the app wanted (with a gobject.timeout_add for example). With pygtk 2.12, you have to move the mouse to get the tooltip updated. Here's a screencast of how it used to work on 2.10 (those are pygtk applets): http://computertemp.berlios.de/screenshots/screenshot_action.gif
I guess this is not a pygtk issue, do you have a minimal testcase? I bet Johan will reassign to GTK+ anyway...
Well, in fact this is not pygtk related, it happens with gtk as well, so please reassign to GTK+ Here is example code to test: #include <time.h> #include <gtk/gtk.h> static GtkStatusIcon *create_tray_icon() { GtkStatusIcon *tray_icon; tray_icon = gtk_status_icon_new(); gtk_status_icon_set_from_icon_name(tray_icon, GTK_STOCK_MEDIA_STOP); gtk_status_icon_set_tooltip(tray_icon, "Example Tray Icon"); gtk_status_icon_set_visible(tray_icon, TRUE); return tray_icon; } gboolean update_text (gpointer tray_icon) { char s[30]; size_t i; struct tm tim; time_t now; now = time(NULL); tim = *(localtime(&now)); i = strftime(s,30,"%b %d, %Y; %H:%M:%S\n",&tim); gtk_status_icon_set_tooltip(tray_icon,s); return 1; } int main(int argc, char **argv) { GtkStatusIcon *tray_icon; gtk_init(&argc, &argv); tray_icon = create_tray_icon(); g_timeout_add (1000, update_text, tray_icon); gtk_main(); return 0; }
Fixed on trunk, will backmerge to 2-14 later.