Tooltips and unref


Someone was talking about tooltips and hanging refs. Now, I managed
to delete the message before I noticed to which ML it was posted ;)
I suspect the poster subscribes to this list as well, though :)

Ah well, to the point: to remove the reference the tooltip adds
to a widget, call

  gtk_tooltips_set_tip (tooltips, widget, NULL, NULL);

This will remove the widget from the tooltips list of handled
widgets, release the associated memory and unref the widget.

Hope this helps.

While I'm at it, I would like to suggest the addition of a function:


gtk_tooltips_remove_tip (GtkTooltips *tooltips,
                         GtkWidget   *widget)
  gtk_tooltips_set_tip (tooltips, widget, NULL, NULL);


to avoid confusion and make it self-documenting.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]