Re: Tooltips patch [take 1]



On Sat, 17 Mar 2007, Kristian Rietveld wrote:

Damon Chaplin wrote:
Is there any real need for the "has-tooltip" property? From a quick look
at the API it doesn't seem that useful to me.

Only if the has-tooltip property is TRUE, the query-tooltip signal will be emitted for that widget. When has-tooltip is set to TRUE, the event masks of the widget's windows will be modified so that motion events are monitored.

The developer either wants to set a simple tooltip with "tooltip-markup"
or connect to the "signal-query" signal to set context-sensitive
tooltips.

When you set tooltip-markup to something which is not an empty string, the has-tooltip value will automatically be set to TRUE for that widget. I don't know if it is possible and/or wished to automatically set has-tooltip to TRUE when something connects to the query-tooltip signal.

no, that's not automatable. so setting ::has-tooltip to TRUE is needed
if you connect a signal handler to ::query-tooltip.

the main reason for ::has-tooltip is efficiency, because the new tooltips
potentially do many tip checks currently (ca. on every mouse motion, however
we might implement some coalescing to limit the number of tip checks to
16-25 per second), and for each such tooltip check, multiple widgets maybe
queried (the innermost child widget and all its parents worst case).

regards,

-kris.

---
ciaoTJ



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