[empathy/next] TplEntity has been replaced by TpEntityType



commit 4c1a950ddf46f61eeb0b9414657306c8c3ac99dd
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Feb 13 13:32:11 2014 +0100

    TplEntity has been replaced by TpEntityType

 libempathy-gtk/empathy-chat.c       |    2 +-
 libempathy-gtk/empathy-log-window.c |   32 ++++++++++++++++----------------
 libempathy/empathy-contact.c        |    4 ++--
 libempathy/empathy-message.c        |    2 +-
 4 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 6746d97..19e1dbc 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -3460,7 +3460,7 @@ chat_constructed (GObject *object)
        if (priv->handle_type == TP_ENTITY_TYPE_ROOM)
                target = tpl_entity_new_from_room_id (priv->id);
        else
-               target = tpl_entity_new (priv->id, TPL_ENTITY_CONTACT, NULL, NULL);
+               target = tpl_entity_new (priv->id, TP_ENTITY_TYPE_CONTACT, NULL, NULL);
 
        priv->log_walker = tpl_log_manager_walk_filtered_events (priv->log_manager, priv->account, target,
                                                                 TPL_EVENT_MASK_TEXT, chat_log_filter, chat);
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 8244d97..17e3731 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -836,16 +836,16 @@ is_same_confroom (TplEvent *e1,
   if (receiver1 == NULL || receiver2 == NULL)
     return FALSE;
 
-  if (tpl_entity_get_entity_type (sender1) == TPL_ENTITY_ROOM)
+  if (tpl_entity_get_entity_type (sender1) == TP_ENTITY_TYPE_ROOM)
     room1 = sender1;
-  else if (tpl_entity_get_entity_type (receiver1) == TPL_ENTITY_ROOM)
+  else if (tpl_entity_get_entity_type (receiver1) == TP_ENTITY_TYPE_ROOM)
     room1 = receiver1;
   else
     return FALSE;
 
-  if (tpl_entity_get_entity_type (sender2) == TPL_ENTITY_ROOM)
+  if (tpl_entity_get_entity_type (sender2) == TP_ENTITY_TYPE_ROOM)
     room2 = sender2;
-  else if (tpl_entity_get_entity_type (receiver2) == TPL_ENTITY_ROOM)
+  else if (tpl_entity_get_entity_type (receiver2) == TP_ENTITY_TYPE_ROOM)
     room2 = receiver2;
   else
     return FALSE;
@@ -1068,7 +1068,7 @@ event_get_target (TplEvent *event)
   TplEntity *sender = tpl_event_get_sender (event);
   TplEntity *receiver = tpl_event_get_receiver (event);
 
-  if (tpl_entity_get_entity_type (sender) == TPL_ENTITY_SELF)
+  if (tpl_entity_get_entity_type (sender) == TP_ENTITY_TYPE_SELF)
     return receiver;
 
   return sender;
@@ -1138,17 +1138,17 @@ get_display_string_for_chat_message (EmpathyMessage *message,
   ent_receiver = tpl_event_get_receiver (event);
 
   /* If this is a MUC, we want to show "Chat in <room>". */
-  if (tpl_entity_get_entity_type (ent_sender) == TPL_ENTITY_ROOM ||
+  if (tpl_entity_get_entity_type (ent_sender) == TP_ENTITY_TYPE_ROOM ||
       (ent_receiver != NULL &&
-      tpl_entity_get_entity_type (ent_receiver) == TPL_ENTITY_ROOM))
+      tpl_entity_get_entity_type (ent_receiver) == TP_ENTITY_TYPE_ROOM))
     format = _("Chat in %s");
   else
     format = _("Chat with %s");
 
-  if (tpl_entity_get_entity_type (ent_sender) == TPL_ENTITY_ROOM)
+  if (tpl_entity_get_entity_type (ent_sender) == TP_ENTITY_TYPE_ROOM)
     target = sender;
   else if (ent_receiver != NULL &&
-      tpl_entity_get_entity_type (ent_receiver) == TPL_ENTITY_ROOM)
+      tpl_entity_get_entity_type (ent_receiver) == TP_ENTITY_TYPE_ROOM)
     target = receiver;
   else if (empathy_contact_is_user (sender))
     target = receiver;
@@ -1237,9 +1237,9 @@ get_icon_for_event (TplEvent *event)
 
       if (reason == TP_CALL_STATE_CHANGE_REASON_NO_ANSWER)
         icon = EMPATHY_IMAGE_CALL_MISSED;
-      else if (tpl_entity_get_entity_type (sender) == TPL_ENTITY_SELF)
+      else if (tpl_entity_get_entity_type (sender) == TP_ENTITY_TYPE_SELF)
         icon = EMPATHY_IMAGE_CALL_OUTGOING;
-      else if (tpl_entity_get_entity_type (receiver) == TPL_ENTITY_SELF)
+      else if (tpl_entity_get_entity_type (receiver) == TP_ENTITY_TYPE_SELF)
         icon = EMPATHY_IMAGE_CALL_INCOMING;
     }
 
@@ -1846,11 +1846,11 @@ add_event_to_store (EmpathyLogWindow *self,
     TplEntity *entity)
 {
   GtkListStore *store;
-  TplEntityType type = tpl_entity_get_entity_type (entity);
+  TpEntityType type = tpl_entity_get_entity_type (entity);
   EmpathyContact *contact;
   const gchar *name;
   gchar *sort_key;
-  gboolean room = type == TPL_ENTITY_ROOM;
+  gboolean room = type == TP_ENTITY_TYPE_ROOM;
 
   store = GTK_LIST_STORE (gtk_tree_view_get_model (
         GTK_TREE_VIEW (log_window->priv->treeview_who)));
@@ -2785,7 +2785,7 @@ log_window_chats_set_selected (EmpathyLogWindow *self)
 
       this_chat_id = tpl_entity_get_identifier (this_target);
       this_is_chatroom = tpl_entity_get_entity_type (this_target)
-          == TPL_ENTITY_ROOM;
+          == TP_ENTITY_TYPE_ROOM;
 
       if (this_account == self->priv->selected_account &&
           !tp_strdiff (this_chat_id, self->priv->selected_chat_id) &&
@@ -3239,12 +3239,12 @@ log_window_got_messages_for_date_cb (GObject *manager,
                     append = TRUE;
                 }
               else if (ctx->subtype & EVENT_CALL_OUTGOING
-                  && tpl_entity_get_entity_type (sender) == TPL_ENTITY_SELF)
+                  && tpl_entity_get_entity_type (sender) == TP_ENTITY_TYPE_SELF)
                 {
                   append = TRUE;
                 }
               else if (ctx->subtype & EVENT_CALL_INCOMING
-                  && tpl_entity_get_entity_type (receiver) == TPL_ENTITY_SELF)
+                  && tpl_entity_get_entity_type (receiver) == TP_ENTITY_TYPE_SELF)
                 {
                   append = TRUE;
                 }
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index b6a7245..86d3dfe 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -744,7 +744,7 @@ empathy_contact_from_tpl_contact (TpAccount *account,
       TpConnection *conn;
       const gchar *id;
 
-      is_user = (TPL_ENTITY_SELF == tpl_entity_get_entity_type (tpl_entity));
+      is_user = (TP_ENTITY_TYPE_SELF == tpl_entity_get_entity_type (tpl_entity));
 
       id = tpl_entity_get_identifier (tpl_entity);
 
@@ -1276,7 +1276,7 @@ contact_has_log (EmpathyContact *contact)
 
   manager = tpl_log_manager_dup_singleton ();
   entity = tpl_entity_new (empathy_contact_get_id (contact),
-      TPL_ENTITY_CONTACT, NULL, NULL);
+      TP_ENTITY_TYPE_CONTACT, NULL, NULL);
 
   have_log = tpl_log_manager_exists (manager,
       empathy_contact_get_account (contact), entity, TPL_EVENT_MASK_TEXT);
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index 368ea5b..c9ef6b1 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -384,7 +384,7 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
                if (tpl_call_event_get_end_reason (call) == TP_CALL_STATE_CHANGE_REASON_NO_ANSWER)
                        body = g_strdup_printf (_("Missed call from %s"),
                                tpl_entity_get_alias (tpl_event_get_sender (logevent)));
-               else if (tpl_entity_get_entity_type (tpl_event_get_sender (logevent)) == TPL_ENTITY_SELF)
+               else if (tpl_entity_get_entity_type (tpl_event_get_sender (logevent)) == TP_ENTITY_TYPE_SELF)
                        /* Translators: this is an outgoing call, e.g. 'Called Alice' */
                        body = g_strdup_printf (_("Called %s"),
                                tpl_entity_get_alias (tpl_event_get_receiver (logevent)));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]