]> git.0d.be Git - empathy.git/commitdiff
TplLogEntry(Text) has been renamed to TplEntry(Text)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 10 Jun 2010 08:13:09 +0000 (10:13 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 18 Jun 2010 15:18:03 +0000 (17:18 +0200)
libempathy-gtk/empathy-chat.c
libempathy-gtk/empathy-log-window.c
libempathy/empathy-message.c
libempathy/empathy-message.h

index 43fabfb7d71017bbf73283a29b160fbbf93ebe84..ffb2c512661ac01ba4a8b82a21803fdfc4aea218 100644 (file)
@@ -1932,7 +1932,7 @@ chat_input_populate_popup_cb (GtkTextView *view,
 
 #ifdef ENABLE_TPL
 static gboolean
-chat_log_filter (TplLogEntry *log,
+chat_log_filter (TplEntry *log,
                 gpointer user_data)
 #else
 static gboolean
@@ -1948,7 +1948,7 @@ chat_log_filter (EmpathyMessage *message,
        const GList *pending;
 
 #ifdef ENABLE_TPL
-       g_return_val_if_fail (TPL_IS_LOG_ENTRY (log), FALSE);
+       g_return_val_if_fail (TPL_IS_ENTRY (log), FALSE);
 #else
        g_return_val_if_fail (EMPATHY_IS_MESSAGE (message), FALSE);
 #endif /* ENABLE_TPL */
@@ -2016,7 +2016,7 @@ got_filtered_messages_cb (GObject *manager,
 
        for (l = messages; l; l = g_list_next (l)) {
                EmpathyMessage *message;
-               g_assert (TPL_IS_LOG_ENTRY (l->data));
+               g_assert (TPL_IS_ENTRY (l->data));
 
                message = empathy_message_from_tpl_log_entry (l->data);
                g_object_unref (l->data);
index 625ae8c1a39c967e4cc8177b6d62b868e1d67067..6315a3ea45f19f00515c3b893d88f5acd59d9ccc 100644 (file)
@@ -384,7 +384,7 @@ got_messages_for_date_cb (GObject *manager,
        for (l = messages; l; l = l->next) {
                        EmpathyMessage *message;
 
-                       g_assert (TPL_IS_LOG_ENTRY (l->data));
+                       g_assert (TPL_IS_ENTRY (l->data));
 
                        message = empathy_message_from_tpl_log_entry (l->data);
                        g_object_unref (l->data);
index b3234d3480054b43a54191aa8df22560fb02940f..11a926a423fe0dde3453ccf0df88f2bee293b031 100644 (file)
@@ -32,8 +32,8 @@
 #include <telepathy-glib/account-manager.h>
 
 #include <telepathy-logger/contact.h>
-#include <telepathy-logger/log-entry.h>
-#include <telepathy-logger/log-entry-text.h>
+#include <telepathy-logger/entry.h>
+#include <telepathy-logger/entry-text.h>
 #endif /* ENABLE_TPL */
 
 #include "empathy-message.h"
@@ -262,7 +262,7 @@ empathy_message_new (const gchar *body)
 
 #ifdef ENABLE_TPL
 EmpathyMessage *
-empathy_message_from_tpl_log_entry (TplLogEntry *logentry)
+empathy_message_from_tpl_log_entry (TplEntry *logentry)
 {
        EmpathyMessage *retval = NULL;
        TpAccountManager *acc_man = NULL;
@@ -271,7 +271,7 @@ empathy_message_from_tpl_log_entry (TplLogEntry *logentry)
        TplContact *sender = NULL;
        gchar *body= NULL;
 
-       g_return_val_if_fail (TPL_IS_LOG_ENTRY (logentry), NULL);
+       g_return_val_if_fail (TPL_IS_ENTRY (logentry), NULL);
 
        acc_man = tp_account_manager_dup ();
        /* FIXME Currently Empathy shows in the log viewer only valid accounts, so it
@@ -286,24 +286,24 @@ empathy_message_from_tpl_log_entry (TplLogEntry *logentry)
         * needed anymore any TpAccount passing and the following call will be
         * useless */
        account = tp_account_manager_ensure_account (acc_man,
-                       tpl_log_entry_get_account_path (logentry));
+                       tpl_entry_get_account_path (logentry));
        g_object_unref (acc_man);
 
-       /* TODO Currently only TplLogEntryText exists as subclass of TplLogEntry, in
-        * future more TplLogEntry will exist and EmpathyMessage should probably
+       /* TODO Currently only TplLogEntryText exists as subclass of TplEntry, in
+        * future more TplEntry will exist and EmpathyMessage should probably
         * be enhanced to support other types of log entries (ie TplLogEntryCall).
         *
         * For now we just check (simply) that we are dealing with the only supported type,
         * then there will be a if/then/else or switch handling all the supported
         * cases.
         */
-       if (!TPL_IS_LOG_ENTRY_TEXT (logentry))
+       if (!TPL_IS_ENTRY_TEXT (logentry))
                return NULL;
 
-       body = g_strdup (tpl_log_entry_text_get_message (
-                               TPL_LOG_ENTRY_TEXT (logentry)));
-       receiver = tpl_log_entry_get_receiver (logentry);
-       sender = tpl_log_entry_get_sender (logentry);
+       body = g_strdup (tpl_entry_text_get_message (
+                               TPL_ENTRY_TEXT (logentry)));
+       receiver = tpl_entry_get_receiver (logentry);
+       sender = tpl_entry_get_sender (logentry);
 
        retval = empathy_message_new (body);
        if (receiver != NULL)
@@ -314,9 +314,9 @@ empathy_message_from_tpl_log_entry (TplLogEntry *logentry)
                                empathy_contact_from_tpl_contact (account, sender));
 
        empathy_message_set_timestamp (retval,
-                       tpl_log_entry_get_timestamp (logentry));
+                       tpl_entry_get_timestamp (logentry));
        empathy_message_set_id (retval,
-                       tpl_log_entry_get_pending_msg_id (logentry));
+                       tpl_entry_text_get_pending_msg_id (TPL_ENTRY_TEXT (logentry)));
        empathy_message_set_is_backlog (retval, FALSE);
 
        g_free (body);
index d8d0c96039e718a990f885ad75bcc30b1cf50700..d7f29f7485ba6399b00278d61c8ed1b7e33c78bf 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <glib-object.h>
 #ifdef ENABLE_TPL
-#include <telepathy-logger/log-entry.h>
+#include <telepathy-logger/entry.h>
 #endif
 
 #include "empathy-contact.h"
@@ -57,7 +57,7 @@ struct _EmpathyMessageClass {
 GType                    empathy_message_get_type          (void) G_GNUC_CONST;
 EmpathyMessage *         empathy_message_new               (const gchar              *body);
 #ifdef ENABLE_TPL
-EmpathyMessage *         empathy_message_from_tpl_log_entry (TplLogEntry             *logentry);
+EmpathyMessage *         empathy_message_from_tpl_log_entry (TplEntry                *logentry);
 #endif /* ENABLE_TPL */
 TpChannelTextMessageType empathy_message_get_tptype        (EmpathyMessage           *message);
 void                     empathy_message_set_tptype        (EmpathyMessage           *message,