After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 531527 - Advanced tooltip editor for glade
Advanced tooltip editor for glade
Product: glade
Classification: Applications
Component: general
Other All
: Normal enhancement
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Reported: 2008-05-05 10:44 UTC by Thomas D Ahle
Modified: 2018-03-26 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---

Custom tooltip editor mockup (84.97 KB, image/jpeg)
2008-05-05 10:46 UTC, Thomas D Ahle

Description Thomas D Ahle 2008-05-05 10:44:09 UTC
The new gtk has brought support for styled tooltips, and I believe the entire Gnome could be made easier to use by letting developers use this from glade.
Comment 1 Thomas D Ahle 2008-05-05 10:46:30 UTC
Created attachment 110400 [details]
Custom tooltip editor mockup

This is an example of a custom tooltip editor, which seams to be used some places on windows.
The tooltip produced is in the office 2007 style and contains detailed info on _how to use_ the hovered widget, not just _what it is_.
Comment 2 Tristan Van Berkom 2008-05-05 15:15:17 UTC
Great I agree, even I wanted to use some advanced tooltips in Glade
to better express why widgets/properties/signals may be deprecated
or unsupported by the target toolkit.

I havent looked into the new tooltip api very deeply, as I understand
you can draw a GdkWindow in a custom way for your tooltips correct ?

On the builder side, how do you propose to get this working ?

What code in the gtk+ runtime will handle actually drawing the tooltip ?
Comment 3 Thomas D Ahle 2008-05-05 18:05:23 UTC
Well, gtk 2.12 contains the following class (using pygtk, as that's what I know)

class gtk.Tooltip(gobject.GObject):
    def set_custom(widget)
    def set_icon(pixbuf)
    def set_icon_from_stock(stock_id, size)
    def set_markup(markup)
    def set_text(text)

So there are two ways:
 * Creating a hbox with labels and stuff
 * Simply setting an icon and a text.

If we want the footers and headers from the mockup (and I personally like them a lot :)) we need the first way.

I don't know if this is the right place to post the request, or it should rather be somewhere like the HIG, but as it has a mockup I thought glade would be it.
Comment 4 Thomas D Ahle 2008-05-05 18:08:46 UTC
Oh, and the way the tooltips are set on the widget:

When you need a tooltip with a little more fancy contents, like adding an image, or you want the tooltip to have different contents per gtk.TreeView row or cell, you will have to do a little more work:

    * Set the GtkWidget:has-tooltip property to True, this will make GTK+ monitor the widget for motion and related events which are needed to determine when and where to show a tooltip.
    * Connect to the GtkWidget::query-tooltip signal. This signal will be emitted when a tooltip is supposed to be shown. One of the arguments passed to the signal handler is a gtk.Tooltip object. This is the object that we are about to display as a tooltip, and can be manipulated in your callback using functions like set_icon. There are functions for setting the tooltip's markup, setting an image from a stock icon, or even putting in a custom widget.
    * Return True from your query-tooltip handler. This causes the tooltip to be show. If you return False, it will not be shown. 
Comment 5 GNOME Infrastructure Team 2018-03-26 15:05:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: