Outstanding patches, #15891
- From: "Matthias Clasen" <matthiasc poet de>
- To: <gtk-devel-list gnome org>
- Subject: Outstanding patches, #15891
- Date: Thu, 9 Aug 2001 10:42:36 +0200
The bug complains about a the fact that a currently displayed tooltip is
removed when its text is changed
with gtk_tooltips_set_tip. It may not be the best practice to continuously
change tooltip texts, but it still
seems correct to keep the tooltip displayed in this case.
Here is a patch which implements this. Ok to commit ?
Index: gtk/gtktooltips.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktooltips.c,v
retrieving revision 1.40
diff -u -3 -p -u -r1.40 gtktooltips.c
--- gtk/gtktooltips.c 2001/07/18 23:39:23 1.40
+++ gtk/gtktooltips.c 2001/08/07 20:14:41
@@ -238,11 +238,16 @@ gtk_tooltips_set_tip (GtkTooltips *toolt
const gchar *tip_private)
{
GtkTooltipsData *tooltipsdata;
+ gboolean show_tips;
g_return_if_fail (GTK_IS_TOOLTIPS (tooltips));
g_return_if_fail (widget != NULL);
tooltipsdata = gtk_tooltips_data_get (widget);
+
+ show_tips = (tooltips->active_tips_data
+ && tooltips->active_tips_data->widget == widget);
+
if (tooltipsdata)
gtk_tooltips_widget_remove (tooltipsdata->widget, tooltipsdata);
@@ -280,6 +285,11 @@ gtk_tooltips_set_tip (GtkTooltips *toolt
gtk_signal_connect (GTK_OBJECT (widget), "destroy",
(GtkSignalFunc) gtk_tooltips_widget_remove,
(gpointer) tooltipsdata);
+ if (show_tips)
+ {
+ gtk_tooltips_set_active_widget (tooltips, widget);
+ gtk_tooltips_draw_tips (tooltips);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]