diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-04-27 05:38:00 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-06-09 19:34:55 +0800 |
commit | 7c9bdd521147ee2f11c3f88de8f1c17c83fc2508 (patch) | |
tree | 0abf4de44e43f510a4367a3219b004e035449c0e | |
parent | 0b1805580294ff8bafb80d61bf2dde4ab03a213d (diff) | |
download | gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.tar gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.tar.gz gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.tar.bz2 gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.tar.lz gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.tar.xz gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.tar.zst gsoc2013-empathy-7c9bdd521147ee2f11c3f88de8f1c17c83fc2508.zip |
LogWindow: check the 30min gap with the last message
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index b8319dd1f..e786f164d 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -582,7 +582,7 @@ model_is_parent (GtkTreeModel *model, TpAccount *account; gint64 timestamp; gboolean found = FALSE; - GtkTreeIter parent; + GtkTreeIter parent, child; gboolean is_toplevel; is_toplevel = !gtk_tree_model_iter_parent (model, &parent, iter); @@ -590,7 +590,6 @@ model_is_parent (GtkTreeModel *model, gtk_tree_model_get (model, iter, COL_EVENTS_ACCOUNT, &account, COL_EVENTS_TARGET, &target, - COL_EVENTS_TS, ×tamp, COL_EVENTS_EVENT, &stored_event, -1); @@ -599,6 +598,13 @@ model_is_parent (GtkTreeModel *model, account_equal (account, tpl_event_get_account (event)) && entity_equal (target, event_get_target (event))) { + gtk_tree_model_iter_nth_child (model, &child, iter, + gtk_tree_model_iter_n_children (model, iter) - 1); + + gtk_tree_model_get (model, &child, + COL_EVENTS_TS, ×tamp, + -1); + if (ABS (tpl_event_get_timestamp (event) - timestamp) < 1800) { /* The gap is smaller than 30 min */ |