From 4c7bf004cedea3f3faca74ca9308ba826c3ecaab Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 17 Aug 2010 16:49:59 +0200 Subject: empathy_chat_window_present_chat: use tp_user_action_time_should_present --- src/empathy-chat-window.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3