Re: Tooltips progress

On Thu, 1 Jun 2006, Matthias Clasen wrote:

Attached is some sample code using the new API.  Opinions, comments,
suggestions are appreciated.

I don't remember too much of the original proposal, so I'll just go
by what I see in the examples...

What is the relation between the tooltip-markup and has-tooltip
properties ?

setting ::tooltip-markup should automatically set ::has-tooltip=TRUE;
as mentioned in the original proposal:

Is has-tooltip automatically set when setting tooltip-markup ?
Or do you only need to set has-tooltip if you want to connect to
query-tooltip ?

the idea behind ::has-tooltip is to reduce the number of required signal
emissions to figure a tooltip. e.g. by adding a PRIVATE_GTK_* flag that
indicates if the ::query-tooltips() emission is neccessary.
maybe it'd helpt to rename that property to ::can-tooltip?

Is the tooltip window available as a property too ? (The example uses
a dedicated setter for it).

i don't quite see a need for that. the custom window is only useful if
you implement your own ::query-tooltip() handler anyway and there you
could simply use the getter.

(if you want to argue consistency with other things settable/gettable
on widgets though, then yes, you have a point for also exporting it
as a property)

The example doesn't show tooltips constructed using the old tooltips
api, but I assume those will continue to work as before, right ?

that was the plan, i.e. you'd basically just do:

gtk_tooltips_set_tip (GtkTooltips   *tooltips,
                      GtkWidget     *widget,
                      const gchar   *tip_text,
                      const gchar   *tip_private)
  g_object_set (widget, "tooltip-markup", tip_text, NULL);



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