]> git.0d.be Git - empathy.git/commitdiff
Adjust for FolksHasPresence -> FolksPresenceOwner
authorTravis Reitter <travis.reitter@collabora.co.uk>
Thu, 23 Dec 2010 01:22:59 +0000 (17:22 -0800)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Tue, 1 Feb 2011 00:16:21 +0000 (16:16 -0800)
Fixes bgo#637847.

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 0add70ce3504aed3bb5cf813e62d03652c140e03..feec91a57503661940adde6db5ea533717b47faf 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)
     {
-      FolksHasPresence *presence;
+      FolksPresenceOwner *presence;
 
-      /* We only want personas which implement FolksHasPresence */
-      if (!FOLKS_IS_HAS_PRESENCE (l->data))
+      /* We only want personas which implement FolksPresenceOwner */
+      if (!FOLKS_IS_PRESENCE_OWNER (l->data))
         continue;
 
-      presence = FOLKS_HAS_PRESENCE (l->data);
+      presence = FOLKS_PRESENCE_OWNER (l->data);
 
-      if (folks_has_presence_typecmp (
-              folks_has_presence_get_presence_type (presence),
+      if (folks_presence_owner_typecmp (
+              folks_presence_owner_get_presence_type (presence),
               presence_type) > 0)
         {
           TpContact *tp_contact;
 
-          presence_type = folks_has_presence_get_presence_type (presence);
+          presence_type = folks_presence_owner_get_presence_type (presence);
 
           tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
           types = tp_contact_get_client_types (tp_contact);
@@ -706,7 +706,8 @@ individual_store_contact_update (EmpathyIndividualStore *self,
     }
 
   /* Get online state now. */
-  now_online = folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual));
+  now_online = folks_presence_owner_is_online (
+      FOLKS_PRESENCE_OWNER (individual));
 
   if (!in_list)
     {
@@ -796,11 +797,11 @@ individual_store_contact_update (EmpathyIndividualStore *self,
           EMPATHY_INDIVIDUAL_STORE_COL_NAME,
             folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)),
           EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE,
-            folks_has_presence_get_presence_type (
-                FOLKS_HAS_PRESENCE (individual)),
+            folks_presence_owner_get_presence_type (
+                FOLKS_PRESENCE_OWNER (individual)),
           EMPATHY_INDIVIDUAL_STORE_COL_STATUS,
-            folks_has_presence_get_presence_message (
-                FOLKS_HAS_PRESENCE (individual)),
+            folks_presence_owner_get_presence_message (
+                FOLKS_PRESENCE_OWNER (individual)),
           EMPATHY_INDIVIDUAL_STORE_COL_COMPACT, priv->is_compact,
           EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE,
           EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, now_online,
@@ -1467,9 +1468,11 @@ individual_store_state_sort_func (GtkTreeModel *model,
    * the presences.
    */
   folks_presence_type_a =
-      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual_a));
+      folks_presence_owner_get_presence_type (
+          FOLKS_PRESENCE_OWNER (individual_a));
   folks_presence_type_b =
-      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual_b));
+      folks_presence_owner_get_presence_type (
+          FOLKS_PRESENCE_OWNER (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 e1007ae65f6d9b9a049a15231ceec334831cd067..06b444ee4fcea0549055941a53d36a307e4812af 100644 (file)
@@ -682,7 +682,7 @@ individual_view_drag_motion (GtkWidget *widget,
         }
 
       if (individual != NULL &&
-          folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual)) &&
+          folks_presence_owner_is_online (FOLKS_PRESENCE_OWNER (individual)) &&
           (caps & EMPATHY_CAPABILITIES_FT))
         {
           gdk_drag_status (context, GDK_ACTION_COPY, time_);
index 44e7f95726349b85b48bc4b472d2bad7f0fa696d..2f7899b2bcd189db7511c62b989e7a0becdba575 100644 (file)
@@ -220,20 +220,20 @@ update_weak_contact (EmpathyIndividualWidget *self)
       personas = folks_individual_get_personas (priv->individual);
       for (l = personas; l != NULL; l = l->next)
         {
-          FolksHasPresence *presence;
+          FolksPresenceOwner *presence;
 
           /* We only want personas which implement FolksPresence */
-          if (!FOLKS_IS_HAS_PRESENCE (l->data))
+          if (!FOLKS_IS_PRESENCE_OWNER (l->data))
             continue;
 
-          presence = FOLKS_HAS_PRESENCE (l->data);
+          presence = FOLKS_PRESENCE_OWNER (l->data);
 
-          if (folks_has_presence_typecmp (
-                  folks_has_presence_get_presence_type (presence),
+          if (folks_presence_owner_typecmp (
+                  folks_presence_owner_get_presence_type (presence),
                   presence_type) > 0
               && TPF_IS_PERSONA (presence))
             {
-              presence_type = folks_has_presence_get_presence_type (presence);
+              presence_type = folks_presence_owner_get_presence_type (presence);
               tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
             }
         }
@@ -1248,13 +1248,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_has_presence_get_presence_message (
-      FOLKS_HAS_PRESENCE (folks_object));
+  message = folks_presence_owner_get_presence_message (
+      FOLKS_PRESENCE_OWNER (folks_object));
   if (EMP_STR_EMPTY (message))
     {
       message = empathy_presence_get_default_message (
-          folks_has_presence_get_presence_type (
-              FOLKS_HAS_PRESENCE (folks_object)));
+          folks_presence_owner_get_presence_type (
+              FOLKS_PRESENCE_OWNER (folks_object)));
     }
 
   if (message != NULL)
@@ -1264,8 +1264,8 @@ notify_presence_cb (gpointer folks_object,
 
   gtk_image_set_from_icon_name (GTK_IMAGE (state_image),
       empathy_icon_name_for_presence (
-          folks_has_presence_get_presence_type (
-              FOLKS_HAS_PRESENCE (folks_object))),
+          folks_presence_owner_get_presence_type (
+              FOLKS_PRESENCE_OWNER (folks_object))),
       GTK_ICON_SIZE_BUTTON);
   gtk_widget_show (state_image);
 }
index b77e34d4b76f7770360dd04e3bfdc18bc1d325ec..d89ae9eb3ecc7d777ef0fb9239c5d41fd07ffdea 100644 (file)
@@ -438,7 +438,8 @@ update_persona (EmpathyPersonaStore *self,
       gtk_tree_path_free (path);
 
       /* Get online state now. */
-      now_online = folks_has_presence_is_online (FOLKS_HAS_PRESENCE (persona));
+      now_online = folks_presence_owner_is_online (
+          FOLKS_PRESENCE_OWNER (persona));
 
       /* Get online state before. */
       gtk_tree_model_get (GTK_TREE_MODEL (self), &iter,
@@ -484,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_has_presence_get_presence_type (
-                  FOLKS_HAS_PRESENCE (persona)),
+              folks_presence_owner_get_presence_type (
+                  FOLKS_PRESENCE_OWNER (persona)),
           EMPATHY_PERSONA_STORE_COL_STATUS,
-              folks_has_presence_get_presence_message (
-                  FOLKS_HAS_PRESENCE (persona)),
+              folks_presence_owner_get_presence_message (
+                  FOLKS_PRESENCE_OWNER (persona)),
           EMPATHY_PERSONA_STORE_COL_IS_ONLINE, now_online,
           EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL,
               empathy_contact_get_capabilities (contact) &
@@ -628,8 +629,9 @@ state_sort_func (GtkTreeModel *model,
    * the presences.
    */
   ret_val = -tp_connection_presence_type_cmp_availability (
-      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (persona_a)),
-      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (persona_b)));
+      folks_presence_owner_get_presence_type (FOLKS_PRESENCE_OWNER (persona_a)),
+      folks_presence_owner_get_presence_type (
+          FOLKS_PRESENCE_OWNER (persona_b)));
 
   if (ret_val == 0) {
     /* Fallback: compare by name et al. */
index 79328fd69c87e0377b4e59786de4d73c46b98440..b53be03ec175df0977136c4331b17e902c7a20f1 100644 (file)
@@ -231,8 +231,8 @@ empathy_icon_name_for_individual (FolksIndividual *individual)
        TpConnectionPresenceType presence;
 
        folks_presence =
-           folks_has_presence_get_presence_type (
-               FOLKS_HAS_PRESENCE (individual));
+           folks_presence_owner_get_presence_type (
+               FOLKS_PRESENCE_OWNER (individual));
        presence = empathy_folks_presence_type_to_tp (folks_presence);
 
        return empathy_icon_name_for_presence (presence);
index 86bb9f5a87e3362bb6d78e56b5318a814c7470a4..76091e4555009fd4962821496fa8cc053b6220c0 100644 (file)
@@ -510,8 +510,8 @@ empathy_contact_set_presence_message (EmpathyContact *contact,
 
   if (priv->persona != NULL)
     {
-      folks_has_presence_set_presence_message (
-          FOLKS_HAS_PRESENCE (priv->persona), message);
+      folks_presence_owner_set_presence_message (
+          FOLKS_PRESENCE_OWNER (priv->persona), message);
     }
 }
 
@@ -992,8 +992,8 @@ empathy_contact_get_presence_message (EmpathyContact *contact)
 
   if (priv->persona != NULL)
     {
-      return folks_has_presence_get_presence_message (
-          FOLKS_HAS_PRESENCE (priv->persona));
+      return folks_presence_owner_get_presence_message (
+          FOLKS_PRESENCE_OWNER (priv->persona));
     }
 
   return NULL;
@@ -1794,16 +1794,16 @@ static int
 presence_cmp_func (EmpathyContact *a,
     EmpathyContact *b)
 {
-  FolksHasPresence *presence_a, *presence_b;
+  FolksPresenceOwner *presence_a, *presence_b;
 
-  presence_a = FOLKS_HAS_PRESENCE (empathy_contact_get_persona (a));
-  presence_b = FOLKS_HAS_PRESENCE (empathy_contact_get_persona (b));
+  presence_a = FOLKS_PRESENCE_OWNER (empathy_contact_get_persona (a));
+  presence_b = FOLKS_PRESENCE_OWNER (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_has_presence_typecmp (
-      folks_has_presence_get_presence_type (presence_a),
-      folks_has_presence_get_presence_type (presence_b));
+  return -folks_presence_owner_typecmp (
+      folks_presence_owner_get_presence_type (presence_a),
+      folks_presence_owner_get_presence_type (presence_b));
 }
 
 static gint