]> git.0d.be Git - empathy.git/commitdiff
Get the factory in _constructed because connection property is not set yet in _init
authorXavier Claessens <xclaesse@gmail.com>
Tue, 17 Feb 2009 14:48:14 +0000 (15:48 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:21:10 +0000 (12:21 +0200)
libempathy/empathy-tp-contact-list.c

index 4937f56570b0b9c6b1232378a6dcd33bcdfcee86..876e356f4ec54a8b6e270fdab30d625d44efdd68 100644 (file)
@@ -701,6 +701,8 @@ tp_contact_list_constructed (GObject *list)
        const gchar              *protocol_name = NULL;
        const gchar              *names[] = {NULL, NULL};
 
        const gchar              *protocol_name = NULL;
        const gchar              *names[] = {NULL, NULL};
 
+       priv->factory = empathy_tp_contact_factory_dup_singleton (priv->connection);
+
        names[0] = "publish";
        tp_cli_connection_call_request_handles (priv->connection,
                                                -1,
        names[0] = "publish";
        tp_cli_connection_call_request_handles (priv->connection,
                                                -1,
@@ -732,7 +734,7 @@ tp_contact_list_constructed (GObject *list)
         * put all contacts into a special group in that case.
         * FIXME: Default group should be an information in the profile */
        //protocol_name = tp_connection_get_protocol (priv->connection);
         * put all contacts into a special group in that case.
         * FIXME: Default group should be an information in the profile */
        //protocol_name = tp_connection_get_protocol (priv->connection);
-       if (!tp_strdiff (protocol_name, "local-xmpp") == 0) {
+       if (!tp_strdiff (protocol_name, "local-xmpp")) {
                priv->protocol_group = _("People nearby");
        }
 }
                priv->protocol_group = _("People nearby");
        }
 }
@@ -802,7 +804,6 @@ empathy_tp_contact_list_init (EmpathyTpContactList *list)
                EMPATHY_TYPE_TP_CONTACT_LIST, EmpathyTpContactListPriv);
 
        list->priv = priv;
                EMPATHY_TYPE_TP_CONTACT_LIST, EmpathyTpContactListPriv);
 
        list->priv = priv;
-       priv->factory = empathy_tp_contact_factory_dup_singleton (priv->connection);
 
        /* Map group's name to group's channel */
        priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal,
 
        /* Map group's name to group's channel */
        priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal,