diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-27 19:44:35 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-18 23:18:02 +0800 |
commit | 210388d6821d72dacd55063ad805857a27c14e3f (patch) | |
tree | 5f63bbf1372ac884ca939bdd41e90faa12ca0645 | |
parent | b0eb7b2baf39cd5a509668bc53e5e34d70cb255d (diff) | |
download | gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.tar gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.tar.gz gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.tar.bz2 gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.tar.lz gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.tar.xz gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.tar.zst gsoc2013-empathy-210388d6821d72dacd55063ad805857a27c14e3f.zip |
port to latest tp-logger API
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 5 | ||||
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 30 | ||||
-rw-r--r-- | libempathy/empathy-message.c | 6 | ||||
-rw-r--r-- | src/empathy.c | 1 |
5 files changed, 18 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac index 18094002e..f0e784787 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ GLIB_REQUIRED=2.25.9 GTK_REQUIRED=2.21.2 GCONF_REQUIRED=1.2.0 TELEPATHY_GLIB_REQUIRED=0.11.7 -TELEPATHY_LOGGER=0.1.1 +TELEPATHY_LOGGER=0.1.2 ENCHANT_REQUIRED=1.2.0 ISO_CODES_REQUIRED=0.35 LIBNOTIFY_REQUIRED=0.4.4 diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index e68b91dbe..43fabfb7d 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -2005,9 +2005,8 @@ got_filtered_messages_cb (GObject *manager, EmpathyChatPriv *priv = GET_PRIV (chat); GError *error = NULL; - messages = tpl_log_manager_get_filtered_messages_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_get_filtered_messages_finish (TPL_LOG_MANAGER (manager), + result, &messages, &error)) { DEBUG ("%s. Aborting.", error->message); empathy_chat_view_append_event (chat->view, _("Failed to retrieve recent logs")); diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index ac889fc96..11d7ca43f 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -368,9 +368,8 @@ got_messages_for_date_cb (GObject *manager, gboolean can_do_next; GError *error = NULL; - messages = tpl_log_manager_get_messages_for_date_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_get_messages_for_date_finish (TPL_LOG_MANAGER (manager), + result, &messages, &error)) { DEBUG ("Unable to retrieve messages for the selected date: %s. Aborting", error->message); empathy_chat_view_append_event (window->chatview_find, @@ -523,9 +522,8 @@ log_manager_searched_new_cb (GObject *manager, GtkListStore *store = user_data; GError *error = NULL; - hits = tpl_log_manager_search_new_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_search_new_finish (TPL_LOG_MANAGER (manager), result, + &hits, &error)) { DEBUG ("%s. Aborting", error->message); g_error_free (error); return; @@ -848,9 +846,8 @@ log_manager_got_chats_cb (GObject *manager, GtkTreeIter iter; GError *error = NULL; - chats = tpl_log_manager_get_chats_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_get_chats_finish (TPL_LOG_MANAGER (manager), + result, &chats, &error)) { DEBUG ("%s. Aborting", error->message); g_error_free (error); return; @@ -1146,9 +1143,8 @@ log_window_got_messages_for_date_cb (GObject *manager, GList *l; GError *error = NULL; - messages = tpl_log_manager_get_messages_for_date_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_get_messages_for_date_finish (TPL_LOG_MANAGER (manager), + result, &messages, &error)) { DEBUG ("Unable to retrieve messages for the selected date: %s. Aborting", error->message); empathy_chat_view_append_event (window->chatview_find, @@ -1221,9 +1217,8 @@ log_manager_got_dates_cb (GObject *manager, const gchar *date = NULL; GError *error = NULL; - dates = tpl_log_manager_get_dates_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_get_dates_finish (TPL_LOG_MANAGER (manager), + result, &dates, &error)) { DEBUG ("Unable to retrieve messages' dates: %s. Aborting", error->message); empathy_chat_view_append_event (window->chatview_find, @@ -1523,9 +1518,8 @@ log_window_updating_calendar_month_cb (GObject *manager, guint month_selected; GError *error = NULL; - dates = tpl_log_manager_get_dates_async_finish (result, &error); - - if (error != NULL) { + if (!tpl_log_manager_get_dates_finish (TPL_LOG_MANAGER (manager), + result, &dates, &error)) { DEBUG ("Unable to retrieve messages' dates: %s. Aborting", error->message); empathy_chat_view_append_event (window->chatview_find, diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c index 85d5cbc58..b3234d348 100644 --- a/libempathy/empathy-message.c +++ b/libempathy/empathy-message.c @@ -302,8 +302,8 @@ empathy_message_from_tpl_log_entry (TplLogEntry *logentry) body = g_strdup (tpl_log_entry_text_get_message ( TPL_LOG_ENTRY_TEXT (logentry))); - receiver = tpl_log_entry_text_get_receiver (TPL_LOG_ENTRY_TEXT (logentry)); - sender = tpl_log_entry_text_get_sender (TPL_LOG_ENTRY_TEXT (logentry)); + receiver = tpl_log_entry_get_receiver (logentry); + sender = tpl_log_entry_get_sender (logentry); retval = empathy_message_new (body); if (receiver != NULL) @@ -316,7 +316,7 @@ empathy_message_from_tpl_log_entry (TplLogEntry *logentry) empathy_message_set_timestamp (retval, tpl_log_entry_get_timestamp (logentry)); empathy_message_set_id (retval, - tpl_log_entry_text_get_log_id (TPL_LOG_ENTRY_TEXT (logentry))); + tpl_log_entry_get_pending_msg_id (logentry)); empathy_message_set_is_backlog (retval, FALSE); g_free (body); diff --git a/src/empathy.c b/src/empathy.c index ac292fcff..552b8e171 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -46,7 +46,6 @@ #ifdef ENABLE_TPL #include <telepathy-logger/log-manager.h> -#include <telepathy-logger/log-store-empathy.h> #else #include <libempathy/empathy-log-manager.h> |