cpw.darkrain42.xmpp.iq-handlers: feeb9fc1: Actually display the buddy's local time.

paul at darkrain42.org paul at darkrain42.org
Sun Feb 8 03:15:40 EST 2009


-----------------------------------------------------------------
Revision: feeb9fc1d00e482ebf1a6c28889fe48d5ccfbfeb
Ancestor: b9232a820144c41172bccc9c6d3f6251566551ae
Author: paul at darkrain42.org
Date: 2009-02-08T08:12:19
Branch: im.pidgin.cpw.darkrain42.xmpp.iq-handlers
URL: http://d.pidgin.im/viewmtn/revision/info/feeb9fc1d00e482ebf1a6c28889fe48d5ccfbfeb

Modified files:
        libpurple/protocols/jabber/buddy.c

ChangeLog: 

Actually display the buddy's local time.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/buddy.c	813809d9a94b4babc792d52a1ee46dce8ef1b7c8
+++ libpurple/protocols/jabber/buddy.c	6ecb104068f8e220209ad9f0a6b476202c133b9a
@@ -809,7 +809,7 @@ static void jabber_buddy_info_show_if_re
 			now_t += jbr->tz_off;
 			now = gmtime(&now_t);
 
-			purple_notify_user_info_add_pair(user_info, _("Local Time"), purple_time_format(now));
+			purple_notify_user_info_prepend_pair(user_info, _("Local Time"), purple_time_format(now));
 		}
 		if(jbir) {
 			if(jbir->idle_seconds > 0) {
@@ -988,7 +988,7 @@ static void jabber_buddy_info_show_if_re
 				now_t += jbr->tz_off;
 				now = gmtime(&now_t);
 
-				purple_notify_user_info_add_pair(user_info, _("Local Time"), purple_time_format(now));
+				purple_notify_user_info_prepend_pair(user_info, _("Local Time"), purple_time_format(now));
 			}
 
 			if(jbr->name && (jbir = g_hash_table_lookup(jbi->resources, jbr->name))) {
@@ -1683,8 +1683,8 @@ static void jabber_time_parse(JabberStre
 	if (resource_name && jbr) {
 		if (type && !strcmp(type, "result")) {
 			xmlnode *time = xmlnode_get_child(packet, "time");
-			xmlnode *tzo = time ? xmlnode_get_child(packet, "tzo") : NULL;
-			xmlnode *utc = time ? xmlnode_get_child(packet, "utc") : NULL;
+			xmlnode *tzo = time ? xmlnode_get_child(time, "tzo") : NULL;
+			xmlnode *utc = time ? xmlnode_get_child(time, "utc") : NULL;
 			if (tzo && utc) {
 				char *timestamp = g_strdup_printf("%s %s",
 				        xmlnode_get_data(utc), xmlnode_get_data(tzo));


More information about the Commits mailing list