]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-contact-factory.c
Use tp-glib generated code for file transfers rather than extensions.
[empathy.git] / libempathy / empathy-tp-contact-factory.c
index ffb3c8896efbcb4a825048d78b22bdf677444bb2..d83ba12a8ce146203497f4e86d664272c96ddb09 100644 (file)
@@ -130,7 +130,7 @@ tp_contact_factory_presences_table_foreach (const gchar    *state_str,
                message_str = g_value_get_string (message);
        }
 
-       if (!G_STR_EMPTY (message_str)) {
+       if (!EMP_STR_EMPTY (message_str)) {
                empathy_contact_set_presence_message (contact, message_str);
        } else {
                empathy_contact_set_presence_message (contact, NULL);
@@ -384,7 +384,7 @@ tp_contact_factory_avatar_maybe_update (EmpathyTpContactFactory *tp_factory,
        }
 
        /* Check if we have an avatar */
-       if (G_STR_EMPTY (token)) {
+       if (EMP_STR_EMPTY (token)) {
                empathy_contact_set_avatar (contact, NULL);
                return TRUE;
        }
@@ -783,12 +783,12 @@ tp_contact_factory_ready (EmpathyTpContactFactory *tp_factory)
                handle = empathy_contact_get_handle (contact);
                id = empathy_contact_get_id (contact);
                if (handle == 0) {
-                       g_assert (!G_STR_EMPTY (id));
+                       g_assert (!EMP_STR_EMPTY (id));
                        g_array_append_val (handle_needed, id);
                        handle_needed_contacts = g_list_prepend (handle_needed_contacts,
                                                                 g_object_ref (contact));
                }
-               if (G_STR_EMPTY (id)) {
+               if (EMP_STR_EMPTY (id)) {
                        g_array_append_val (id_needed, handle);
                        id_needed_contacts = g_list_prepend (id_needed_contacts,
                                                             g_object_ref (contact));
@@ -856,7 +856,7 @@ get_requestable_channel_classes_cb (TpProxy *connection,
                        TP_IFACE_CHANNEL ".ChannelType");
                if (chan_type == NULL ||
                    tp_strdiff (g_value_get_string (chan_type),
-                               EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) {
+                               TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) {
                        continue;
                }
 
@@ -879,7 +879,6 @@ get_requestable_channel_classes_cb (TpProxy *connection,
                        empathy_contact_set_capabilities (contact, caps |
                                EMPATHY_CAPABILITIES_FT);
                }
-
                break;
        }
 
@@ -973,7 +972,7 @@ tp_contact_factory_status_updated (EmpathyTpContactFactory *tp_factory)
                return;
        }
 
-       mc = empathy_mission_control_new ();
+       mc = empathy_mission_control_dup_singleton ();
        priv->connection = mission_control_get_tpconnection (mc, priv->account, NULL);
        if (!priv->connection) {
                return;
@@ -1522,7 +1521,7 @@ empathy_tp_contact_factory_init (EmpathyTpContactFactory *tp_factory)
                EMPATHY_TYPE_TP_CONTACT_FACTORY, EmpathyTpContactFactoryPriv);
 
        tp_factory->priv = priv;
-       priv->account_manager = empathy_account_manager_new ();
+       priv->account_manager = empathy_account_manager_dup_singleton ();
 
        g_signal_connect (priv->account_manager, "account-connection-changed",
                          G_CALLBACK (tp_contact_factory_account_connection_cb),