]> git.0d.be Git - empathy.git/commitdiff
define EMPATHY_DISPATCHER_CURRENT_TIME rather than using G_MAXINT64 directly
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 4 May 2010 11:55:19 +0000 (13:55 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 4 May 2010 11:58:16 +0000 (13:58 +0200)
libempathy/empathy-dispatcher.h
src/empathy-chat-window.c
src/empathy-event-manager.c

index 3173072c6733936c7ae3adeaf01020fb573133ac..d1dec072c186f09ee688755f2a8fe624d7bf06f5 100644 (file)
@@ -41,6 +41,7 @@ G_BEGIN_DECLS
 #define EMPATHY_DISPATCHER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_DISPATCHER, EmpathyDispatcherClass))
 
 #define EMPATHY_DISPATCHER_NON_USER_ACTION  (G_GINT64_CONSTANT (0))
+#define EMPATHY_DISPATCHER_CURRENT_TIME  G_MAXINT64
 
 typedef struct _EmpathyDispatcher      EmpathyDispatcher;
 typedef struct _EmpathyDispatcherClass EmpathyDispatcherClass;
index 44dee7ca48132ada3ef0c3922f8648dd4ce89f15..d47e942f55aa7027e3640144ad2144aca2d47667 100644 (file)
@@ -2309,7 +2309,7 @@ empathy_chat_window_present_chat (EmpathyChat *chat,
 
        priv = GET_PRIV (window);
 
-       if (timestamp == G_MAXINT64) {
+       if (timestamp == EMPATHY_DISPATCHER_CURRENT_TIME) {
                x_timestamp = GDK_CURRENT_TIME;
        } else {
                x_timestamp = CLAMP (timestamp, 0, G_MAXUINT32);
index a7da44f5e4cad37daa215f29f469933f326c20cf..841883d0604d8c865e7a1baf45d26bb69d95725b 100644 (file)
@@ -230,7 +230,7 @@ event_channel_process_func (EventPriv *event)
 {
   gint64 timestamp = gtk_get_current_event_time ();
   if (timestamp == GDK_CURRENT_TIME)
-    timestamp = G_MAXINT64;
+    timestamp = EMPATHY_DISPATCHER_CURRENT_TIME;
 
   empathy_dispatch_operation_set_user_action_time (event->approval->operation,
     timestamp);
@@ -243,7 +243,7 @@ event_text_channel_process_func (EventPriv *event)
   EmpathyTpChat *tp_chat;
   gint64 timestamp = gtk_get_current_event_time ();
   if (timestamp == GDK_CURRENT_TIME)
-    timestamp = G_MAXINT64;
+    timestamp = EMPATHY_DISPATCHER_CURRENT_TIME;
 
   empathy_dispatch_operation_set_user_action_time (event->approval->operation,
     timestamp);
@@ -571,7 +571,7 @@ invite_dialog_response_cb (GtkDialog *dialog,
 
   timestamp = gtk_get_current_event_time ();
   if (timestamp == GDK_CURRENT_TIME)
-    timestamp = G_MAXINT64;
+    timestamp = EMPATHY_DISPATCHER_CURRENT_TIME;
 
   empathy_dispatch_operation_set_user_action_time (approval->operation,
     timestamp);