Mercurial > pidgin.yaz
changeset 19221:6d0e10a6ee35
merge of '48fad9773e276b7949c6dcebf5b2948b46b8e2c7'
and 'b8f6df7e8259294fb9f129e0785531e0b35e34cd'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 13 Aug 2007 00:50:25 +0000 |
parents | e5c775a3a44d (current diff) d2c5d41ed7e1 (diff) |
children | 476e16ce29d0 |
files | |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Mon Aug 13 00:31:39 2007 +0000 +++ b/pidgin/gtkblist.c Mon Aug 13 00:50:25 2007 +0000 @@ -2608,6 +2608,7 @@ gboolean tooltip_top = FALSE; struct _pidgin_blist_node *gtknode; GdkRectangle mon_size; + int sig; if (node == NULL) return; @@ -2618,7 +2619,6 @@ */ pidgin_blist_tooltip_destroy(); - gtkblist->tipwindow = gtk_window_new(GTK_WINDOW_POPUP); if(PURPLE_BLIST_NODE_IS_CHAT(node) || PURPLE_BLIST_NODE_IS_BUDDY(node)) { @@ -2673,7 +2673,6 @@ G_CALLBACK(pidgin_blist_paint_tip), NULL); gtk_widget_ensure_style (gtkblist->tipwindow); - #if GTK_CHECK_VERSION(2,2,0) gdk_display_get_pointer(gdk_display_get_default(), &screen, &x, &y, NULL); mon_num = gdk_screen_get_monitor_at_point(screen, x, y); @@ -2722,6 +2721,10 @@ gtk_window_move(GTK_WINDOW(gtkblist->tipwindow), x, y); gtk_widget_show(gtkblist->tipwindow); + /* Hide the tooltip when the widget is destroyed */ + sig = g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(pidgin_blist_tooltip_destroy), NULL); + g_signal_connect_swapped(G_OBJECT(gtkblist->tipwindow), "destroy", G_CALLBACK(g_source_remove), GINT_TO_POINTER(sig)); + return; }