Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; bh=UgagsBQMAouMLULygkdtnC4BuFzBBRFxqjhc8nZ+c6U=; b=R/fs8j8Vez+zNludBd0M/PbX/DDhJmMRdVjxI3bCrqqhHep0cqxplX+UeEhwC4Tkg0wzxM5gml4LfCJuNEu1CVOnpXT/LgFCdD26xtaYjUb0O6IxsMZjtgIfopvZhe7ImOvPUjrSMg/nkcGK4JflqxOL6HFTY9jj05mwSPh/zfY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=MYni9ygcguFjInNLiZaUQauozI6mERJzvJm6CSWYZ6nTAF6SlkkYMiOX9JREt7LkoqguqG60mCP8Ab7PdyK0/2WUN3xjXsNYfOEdQtetPtBZfpp7XOVy9lFVsziPnp+qt64ZoDBz2T3q7x3IWy7Sqz2HD82jai+cRYionVrhV4U= Date: Fri, 15 Feb 2008 16:48:59 +0100 To: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] tooltip on treeview cell Message-ID: <20080215154858.GA11325 at localhost> Mail-Followup-To: Julien Moutinho , lablgtk@yquem.inria.fr References: <87ejbfc9z1.fsf at wanadoo.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87ejbfc9z1.fsf at wanadoo.fr> From: Julien Moutinho Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Length: 3033 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Thu, Feb 14, 2008 at 06:57:38PM -0600, Yoann Padioleau wrote: > Hi, Hi, > How can I set the tooltip for a cell in a treeview ? > Apparently the other gtk bindings offer a method > set_tooltip_tree_cell() but I didn't find it in > lablgtk. AFAIK, if you use a GTK+ whose version is lower than 2.12, then its tooltip machinery, GtkTooltips (note the 's'), does not handle treeview tooltips. So the usual way is to do it manually, that is, to hook a motion_notify callback to the treeview, which will call a get_path_at_pos to retrieve the treeview cell under the cursor, whose data is then used to hide/show a popup window actually being the tooltip. However GTK+ 2.12 came up with a new tooltip machinery, GtkTooltip (no 's' now), which is way more powerful and handles treeview tooltips: http://mail.gnome.org/archives/gtk-devel-list/2007-June/msg00092.html A few months ago, I've wrapped GtkTooltip into the SVN of LablGTK: http://svn.gna.org/viewcvs/lablgtk/trunk One example for doing what you want with it being there: http://svn.gna.org/viewcvs/lablgtk/trunk/examples/tooltip.ml?rev=1392 However this wrap segfaults on my Debian box if the following patch against GTK+2.12 is not applied : http://bugzilla.gnome.org/show_bug.cgi?id=478519 I'm joining to this mail the patch updated to GTK+ 2.12.6. Feel free to tell GTK+'s developers your concern about BR#478519. HTH. --45Z9DzgjV8m4Oswq Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="gtk+2.12.6_gtktooltip_segfault.patch" --- gtk/gtktooltip.c.orig 2008-01-29 04:35:47.000000000 +0100 +++ gtk/gtktooltip.c 2008-02-15 16:28:46.000000000 +0100 @@ -862,6 +862,9 @@ tooltip = g_object_get_data (G_OBJECT (display), "gdk-display-current-tooltip"); + if (!tooltip) + return; + if (tooltip->keyboard_mode_enabled) { pointer_widget = tooltip_widget = tooltip->keyboard_widget; @@ -886,8 +889,6 @@ g_object_get (tooltip_widget, "has-tooltip", &has_tooltip, NULL); - g_assert (tooltip != NULL); - return_value = gtk_tooltip_run_requery (&tooltip_widget, tooltip, &x, &y); if (!return_value) return; @@ -994,7 +995,8 @@ tooltip = g_object_get_data (G_OBJECT (display), "gdk-display-current-tooltip"); - tooltip->timeout_id = 0; + if (tooltip) + tooltip->timeout_id = 0; return FALSE; } @@ -1009,7 +1011,7 @@ tooltip = g_object_get_data (G_OBJECT (display), "gdk-display-current-tooltip"); - if (tooltip && GTK_TOOLTIP_VISIBLE (tooltip)) + if (!tooltip || GTK_TOOLTIP_VISIBLE (tooltip)) return; if (tooltip->timeout_id) --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk --45Z9DzgjV8m4Oswq--