• Philip Withnall's avatar
    Bug 665692 — Use constructors correctly · 2247cdd5
    Philip Withnall authored
    In order to allow libfolks to be used from introspected languages (such as
    Python) properly, we need to correctly use the GObject construction process,
    rather than generating code which does all object initialisation inside
    a *_new() function. This involves moving lots of code into construct{} blocks.
    There are some complications; mostly the need for various private variables to
    now be exposed as construct-only properties. Most of them should've been
    Other complications arose from the fact that moving code to a construct{}
    block can subtly change the execution order of the code if the Object() call
    lists properties which are non-construct properties (e.g. the “alias” property
    of a Persona). The setters for these properties will now be called _after_ the
    construct{} code, whereas previously they would've been called beforehand.
    This rears its head in Tpf.Persona, but hopefully nowhere else.
    Closes: bgo#665692
tpf-persona.vala 29.8 KB