Re: [Vala] [PATCH] gtk_action_group_add_*_actions add user_data



On Wed, Apr 2, 2008 at 7:34 AM, Jaap A. Haitsma <jaap haitsma org> wrote:
Hi,

 I've ran into an issue when using ActionGroup.add_toggle_actions or
 ActionGroup.add_radio_actions. The field user_data is not being set by
 the vala compiler so the C compiler complains. Attached patch should
 resolve this I think. In my opinion it would be even better if the
 user_data field was not there but that the vala compiler would
 automatically set it to the this pointer. Is this possible?

 Also somehow I can't run vapigen on trunk for gtk+. I get an error

 vapigen --library gtk+-2.0 packages/gtk+-2.0/gtk+-2.0.*
 error: The type name `Gtk.FileChooserEmbed' could not be found
 Generation failed: 1 error(s), 0 warning(s)

 Should I do something else.

I've just discovered a bug with the action entries. The signature of
the callbacks is always
like
static void sample_on_about (Sample* self, GtkAction* action)
while it needs to be
static void sample_on_about (GtkAction* action, Sample* self)


Attached sample.vala shows this. Furthermore this also shows with
add_actions stuff we should not pass any user data.

If I can get some hints on how to fix this, I can try to cook up a patch


Jaap

Attachment: sample.vala
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]