gobjectification: d01f13a0: Moved PurpleContact init into instance_i...
aluink at soc.pidgin.im
aluink at soc.pidgin.im
Thu Jul 2 12:10:50 EDT 2009
-----------------------------------------------------------------
Revision: d01f13a0b1675b44bb31b3fcb75269a9dcd27c76
Ancestor: e1e95870dec44bcc30219a0adf31b9284aa35ec7
Author: aluink at soc.pidgin.im
Date: 2009-07-02T15:52:54
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/d01f13a0b1675b44bb31b3fcb75269a9dcd27c76
Modified files:
libpurple/contact.c
ChangeLog:
Moved PurpleContact init into instance_init
-------------- next part --------------
============================================================
--- libpurple/contact.c ba49ce4723f708bde0b593c2491c7ed3527502f1
+++ libpurple/contact.c bf48333cba00dd7b3bf2816b3e49618bc07a6ea6
@@ -190,19 +190,7 @@ PurpleContact *purple_contact_new()
PurpleContact *purple_contact_new()
{
- PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
-
- PurpleContact *contact = g_object_new(PURPLE_CONTACT_TYPE, NULL);
- contact->totalsize = 0;
- contact->currentsize = 0;
- contact->online = 0;
- purple_blist_node_initialize_settings((PurpleBlistNode *)contact);
-
- if (ops && ops->new_node)
- ops->new_node((PurpleBlistNode *)contact);
-
- PURPLE_DBUS_REGISTER_POINTER(contact, PurpleContact);
- return contact;
+ return g_object_new(PURPLE_CONTACT_TYPE, NULL);
}
PurpleContact *purple_buddy_get_contact(PurpleBuddy *buddy)
@@ -300,7 +288,18 @@ purple_contact_init(GTypeInstance *insta
static void
purple_contact_init(GTypeInstance *instance, gpointer class)
{
+ PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
+ PurpleContact *contact = PURPLE_CONTACT(instance);
+ contact->totalsize = 0;
+ contact->currentsize = 0;
+ contact->online = 0;
+ purple_blist_node_initialize_settings((PurpleBlistNode *)contact);
+
+ if (ops && ops->new_node)
+ ops->new_node((PurpleBlistNode *)contact);
+
+ PURPLE_DBUS_REGISTER_POINTER(contact, PurpleContact);
}
GType
More information about the Commits
mailing list