aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2012-04-03 08:41:54 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2012-04-03 15:04:25 +0800
commitffd92c745b62faa628b17c8642f97ee596d933e1 (patch)
tree072a5436159ed7325d7e9307241aa2bfd7135335
parent86ba5be5fa9a044fbcce6618ac6cd6dd7bdf3482 (diff)
downloadgsoc2013-empathy-ffd92c745b62faa628b17c8642f97ee596d933e1.tar.gz
gsoc2013-empathy-ffd92c745b62faa628b17c8642f97ee596d933e1.tar.zst
gsoc2013-empathy-ffd92c745b62faa628b17c8642f97ee596d933e1.zip
Logger support for calls is no longer optional
-rw-r--r--configure.ac35
-rw-r--r--libempathy-gtk/empathy-log-window.c22
-rw-r--r--libempathy/empathy-message.c6
3 files changed, 5 insertions, 58 deletions
diff --git a/configure.ac b/configure.ac
index f92175a40..7376c59d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,40 +232,6 @@ fi
AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
# -----------------------------------------------------------
-# Call support in tp-logger
-# -----------------------------------------------------------
-AC_ARG_ENABLE(call-logs,
- AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
- [build with call logs support]),,
- [enable_call_logs=auto])
-if test "x$enable_call_logs" != "xno" ; then
- SAVE_CFLAGS=$CFLAGS
- SAVE_CPPFLAGS=$CPPFLAGS
- SAVE_LDFLAGS=$LDFLAGS
- CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
- CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
- LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
-
- AC_CHECK_HEADER(telepathy-logger/call-event.h,
- have_call_logs="yes", have_call_logs="no")
-
- CFLAGS=$SAVE_CFLAGS
- CPPFLAGS=$SAVE_CPPFLAGS
- LDFLAGS=$SAVE_LDFLAGS
-
- if test "x$have_call_logs" = "xyes"; then
- AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
- fi
-else
- have_call_logs=no
-fi
-
-if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
- AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
- built with --enable-call])
-fi
-
-# -----------------------------------------------------------
# evolution-data-server (about-me)
# -----------------------------------------------------------
AC_ARG_WITH(eds,
@@ -686,6 +652,5 @@ Configure summary:
Nautilus-sendto plugin......: ${have_nst}
GOA MC plugin...............: ${have_goa}
Salut E-D-S support.........: ${with_eds}
- Exp. Call log support.......: ${have_call_logs}
empathy-av (legacy).........: ${enable_empathy_av}
"
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index c11bb02c3..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,7 +1230,6 @@ 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);
@@ -1247,7 +1244,6 @@ get_icon_for_event (TplEvent *event)
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)
@@ -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)
@@ -3265,7 +3252,6 @@ log_window_got_messages_for_date_cb (GObject *manager,
}
}
}
-#endif
if (append)
{
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index a4caae122..777d4a672 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -35,9 +35,7 @@
#include <telepathy-logger/entity.h>
#include <telepathy-logger/event.h>
#include <telepathy-logger/text-event.h>
-#ifdef HAVE_CALL_LOGS
-# include <telepathy-logger/call-event.h>
-#endif
+#include <telepathy-logger/call-event.h>
#include "empathy-client-factory.h"
#include "empathy-message.h"
@@ -405,7 +403,6 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
type = tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent));
token = tpl_text_event_get_message_token (textevent);
}
-#ifdef HAVE_CALL_LOGS
else if (TPL_IS_CALL_EVENT (logevent)) {
TplCallEvent *call = TPL_CALL_EVENT (logevent);
@@ -422,7 +419,6 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
body = g_strdup_printf (_("Call from %s"),
tpl_entity_get_alias (tpl_event_get_sender (logevent)));
}
-#endif
else {
/* Unknown event type */
return NULL;