On Sat, 2012-02-04 at 00:01 +0100, David Nečas wrote:
> On Fri, Feb 03, 2012 at 11:36:13PM +0100, Stefan Salewski wrote:
> > How can I immediately activate or deactivate tooltips for all TreeView
> > widgets on user action, i.e. menu operation.
> 
> You can enable/disable all tooltips using the "gtk-enable-tooltips"
> GtkSettings property.
> 
> But if you want to enable/disable them just for some specific of widgets
> you have to handle it yourself.  The easiest method is probably making
> the widgets query your enable/disable setting in their "query-tooltip"
> signal handlers – and then return TRUE or FALSE from the handlers.
> 
> Yeti

Sorry, I may need some more help...

I was not able to suppress the tooltips by returning FALSE from the
signal handler -- in my Ruby code.

So I took the listview.c example from Andrew Krauses book, added tooltip
support. That works. Then I added a  query-tooltip" signal handler
returning FALSE -- but tooltips are further shown.

The handler is called, I checked it with a printf statement inside the
handler.

The C code is here:

http://www.ssalewski.de/tmp/liststore.c

I used this function to add tooltips

http://developer.gnome.org/gtk3/stable/GtkTreeView.html#gtk-tree-view-set-tooltip-column

My current guess is, that it is not possible to suppress tooltips for a
treeview by a "query-tooltip" signal handler. Maybe the handler is
called after the tooltip is displayed, or called for each row/column of
the treeview? But maybe I am doing something wrong, I have not much
experience in C GTK programming.

Best regards,

Stefan Salewski


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to