[Evolution-hackers] Using an ECalObjModType enum as a property



Hello,

I have recently been creating some test programs to test a calendar
using GObject and evolution-data-server libraries.

One of them, which tries to modify a recurrent event, has an object
with an enum property called mod_type. This property is an
ECalObjModType. I tried to install the property using the following
code:

   g_object_class_install_property (object_class,
                                    PROP_MOD_TYPE,
                                    g_param_spec_enum ("mod-type",
                                                       "Modification type",
                                                       "The
modification type of the event",
                                                       ECalObjModType,
                                                       E_CAL_OBJ_MOD_THIS,
                                                       G_PARAM_READWRITE));

This doesn't work, and the reason seems to be ECalObjModType, which I
suppose isn't actually a proper GType and g_param_spec_enum is not
able to create the GParamSpec instance.

In order to fix this issue I have been looking for a way to solve it
and I have found the following message, so probably I'm wrong with my
asumption:
https://mail.gnome.org/archives/commits-list/2013-January/msg09131.html

Could you please tell me any hint about how to install the property properly?

Thank you,

Best regards,


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