pidgin.mxit: ac8704d7: Since we now have a calculateAge() funct...

andrew.victor at mxit.com andrew.victor at mxit.com
Sun May 15 16:45:58 EDT 2011


----------------------------------------------------------------------
Revision: ac8704d7f8ed3eacd5014528374f1e9e7ca522bf
Parent:   6ce75aab2d77a0e2a880e02434ed6b41eb2f9885
Author:   andrew.victor at mxit.com
Date:     05/15/11 16:37:43
Branch:   im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/ac8704d7f8ed3eacd5014528374f1e9e7ca522bf

Changelog: 

Since we now have a calculateAge() function we might aswell also show the buddy's age when viewing their profile information.


Changes against parent 6ce75aab2d77a0e2a880e02434ed6b41eb2f9885

  patched  libpurple/protocols/mxit/profile.c

-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/profile.c	f296fc8694bf5c154d6b9375d3b9d1a07e13051b
+++ libpurple/protocols/mxit/profile.c	e50baa64e5320fa3621fdde92ef911de0695de00
@@ -166,6 +166,7 @@ void mxit_show_profile( struct MXitSessi
 	PurpleNotifyUserInfo*	info		= purple_notify_user_info_new();
 	struct contact*			contact		= NULL;
 	PurpleBuddy*			buddy;
+	gchar*					tmp			= NULL;
 
 	buddy = purple_find_buddy( session->acc, username );
 	if ( buddy ) {
@@ -175,7 +176,11 @@ void mxit_show_profile( struct MXitSessi
 	}
 
 	purple_notify_user_info_add_pair( info, _( "Display Name" ), profile->nickname );
-	purple_notify_user_info_add_pair( info, _( "Birthday" ), profile->birthday );
+
+	tmp = g_strdup_printf("%s (%i)", profile->birthday, calculateAge( profile->birthday ) );
+	purple_notify_user_info_add_pair( info, _( "Birthday" ), tmp );
+	g_free( tmp );
+
 	purple_notify_user_info_add_pair( info, _( "Gender" ), profile->male ? _( "Male" ) : _( "Female" ) );
 
 	/* optional information */


More information about the Commits mailing list