GNOME Bugzilla – Bug 63019
Tooltips for [label in] notebook tabs
Last modified: 2013-08-14 02:08:32 UTC
IMHO, it should be possible to add tooltips for notebook tabs, even when they are just labels. In that context, labels are a bit like buttons. One could add a eventbox, but that seems to interfere with the tabs' working.
If you connect to ::realize on the eventbox, and call gdk_window_get_events/gdk_window_set_events, to remove the BUTTON_PRESS_MASK/RELEASE_MASK from the widget->window it would probably work OK. Yes, there probably should be an API for adding tooltips to notebook tab labels, though I'm not really sure they are a great idea ... once you switch to the page, it should be obvious what the page does, or your GUI needs more help than a few tooltips.
This seems to work of for me using 2.4.14...
While packing the real label in an event box to set tooltips on works with regular mouse-over tooltips, it doesn't work for providing tooltips in keyboard mode (Control-F1). I'm going to attach a testcase. In Control-F1 mode, the tooltip shown is the notebook's tooltip not the tab label's, while the tab label is 'visibly focused'.
*** Bug 157227 has been marked as a duplicate of this bug. ***
Created attachment 33742 [details] testcase.c
Getting Control-F1 working for widgets that don't get the focus individually won't work without some fundemental reworking of the tooltip system.
Christian, you can look at the hoops I had to jump through to get Ctrl-F1 work for the tooltip on the filter combobox in the file chooser...