After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 487624 - Tooltips doesn't get updated if ther's no mouse motion over widget
Tooltips doesn't get updated if ther's no mouse motion over widget
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-10-17 19:57 UTC by Adolfo González Blázquez
Modified: 2008-09-29 16:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Adolfo González Blázquez 2007-10-17 19:57:07 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
Comment 1 Gian Mario Tagliaretti 2007-10-17 20:25:03 UTC
I guess this is not a pygtk issue, do you have a minimal testcase?

I bet Johan will reassign to GTK+ anyway...
Comment 2 Adolfo González Blázquez 2007-10-17 22:02:58 UTC
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;
}
Comment 3 Kristian Rietveld 2008-09-29 16:44:59 UTC
Fixed on trunk, will backmerge to 2-14 later.