diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2012-04-03 15:04:53 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2012-04-03 15:04:53 +0800 |
commit | 4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8 (patch) | |
tree | 1d486bb255557fbd2b445eb3eb1d73cb391de2ee /libempathy-gtk | |
parent | f11ad07acca7b180723aa70c8ffa00aba5b361c1 (diff) | |
parent | be2a0aa278149a082511bb3f4814f5850c970ce4 (diff) | |
download | gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.tar gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.tar.gz gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.tar.bz2 gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.tar.lz gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.tar.xz gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.tar.zst gsoc2013-empathy-4b95ad17bf3d3e4e0bf78ecdb10435e64bd416b8.zip |
Merge branch 'gnome-3-4'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index 72d4d464d..108765370 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -35,9 +35,7 @@ #include <telepathy-glib/proxy-subclass.h> #include <telepathy-logger/telepathy-logger.h> -#ifdef HAVE_CALL_LOGS -# include <telepathy-logger/call-event.h> -#endif +#include <telepathy-logger/call-event.h> #include <extensions/extensions.h> @@ -1232,22 +1230,20 @@ get_icon_for_event (TplEvent *event) if (!tp_str_empty (tpl_text_event_get_supersedes_token (text))) icon = EMPATHY_IMAGE_EDIT_MESSAGE; } -#ifdef HAVE_CALL_LOGS else if (TPL_IS_CALL_EVENT (event)) { TplCallEvent *call = TPL_CALL_EVENT (event); - TplCallEndReason reason = tpl_call_event_get_end_reason (call); + TpCallStateChangeReason reason = tpl_call_event_get_end_reason (call); TplEntity *sender = tpl_event_get_sender (event); TplEntity *receiver = tpl_event_get_receiver (event); - if (reason == TPL_CALL_END_REASON_NO_ANSWER) + 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) icon = EMPATHY_IMAGE_CALL_OUTGOING; else if (tpl_entity_get_entity_type (receiver) == TPL_ENTITY_SELF) icon = EMPATHY_IMAGE_CALL_INCOMING; } -#endif return icon; } @@ -1313,7 +1309,6 @@ log_window_append_chat_message (TplEvent *event, g_date_time_unref (date); } -#ifdef HAVE_CALL_LOGS static void log_window_append_call (TplEvent *event, EmpathyMessage *message) @@ -1357,7 +1352,7 @@ log_window_append_call (TplEvent *event, COL_EVENTS_EVENT, event, -1); - if (tpl_call_event_get_end_reason (call) != TPL_CALL_END_REASON_NO_ANSWER) + if (tpl_call_event_get_end_reason (call) != TP_CALL_STATE_CHANGE_REASON_NO_ANSWER) { gchar *body; gchar *tmp; @@ -1404,7 +1399,6 @@ log_window_append_call (TplEvent *event, g_free (pretty_date); g_date_time_unref (started_date); } -#endif static void log_window_append_message (TplEvent *event, @@ -1412,10 +1406,8 @@ log_window_append_message (TplEvent *event, { if (TPL_IS_TEXT_EVENT (event)) log_window_append_chat_message (event, message); -#ifdef HAVE_CALL_LOGS else if (TPL_IS_CALL_EVENT (event)) log_window_append_call (event, message); -#endif else DEBUG ("Message type not handled"); } @@ -3034,23 +3026,21 @@ log_window_what_setup (EmpathyLogWindow *self) GtkTreeIter iter; GtkTreeStore *store; GtkCellRenderer *cell; + GtkTreeIter parent; guint i; + struct event events [] = { { TPL_EVENT_MASK_ANY, 0, NULL, _("Anything") }, { WHAT_TYPE_SEPARATOR, 0, NULL, "separator" }, { TPL_EVENT_MASK_TEXT, 0, "format-justify-fill", _("Text chats") }, -#ifdef HAVE_CALL_LOGS { TPL_EVENT_MASK_CALL, EVENT_CALL_ALL, EMPATHY_IMAGE_CALL, _("Calls") }, -#endif }; -#ifdef HAVE_CALL_LOGS + struct event call_events [] = { { TPL_EVENT_MASK_CALL, EVENT_CALL_INCOMING, EMPATHY_IMAGE_CALL_INCOMING, _("Incoming calls") }, { TPL_EVENT_MASK_CALL, EVENT_CALL_OUTGOING, EMPATHY_IMAGE_CALL_OUTGOING, _("Outgoing calls") }, { TPL_EVENT_MASK_CALL, EVENT_CALL_MISSED, EMPATHY_IMAGE_CALL_MISSED, _("Missed calls") } }; - GtkTreeIter parent; -#endif view = GTK_TREE_VIEW (self->priv->treeview_what); selection = gtk_tree_view_get_selection (view); @@ -3108,7 +3098,6 @@ log_window_what_setup (EmpathyLogWindow *self) -1); } -#ifdef HAVE_CALL_LOGS gtk_tree_model_iter_nth_child (model, &parent, NULL, 3); for (i = 0; i < G_N_ELEMENTS (call_events); i++) { @@ -3121,7 +3110,6 @@ log_window_what_setup (EmpathyLogWindow *self) COL_WHAT_ICON, call_events[i].icon, -1); } -#endif gtk_tree_view_expand_all (view); @@ -3228,7 +3216,6 @@ log_window_got_messages_for_date_cb (GObject *manager, TplEvent *event = l->data; gboolean append = TRUE; -#ifdef HAVE_CALL_LOGS if (TPL_IS_CALL_EVENT (l->data) && ctx->event_mask & TPL_EVENT_MASK_CALL && ctx->event_mask != TPL_EVENT_MASK_ANY) @@ -3243,11 +3230,12 @@ log_window_got_messages_for_date_cb (GObject *manager, } else { - TplCallEndReason reason = tpl_call_event_get_end_reason (call); + TpCallStateChangeReason reason = + tpl_call_event_get_end_reason (call); TplEntity *sender = tpl_event_get_sender (event); TplEntity *receiver = tpl_event_get_receiver (event); - if (reason == TPL_CALL_END_REASON_NO_ANSWER) + if (reason == TP_CALL_STATE_CHANGE_REASON_NO_ANSWER) { if (ctx->subtype & EVENT_CALL_MISSED) append = TRUE; @@ -3264,7 +3252,6 @@ log_window_got_messages_for_date_cb (GObject *manager, } } } -#endif if (append) { |