aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-17 22:49:59 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-18 15:29:33 +0800
commit4c7bf004cedea3f3faca74ca9308ba826c3ecaab (patch)
tree79f05e9c59e68a87ae0938301ba64ce2b7bb1825 /src/empathy-chat-window.c
parent682b70335bf789a60508f1d0b1b1ab119fc3f4dc (diff)
downloadgsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.tar
gsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.tar.gz
gsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.tar.bz2
gsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.tar.lz
gsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.tar.xz
gsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.tar.zst
gsoc2013-empathy-4c7bf004cedea3f3faca74ca9308ba826c3ecaab.zip
empathy_chat_window_present_chat: use tp_user_action_time_should_present
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r--src/empathy-chat-window.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index c4b84fc1a..e7e5f858e 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -2355,15 +2355,12 @@ empathy_chat_window_present_chat (EmpathyChat *chat,
/* Don't force the window to show itself when it wasn't
* an action by the user
*/
- if (timestamp == TP_USER_ACTION_TIME_NOT_USER_ACTION)
+ if (!tp_user_action_time_should_present (timestamp, &x_timestamp))
return;
priv = GET_PRIV (window);
- if (timestamp == TP_USER_ACTION_TIME_CURRENT_TIME) {
- x_timestamp = GDK_CURRENT_TIME;
- } else {
- x_timestamp = CLAMP (timestamp, 0, G_MAXUINT32);
+ if (x_timestamp != GDK_CURRENT_TIME) {
/* Don't present or switch tab if the action was earlier than the
* last actions X time, accounting for overflow and the first ever
* presentation */