[Telepathy] discussion about empathy chat window

Davyd Madeley davyd.madeley at collabora.co.uk
Thu Jun 25 19:56:48 PDT 2009


On Mon, 2009-06-22 at 12:48 +0200, Nicolò Chieffo wrote:
> This is the patch to the wjt "send-button" branch.
> I could not test it because when opening a chat window I get lots of
> errors about creating the type EmpathyMessageEntry:

<snip>

>  typedef struct _EmpathyMessageEntryPrivate
> EmpathyMessageEntryPrivate;
>  typedef struct {
> -  GtkTextView parent;
> +  GtkTextView *parent;
>    EmpathyMessageEntryPrivate *priv;
>  } EmpathyMessageEntry;

Straight up, this change is wrong. EmpathyMessageEntry is a class. In
GObject types, you want your instance structure to contain the instance
structure of its parent, not a pointer to it (similarly for the class
structure).

For instance, if the parent class structure is 24 bytes, it ensures your
structure is at least 24 bytes + whatever extra data you add. Your
structure is too small to fit the data for the parent instance.

--d

-- 
Davyd Madeley

Collabora Ltd., Perth, Australia
http://www.collabora.co.uk/



More information about the telepathy mailing list