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 590335 - inadequate explanation of <menu> under <toolitem> in ui definition
inadequate explanation of <menu> under <toolitem> in ui definition
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Documentation
2.16.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 653303
 
 
Reported: 2009-07-31 01:08 UTC by Allin Cottrell
Modified: 2017-11-03 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Program to implement <menu> under <toolitem> (2.33 KB, text/plain)
2009-07-31 01:14 UTC, Allin Cottrell
Details

Description Allin Cottrell 2009-07-31 01:08:37 UTC
Documentation 
Section: gtk-doc/html/gtk/GtkUIManager.html
"<!ELEMENT toolitem     (menu?) >"

"Note that toolitem elements may contain a menu element, but only if their associated action specifies a GtkMenuToolButton as proxy."

Correct version:
I don't know.  Is this possibility for real?  If so, it should be 
properly documented; if not, these parts of the GtkUIManager doc
should be removed.

Other information:
I tried strenuously to implement what seems to be implied by
the quotations I have cited from the GtkUIManager docs, but
nothing along these lines actually works.
Comment 1 Allin Cottrell 2009-07-31 01:14:48 UTC
Created attachment 139601 [details]
Program to implement <menu> under <toolitem>

Here's C code for a program which I believe ought to work 
according to the docs, but which does not work.
Comment 2 Christian Persch 2009-08-01 10:22:09 UTC
You need to implement a GtkAction derived class which sets GtkActionClass:toolbar_item_type to GTK_TYPE_MENU_TOOL_BUTTON in its class_init function, and use an instance of that for your IndexButton action.
Comment 3 Allin Cottrell 2009-08-29 19:04:18 UTC
OK, but in that case the GTK docs should state as much.
As it is, the doc gives the impression that you can
do <menu> under <toolitem> just using the regular GTK
API, without going to the length of implementing your
own sub-class of GtkAction.
Comment 4 Sébastien Wilmet 2017-11-03 19:00:34 UTC
GtkUIManager and GtkAction are deprecated in GTK+ 3, and are already removed in GTK+ 3.9x. So at this point it is not worth improving that part of the documentation.