# HG changeset patch # User andrew.victor@mxit.com # Date 1305491863 0 # Node ID 5643110e51dbff13f30b3e2490c7cd05066151b5 # Parent 055a33b6bf5959cb91c6b2340f84145ff8b4f1fe Since we now have a calculateAge() function we might aswell also show the buddy's age when viewing their profile information. diff -r 055a33b6bf59 -r 5643110e51db libpurple/protocols/mxit/profile.c --- a/libpurple/protocols/mxit/profile.c Sun May 15 20:27:51 2011 +0000 +++ b/libpurple/protocols/mxit/profile.c Sun May 15 20:37:43 2011 +0000 @@ -166,6 +166,7 @@ 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 @@ } 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 */