114
114
/* update name */
115
115
g_strlcpy( profile->nickname, name, sizeof( profile->nickname ) );
116
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FULLNAME, CP_PROF_TYPE_UTF8, profile->nickname );
116
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FULLNAME, CP_PROFILE_TYPE_UTF8, profile->nickname );
117
117
g_string_append( attributes, attrib );
120
120
/* update hidden */
121
121
field = purple_request_fields_get_field( fields, "hidden" );
122
122
profile->hidden = purple_request_field_bool_get_value( field );
123
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_HIDENUMBER, CP_PROF_TYPE_BOOL, ( profile->hidden ) ? "1" : "0" );
123
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_HIDENUMBER, CP_PROFILE_TYPE_BOOL, ( profile->hidden ) ? "1" : "0" );
124
124
g_string_append( attributes, attrib );
127
127
/* update birthday */
128
strcpy( profile->birthday, bday );
129
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_BIRTHDATE, CP_PROF_TYPE_UTF8, profile->birthday );
128
g_strlcpy( profile->birthday, bday, sizeof( profile->birthday ) );
129
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_BIRTHDATE, CP_PROFILE_TYPE_UTF8, profile->birthday );
130
130
g_string_append( attributes, attrib );
133
133
/* update gender */
134
134
profile->male = ( purple_request_fields_get_choice( fields, "male" ) != 0 );
135
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_GENDER, CP_PROF_TYPE_BOOL, ( profile->male ) ? "1" : "0" );
135
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_GENDER, CP_PROFILE_TYPE_BOOL, ( profile->male ) ? "1" : "0" );
136
136
g_string_append( attributes, attrib );
142
142
profile->title[0] = '\0';
144
strcpy( profile->title, name );
145
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_TITLE, CP_PROF_TYPE_UTF8, profile->title );
144
g_strlcpy( profile->title, name, sizeof( profile->title ) );
145
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_TITLE, CP_PROFILE_TYPE_UTF8, profile->title );
146
146
g_string_append( attributes, attrib );
152
152
profile->firstname[0] = '\0';
154
strcpy( profile->firstname, name );
155
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FIRSTNAME, CP_PROF_TYPE_UTF8, profile->firstname );
154
g_strlcpy( profile->firstname, name, sizeof( profile->firstname ) );
155
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FIRSTNAME, CP_PROFILE_TYPE_UTF8, profile->firstname );
156
156
g_string_append( attributes, attrib );
162
162
profile->lastname[0] = '\0';
164
strcpy( profile->lastname, name );
165
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_LASTNAME, CP_PROF_TYPE_UTF8, profile->lastname );
164
g_strlcpy( profile->lastname, name, sizeof( profile->lastname ) );
165
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_LASTNAME, CP_PROFILE_TYPE_UTF8, profile->lastname );
166
166
g_string_append( attributes, attrib );
172
172
profile->email[0] = '\0';
174
strcpy( profile->email, name );
175
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_EMAIL, CP_PROF_TYPE_UTF8, profile->email );
174
g_strlcpy( profile->email, name, sizeof( profile->email ) );
175
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_EMAIL, CP_PROFILE_TYPE_UTF8, profile->email );
176
176
g_string_append( attributes, attrib );
182
182
profile->mobilenr[0] = '\0';
184
strcpy( profile->mobilenr, name );
185
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_MOBILENR, CP_PROF_TYPE_UTF8, profile->mobilenr );
184
g_strlcpy( profile->mobilenr, name, sizeof( profile->mobilenr ) );
185
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_MOBILENR, CP_PROFILE_TYPE_UTF8, profile->mobilenr );
186
186
g_string_append( attributes, attrib );
225
225
group = purple_request_field_group_new( NULL );
226
226
purple_request_fields_add_group( fields, group );
228
/* mxitId (read-only) */
229
if ( session->mxitId ) {
230
field = purple_request_field_string_new( "mxitid", _( "Your MXitId" ), session->mxitId, FALSE );
229
/* UID (read-only) */
230
if ( session->uid ) {
231
field = purple_request_field_string_new( "mxitid", _( "Your UID" ), session->uid, FALSE );
231
232
purple_request_field_string_set_editable( field, FALSE );
232
233
purple_request_field_group_add_field( group, field );
236
238
field = purple_request_field_string_new( "pin", _( "PIN" ), session->acc->password, FALSE );
248
250
field = purple_request_field_string_new( "bday", _( "Birthday" ), profile->birthday, FALSE );
249
251
purple_request_field_group_add_field( group, field );
252
if ( profile->flags & CP_PROF_DOBLOCKED )
253
purple_request_field_string_set_editable( field, FALSE );
252
256
field = purple_request_field_choice_new( "male", _( "Gender" ), ( profile->male ) ? 1 : 0 );