Re: [Evolution-hackers] Using an ECalObjModType enum as a property
- From: Milan Crha <mcrha redhat com>
- To: evolution-hackers gnome org
- Subject: Re: [Evolution-hackers] Using an ECalObjModType enum as a property
- Date: Fri, 10 Feb 2017 09:22:42 +0100
On Thu, 2017-02-09 at 21:51 +0100, Iñigo Martínez wrote:
   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));
        Hi,
check the documentation of the g_param_spec_enum(), the parameter is
meant to be a GType, but you pass it an enum name instead. The proper
value comes from e-cal-enum-types.h (included through
libecal/libecal.h, in this case E_TYPE_CAL_OBJ_MOD_TYPE.
By the way, why do you want an object property "mod-type"? It's usually
used as a function argument, not much useful as the object property,
from my point of view. Or you use it as some sort of default?
        Bye,
        Milan
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]