pidgin: 8b743886: Gadu-Gadu: Show local time for incoming ...

tomkiewicz at cpw.pidgin.im tomkiewicz at cpw.pidgin.im
Sat Oct 8 17:25:57 EDT 2011


----------------------------------------------------------------------
Revision: 8b743886b15889fc6c62a9bff8bd9c208554a3be
Parent:   73f591e97560c4778ea09b501e78a64dc0fd57d4
Author:   tomkiewicz at cpw.pidgin.im
Date:     10/08/11 17:23:26
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8b743886b15889fc6c62a9bff8bd9c208554a3be

Changelog: 

Gadu-Gadu: Show local time for incoming messages. Fixes #4579

Changes against parent 73f591e97560c4778ea09b501e78a64dc0fd57d4

  patched  ChangeLog
  patched  libpurple/protocols/gg/gg.c

-------------- next part --------------
============================================================
--- ChangeLog	3742b9648641608bd4a1b421ecee4652711a050d
+++ ChangeLog	4386ab53b18805e7b5c2e4f16dd552d3cff1bbe1
@@ -9,6 +9,7 @@ version 3.0.0 (??/??/????):
 	Gadu-Gadu:
 	* Possibility to require encryption. Also, using encryption when
 	  available is default option now. (Tomasz Wasilczyk)
+	* Show local time for incoming messages. (Tomasz Wasilczyk) (#4579)
 
 	MXit:
 	* Remove all reference to Hidden Number.
============================================================
--- libpurple/protocols/gg/gg.c	9e9b48a1587d5c7929ea0aa23f14bf4a6f75073d
+++ libpurple/protocols/gg/gg.c	01a176bf7aac37ed37cb2be71cbbbc411d8b03b0
@@ -1444,6 +1444,7 @@ static void ggp_recv_message_handler(Pur
 	gchar *from;
 	gchar *msg;
 	gchar *tmp;
+	time_t mtime;
 
 	if (ev->event.msg.message == NULL)
 	{
@@ -1572,8 +1573,13 @@ static void ggp_recv_message_handler(Pur
 			from, msg, ev->event.msg.msgclass,
 			ev->event.msg.recipients_count);
 
+	if (ev->event.msg.msgclass & GG_CLASS_QUEUED)
+		mtime = ev->event.msg.time;
+	else
+		mtime = time(NULL);
+
 	if (ev->event.msg.recipients_count == 0) {
-		serv_got_im(gc, from, msg, 0, ev->event.msg.time);
+		serv_got_im(gc, from, msg, 0, mtime);
 	} else {
 		const char *chat_name;
 		int chat_id;
@@ -1599,7 +1605,7 @@ static void ggp_recv_message_handler(Pur
 
 		buddy_name = ggp_buddy_get_name(gc, ev->event.msg.sender);
 		serv_got_chat_in(gc, chat_id, buddy_name,
-				 PURPLE_MESSAGE_RECV, msg, ev->event.msg.time);
+				 PURPLE_MESSAGE_RECV, msg, mtime);
 		g_free(buddy_name);
 	}
 	g_free(msg);


More information about the Commits mailing list