[GSoC] GObjectification Summary

Ankit Vani a at nevitus.org
Mon Oct 7 08:54:39 EDT 2013

Hi Mark

On 7 October 2013 13:11, Mark Doliner <mark at kingant.net> wrote:
> 1. I have kind of a generic question about GObject properties. What's
> the difference between purple_account_set_private_alias(account,
> "blah") and g_object_set (G_OBJECT(account), "private-alias", "blah",
> NULL)? Do we need both? Do we expect people to ever use the latter?
> Should PROP_PRIVATE_ALIAS_S be defined in account.h instead of
> account.c? Should purple_account_set_private_alias be static and not
> mentioned in account.h? Is this just standard stuff that GObject does?
> Is it for convenience? Is it required?

Some advantages of using properties is it allows setting or getting multiple
properties at once, and, it lets us emit a "notify" signal whenever a property
is changed (using g_object_notify). This will allow plugins to do more things
when certain properties change, once GObject signals are properly implemented
(which I'm getting at, but have been travelling lately). Properties are also the
only way to pass construction parameters during the construction of an object.

As for the PROP_*_S defines, I just adapted that from the old gobjectification
branch. They are just used for convinience in the .c file (for installing the
properties, in g_object_notify calls and in the *_new functions), and the
property names should be used directly everywhere else for simplicity.

> 2. It looks like the writing-im-msg signal always passes a
> PurpleIMConversation. Is that correct? If so, I think
> doc/conversation-signals.dox should be updated to reflect this. I
> suspect other signals in this file should likewise be updated.

Ah, you're right. Done. :)


More information about the Devel mailing list