Mercurial > pidgin
changeset 31638:055a33b6bf59
Also show FirstName and LastName in search-results and friend-suggestions.
(These are not a new strings, since they already exist in the file).
author | andrew.victor@mxit.com |
---|---|
date | Sun, 15 May 2011 20:27:51 +0000 |
parents | 6ed15e063e58 |
children | 5643110e51db |
files | libpurple/protocols/mxit/profile.c libpurple/protocols/mxit/protocol.c |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/profile.c Sun May 15 20:07:27 2011 +0000 +++ b/libpurple/protocols/mxit/profile.c Sun May 15 20:27:51 2011 +0000 @@ -282,6 +282,10 @@ purple_notify_searchresults_column_add( results, column ); column = purple_notify_searchresults_column_new( _( "Display Name" ) ); purple_notify_searchresults_column_add( results, column ); + column = purple_notify_searchresults_column_new( _( "First Name" ) ); + purple_notify_searchresults_column_add( results, column ); + column = purple_notify_searchresults_column_new( _( "Last Name" ) ); + purple_notify_searchresults_column_add( results, column ); column = purple_notify_searchresults_column_new( _( "Gender" ) ); purple_notify_searchresults_column_add( results, column ); column = purple_notify_searchresults_column_new( _( "Age" ) ); @@ -297,6 +301,8 @@ /* column values */ row = g_list_append( NULL, g_strdup_printf( "#%s", tmp ) ); row = g_list_append( row, g_strdup( profile->nickname ) ); + row = g_list_append( row, g_strdup( profile->firstname ) ); + row = g_list_append( row, g_strdup( profile->lastname ) ); row = g_list_append( row, g_strdup( profile->male ? "Male" : "Female" ) ); row = g_list_append( row, g_strdup_printf( "%i", calculateAge( profile->birthday ) ) ); row = g_list_append( row, g_strdup( profile->whereami ) );
--- a/libpurple/protocols/mxit/protocol.c Sun May 15 20:07:27 2011 +0000 +++ b/libpurple/protocols/mxit/protocol.c Sun May 15 20:27:51 2011 +0000 @@ -1986,6 +1986,14 @@ /* birthdate */ g_strlcpy( profile->birthday, fvalue, sizeof( profile->birthday ) ); } + else if ( strcmp( CP_PROFILE_FIRSTNAME, fname ) == 0 ) { + /* first name */ + g_strlcpy( profile->firstname, fvalue, sizeof( profile->firstname ) ); + } + else if ( strcmp( CP_PROFILE_LASTNAME, fname ) == 0 ) { + /* last name */ + g_strlcpy( profile->lastname, fvalue, sizeof( profile->lastname ) ); + } else if ( strcmp( CP_PROFILE_GENDER, fname ) == 0 ) { /* gender */ profile->male = ( fvalue[0] == '1' );