]> git.0d.be Git - empathy.git/commitdiff
Use a macro for magic numbers
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 27 Apr 2011 09:44:36 +0000 (10:44 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 9 Jun 2011 11:34:56 +0000 (12:34 +0100)
libempathy-gtk/empathy-log-window.c

index b19d6aaefbca278849d5c0621013e2df64276f1d..b1962cb0f19647a612fc97cec42dde34969ff585 100644 (file)
@@ -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;