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 522060 - Gtk.ActionGroup.add_actions() family of functions is broken
Gtk.ActionGroup.add_actions() family of functions is broken
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.1.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on: 501584 522059
Blocks:
 
 
Reported: 2008-03-12 17:21 UTC by Emmanuele Bassi (:ebassi)
Modified: 2008-03-16 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Emmanuele Bassi (:ebassi) 2008-03-12 17:21:16 UTC
SSIA

add_actions() has a gpointer data argument to be passed to ActionEntry callback; the data argument is removed by vapigen, which means that valac will produce invalid C code from valid Vala code.

a solution is either add a pointer argument to add_actions() or, better, pass the instance pointer implicitly.

along with bug 522059 this makes using UIManager a lot more complicated that it should be.
Comment 1 Jürg Billeter 2008-03-14 15:50:35 UTC
Confirming. Do you have an idea how we could make it possible to pass the instance pointer implicitly, as you specify the callback at a different location (in the const struct) than the user_data/instance (function argument)?
Comment 2 Jürg Billeter 2008-03-16 21:58:59 UTC
2008-03-16  Jürg Billeter  <j@bitron.ch>

	* vapigen/valagidlparser.vala: support hidden="0" for parameters

	* vapi/packages/gtk+-2.0/: fix gtk_action_group_add_actions
	  bindings, fixes bug 522060

	* vapi/gtk+-2.0.vapi: regenerated

Fixed in r1131.