[empathy: 42/80] Use a macro for magic numbers
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 42/80] Use a macro for magic numbers
- Date: Fri, 10 Jun 2011 08:42:41 +0000 (UTC)
commit 002bed41aa3e792e5367f9f996cd496461207783
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Wed Apr 27 10:44:36 2011 +0100
Use a macro for magic numbers
libempathy-gtk/empathy-log-window.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index b19d6aa..b1962cb 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, ×tamp,
-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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]