aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-04-27 17:44:36 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 19:34:56 +0800
commit002bed41aa3e792e5367f9f996cd496461207783 (patch)
tree53c1a3fd7c00f13612ea4b54b9d46a6572df248b
parentdbfd14c60f1748e7608067a082d7a54434317440 (diff)
downloadgsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.tar
gsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.tar.gz
gsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.tar.bz2
gsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.tar.lz
gsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.tar.xz
gsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.tar.zst
gsoc2013-empathy-002bed41aa3e792e5367f9f996cd496461207783.zip
Use a macro for magic numbers
-rw-r--r--libempathy-gtk/empathy-log-window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index b19d6aaef..b1962cb0f 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -173,6 +173,9 @@ enum
#define CALENDAR_ICON "stock_calendar"
+/* Seconds between two messages to be considered one conversation */
+#define MAX_GAP 30*60
+
typedef enum
{
EVENT_CALL_INCOMING = 1 << 0,
@@ -636,7 +639,7 @@ model_is_parent (GtkTreeModel *model,
COL_EVENTS_TS, &timestamp,
-1);
- if (ABS (tpl_event_get_timestamp (event) - timestamp) < 1800)
+ if (ABS (tpl_event_get_timestamp (event) - timestamp) < MAX_GAP)
{
/* The gap is smaller than 30 min */
model_parent = *iter;