]> git.0d.be Git - empathy.git/commitdiff
Adjust for Folks PresenceOwner -> PresenceDetails rename
authorTravis Reitter <travis.reitter@collabora.co.uk>
Fri, 11 Mar 2011 06:07:44 +0000 (22:07 -0800)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Mon, 14 Mar 2011 18:46:52 +0000 (11:46 -0700)
Fixes bgo#644470 - Empathy needs to catch up with Folks interface name change
(API/ABI breaks)

libempathy-gtk/empathy-individual-store.c
libempathy-gtk/empathy-individual-view.c
libempathy-gtk/empathy-individual-widget.c
libempathy-gtk/empathy-persona-store.c
libempathy-gtk/empathy-ui-utils.c
libempathy/empathy-contact.c

index 95b41ca855f03b547900c6290cb346716a32d88f..b95da2b475771a2bef6e65c3faa2031ef3848b5c 100644 (file)
@@ -164,21 +164,21 @@ individual_get_client_types (FolksIndividual *individual)
   personas = folks_individual_get_personas (individual);
   for (l = personas; l != NULL; l = l->next)
     {
-      FolksPresenceOwner *presence;
+      FolksPresenceDetails *presence;
 
-      /* We only want personas which implement FolksPresenceOwner */
-      if (!FOLKS_IS_PRESENCE_OWNER (l->data))
+      /* We only want personas which implement FolksPresenceDetails */
+      if (!FOLKS_IS_PRESENCE_DETAILS (l->data))
         continue;
 
-      presence = FOLKS_PRESENCE_OWNER (l->data);
+      presence = FOLKS_PRESENCE_DETAILS (l->data);
 
-      if (folks_presence_owner_typecmp (
-              folks_presence_owner_get_presence_type (presence),
+      if (folks_presence_details_typecmp (
+              folks_presence_details_get_presence_type (presence),
               presence_type) > 0)
         {
           TpContact *tp_contact;
 
-          presence_type = folks_presence_owner_get_presence_type (presence);
+          presence_type = folks_presence_details_get_presence_type (presence);
 
           tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
           types = tp_contact_get_client_types (tp_contact);
@@ -710,8 +710,8 @@ individual_store_contact_update (EmpathyIndividualStore *self,
     }
 
   /* Get online state now. */
-  now_online = folks_presence_owner_is_online (
-      FOLKS_PRESENCE_OWNER (individual));
+  now_online = folks_presence_details_is_online (
+      FOLKS_PRESENCE_DETAILS (individual));
 
   if (!in_list)
     {
@@ -801,11 +801,11 @@ individual_store_contact_update (EmpathyIndividualStore *self,
           EMPATHY_INDIVIDUAL_STORE_COL_NAME,
             folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)),
           EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE,
-            folks_presence_owner_get_presence_type (
-                FOLKS_PRESENCE_OWNER (individual)),
+            folks_presence_details_get_presence_type (
+                FOLKS_PRESENCE_DETAILS (individual)),
           EMPATHY_INDIVIDUAL_STORE_COL_STATUS,
-            folks_presence_owner_get_presence_message (
-                FOLKS_PRESENCE_OWNER (individual)),
+            folks_presence_details_get_presence_message (
+                FOLKS_PRESENCE_DETAILS (individual)),
           EMPATHY_INDIVIDUAL_STORE_COL_COMPACT, priv->is_compact,
           EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE,
           EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, now_online,
@@ -1472,11 +1472,11 @@ individual_store_state_sort_func (GtkTreeModel *model,
    * the presences.
    */
   folks_presence_type_a =
-      folks_presence_owner_get_presence_type (
-          FOLKS_PRESENCE_OWNER (individual_a));
+      folks_presence_details_get_presence_type (
+          FOLKS_PRESENCE_DETAILS (individual_a));
   folks_presence_type_b =
-      folks_presence_owner_get_presence_type (
-          FOLKS_PRESENCE_OWNER (individual_b));
+      folks_presence_details_get_presence_type (
+          FOLKS_PRESENCE_DETAILS (individual_b));
   tp_presence_a = empathy_folks_presence_type_to_tp (folks_presence_type_a);
   tp_presence_b = empathy_folks_presence_type_to_tp (folks_presence_type_b);
 
index 638b7d9ec8356c09e1200197975f7b6bff76d766..129d02bcdb3f18485a9efc2cd924f9dbe22dc25a 100644 (file)
@@ -680,7 +680,8 @@ individual_view_drag_motion (GtkWidget *widget,
         }
 
       if (individual != NULL &&
-          folks_presence_owner_is_online (FOLKS_PRESENCE_OWNER (individual)) &&
+          folks_presence_details_is_online (
+              FOLKS_PRESENCE_DETAILS (individual)) &&
           (caps & EMPATHY_CAPABILITIES_FT))
         {
           gdk_drag_status (context, GDK_ACTION_COPY, time_);
index 2f5d8faf4d731621db015d59790dc3389cb80f3d..ebad685be9ddffb987d9617452cc2ac04a7b79ff 100644 (file)
@@ -228,20 +228,21 @@ update_weak_contact (EmpathyIndividualWidget *self)
       personas = folks_individual_get_personas (priv->individual);
       for (l = personas; l != NULL; l = l->next)
         {
-          FolksPresenceOwner *presence;
+          FolksPresenceDetails *presence;
 
           /* We only want personas which implement FolksPresence */
-          if (!FOLKS_IS_PRESENCE_OWNER (l->data))
+          if (!FOLKS_IS_PRESENCE_DETAILS (l->data))
             continue;
 
-          presence = FOLKS_PRESENCE_OWNER (l->data);
+          presence = FOLKS_PRESENCE_DETAILS (l->data);
 
-          if (folks_presence_owner_typecmp (
-                  folks_presence_owner_get_presence_type (presence),
+          if (folks_presence_details_typecmp (
+                  folks_presence_details_get_presence_type (presence),
                   presence_type) > 0 &&
               empathy_folks_persona_is_interesting (FOLKS_PERSONA (presence)))
             {
-              presence_type = folks_presence_owner_get_presence_type (presence);
+              presence_type = folks_presence_details_get_presence_type (
+                  presence);
               tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
             }
         }
@@ -1242,13 +1243,13 @@ notify_presence_cb (gpointer folks_object,
   state_image = g_object_get_data (table, "state-image");
 
   /* FIXME: Default messages should be moved into libfolks (bgo#627403) */
-  message = folks_presence_owner_get_presence_message (
-      FOLKS_PRESENCE_OWNER (folks_object));
+  message = folks_presence_details_get_presence_message (
+      FOLKS_PRESENCE_DETAILS (folks_object));
   if (EMP_STR_EMPTY (message))
     {
       message = empathy_presence_get_default_message (
-          folks_presence_owner_get_presence_type (
-              FOLKS_PRESENCE_OWNER (folks_object)));
+          folks_presence_details_get_presence_type (
+              FOLKS_PRESENCE_DETAILS (folks_object)));
     }
 
   if (message != NULL)
@@ -1258,8 +1259,8 @@ notify_presence_cb (gpointer folks_object,
 
   gtk_image_set_from_icon_name (GTK_IMAGE (state_image),
       empathy_icon_name_for_presence (
-          folks_presence_owner_get_presence_type (
-              FOLKS_PRESENCE_OWNER (folks_object))),
+          folks_presence_details_get_presence_type (
+              FOLKS_PRESENCE_DETAILS (folks_object))),
       GTK_ICON_SIZE_BUTTON);
   gtk_widget_show (state_image);
 }
index 6e9aa746f606b4adb6785a284be4904d53bd67f5..d0614fd951ecc25f95d0016c7889f0506582bfa6 100644 (file)
@@ -438,8 +438,8 @@ update_persona (EmpathyPersonaStore *self,
       gtk_tree_path_free (path);
 
       /* Get online state now. */
-      now_online = folks_presence_owner_is_online (
-          FOLKS_PRESENCE_OWNER (persona));
+      now_online = folks_presence_details_is_online (
+          FOLKS_PRESENCE_DETAILS (persona));
 
       /* Get online state before. */
       gtk_tree_model_get (GTK_TREE_MODEL (self), &iter,
@@ -485,11 +485,11 @@ update_persona (EmpathyPersonaStore *self,
           EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
               folks_persona_get_display_id (persona),
           EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
-              folks_presence_owner_get_presence_type (
-                  FOLKS_PRESENCE_OWNER (persona)),
+              folks_presence_details_get_presence_type (
+                  FOLKS_PRESENCE_DETAILS (persona)),
           EMPATHY_PERSONA_STORE_COL_STATUS,
-              folks_presence_owner_get_presence_message (
-                  FOLKS_PRESENCE_OWNER (persona)),
+              folks_presence_details_get_presence_message (
+                  FOLKS_PRESENCE_DETAILS (persona)),
           EMPATHY_PERSONA_STORE_COL_IS_ONLINE, now_online,
           EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL,
               empathy_contact_get_capabilities (contact) &
@@ -629,9 +629,10 @@ state_sort_func (GtkTreeModel *model,
    * the presences.
    */
   ret_val = -tp_connection_presence_type_cmp_availability (
-      folks_presence_owner_get_presence_type (FOLKS_PRESENCE_OWNER (persona_a)),
-      folks_presence_owner_get_presence_type (
-          FOLKS_PRESENCE_OWNER (persona_b)));
+      folks_presence_details_get_presence_type (
+          FOLKS_PRESENCE_DETAILS (persona_a)),
+      folks_presence_details_get_presence_type (
+          FOLKS_PRESENCE_DETAILS (persona_b)));
 
   if (ret_val == 0) {
     /* Fallback: compare by name et al. */
index 1fa4adf0a9ac177a86090933b2f3217582ff44b6..eb5578e4c9ce9b67203c3da177f582214ebccfe8 100644 (file)
@@ -231,8 +231,8 @@ empathy_icon_name_for_individual (FolksIndividual *individual)
        TpConnectionPresenceType presence;
 
        folks_presence =
-           folks_presence_owner_get_presence_type (
-               FOLKS_PRESENCE_OWNER (individual));
+           folks_presence_details_get_presence_type (
+               FOLKS_PRESENCE_DETAILS (individual));
        presence = empathy_folks_presence_type_to_tp (folks_presence);
 
        return empathy_icon_name_for_presence (presence);
index ad462b203ca48aba5ed67b6c9f388c097b94bb36..bf0da384c0d06780387308c235c7bf6b52237f0c 100644 (file)
@@ -510,8 +510,8 @@ empathy_contact_set_presence_message (EmpathyContact *contact,
 
   if (priv->persona != NULL)
     {
-      folks_presence_owner_set_presence_message (
-          FOLKS_PRESENCE_OWNER (priv->persona), message);
+      folks_presence_details_set_presence_message (
+          FOLKS_PRESENCE_DETAILS (priv->persona), message);
     }
 }
 
@@ -992,8 +992,8 @@ empathy_contact_get_presence_message (EmpathyContact *contact)
   priv = GET_PRIV (contact);
 
   if (priv->persona != NULL)
-    return folks_presence_owner_get_presence_message (
-        FOLKS_PRESENCE_OWNER (priv->persona));
+    return folks_presence_details_get_presence_message (
+        FOLKS_PRESENCE_DETAILS (priv->persona));
 
   if (priv->tp_contact != NULL)
     return tp_contact_get_presence_message (priv->tp_contact);
@@ -1801,16 +1801,16 @@ static int
 presence_cmp_func (EmpathyContact *a,
     EmpathyContact *b)
 {
-  FolksPresenceOwner *presence_a, *presence_b;
+  FolksPresenceDetails *presence_a, *presence_b;
 
-  presence_a = FOLKS_PRESENCE_OWNER (empathy_contact_get_persona (a));
-  presence_b = FOLKS_PRESENCE_OWNER (empathy_contact_get_persona (b));
+  presence_a = FOLKS_PRESENCE_DETAILS (empathy_contact_get_persona (a));
+  presence_b = FOLKS_PRESENCE_DETAILS (empathy_contact_get_persona (b));
 
   /* We negate the result because we're sorting in reverse order (i.e. such that
    * the Personas with the highest presence are at the beginning of the list. */
-  return -folks_presence_owner_typecmp (
-      folks_presence_owner_get_presence_type (presence_a),
-      folks_presence_owner_get_presence_type (presence_b));
+  return -folks_presence_details_typecmp (
+      folks_presence_details_get_presence_type (presence_a),
+      folks_presence_details_get_presence_type (presence_b));
 }
 
 static gint