|
From: Decklin F. <de...@re...> - 2003-04-06 23:45:03
|
Robert McQueen writes:
> Funny, we fixed the exact same problem with the blist tooltips.
Yeah, I thought I remembered seeing something about it being fixed, so I
wasn't sure if I was going crazy for a minute :-)
> Cleanice's problem is fixed in their CVS,
thanks, I'll update my local packages.
> I'd guess we just need to do the same with our GtkIMHtml tooltips too.
This seems to not be quite as simple. I tried the obvious (OK, not that
obvious... why text_view is not a pointer escapes me):
diff -u -r1.170 gtkimhtml.c
--- gtkimhtml.c 5 Apr 2003 03:06:55 -0000 1.170
+++ gtkimhtml.c 6 Apr 2003 23:37:58 -0000
@@ -1354,6 +1356,7 @@
imhtml->tip_timer = 0;
imhtml->tip_window = gtk_window_new (GTK_WINDOW_POPUP);
+ imhtml->tip_window->parent = GTK_WIDGET (&imhtml->text_view);
gtk_widget_set_app_paintable (imhtml->tip_window, TRUE);
gtk_window_set_resizable (GTK_WINDOW (imhtml->tip_window), FALSE);
gtk_widget_set_name (imhtml->tip_window, "gtk-tooltips");
But that crashes when we try to destroy the widget. I don't get this
either, because we in buddy.c that tip window get destroyed and there's
no crash. I could kludge around it by doing this:
@@ -379,6 +379,7 @@
}
/* We've left the cell. Remove the timeout and create a new one below */
if (GTK_IMHTML(imhtml)->tip_window) {
+ GTK_IMHTML(imhtml)->tip_window->parent = NULL;
gtk_widget_destroy(GTK_IMHTML(imhtml)->tip_window);
GTK_IMHTML(imhtml)->tip_window = NULL;
}
@@ -403,6 +404,7 @@
{
/* when leaving the widget, clear any current & pending tooltips and restore the cursor */
if (GTK_IMHTML(imhtml)->tip_window) {
+ GTK_IMHTML(imhtml)->tip_window->parent = NULL;
gtk_widget_destroy(GTK_IMHTML(imhtml)->tip_window);
GTK_IMHTML(imhtml)->tip_window = NULL;
}
But that's just icky. What should I be doing here? My GTK-fu is
extremely rusty.
--
things change.
de...@re...
|