[empathy] empathy_chat_window_present_chat: use tp_user_action_time_should_present
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy_chat_window_present_chat: use tp_user_action_time_should_present
- Date: Wed, 18 Aug 2010 07:29:58 +0000 (UTC)
commit 4c7bf004cedea3f3faca74ca9308ba826c3ecaab
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Aug 17 16:49:59 2010 +0200
empathy_chat_window_present_chat: use tp_user_action_time_should_present
src/empathy-chat-window.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index c4b84fc..e7e5f85 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]