comparison src/account.c @ 8638:0706d86ecec2

[gaim-migrate @ 9390] Fix http://sourceforge.net/tracker/index.php?func=detail&aid=932986&group_id=235&atid=100235 "Change Password Crash" (when leaving a field empty) I made the 3 fields in the change password dialog mandatory, and then I added a check for null values, just to be double sure. Chip, is it bad that stuff using the request API can get NULL like that? It seems like it might be better if stuff just got an empty string? I dunno committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 12 Apr 2004 02:04:46 +0000
parents 4aee5a47937d
children 4133c85d76f7
comparison
equal deleted inserted replaced
8637:dc5f694e1cab 8638:0706d86ecec2
279 _("New passwords do not match."), NULL); 279 _("New passwords do not match."), NULL);
280 280
281 return; 281 return;
282 } 282 }
283 283
284 if (*orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0') 284 if (orig_pass == NULL || new_pass_1 == NULL || new_pass_2 == NULL ||
285 *orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0')
285 { 286 {
286 gaim_notify_error(NULL, NULL, 287 gaim_notify_error(NULL, NULL,
287 _("Fill out all fields completely."), NULL); 288 _("Fill out all fields completely."), NULL);
288 return; 289 return;
289 } 290 }
310 gaim_request_fields_add_group(fields, group); 311 gaim_request_fields_add_group(fields, group);
311 312
312 field = gaim_request_field_string_new("password", _("Original password"), 313 field = gaim_request_field_string_new("password", _("Original password"),
313 NULL, FALSE); 314 NULL, FALSE);
314 gaim_request_field_string_set_masked(field, TRUE); 315 gaim_request_field_string_set_masked(field, TRUE);
316 gaim_request_field_set_required(field, TRUE);
315 gaim_request_field_group_add_field(group, field); 317 gaim_request_field_group_add_field(group, field);
316 318
317 field = gaim_request_field_string_new("new_password_1", 319 field = gaim_request_field_string_new("new_password_1",
318 _("New password"), 320 _("New password"),
319 NULL, FALSE); 321 NULL, FALSE);
320 gaim_request_field_string_set_masked(field, TRUE); 322 gaim_request_field_string_set_masked(field, TRUE);
323 gaim_request_field_set_required(field, TRUE);
321 gaim_request_field_group_add_field(group, field); 324 gaim_request_field_group_add_field(group, field);
322 325
323 field = gaim_request_field_string_new("new_password_2", 326 field = gaim_request_field_string_new("new_password_2",
324 _("New password (again)"), 327 _("New password (again)"),
325 NULL, FALSE); 328 NULL, FALSE);
326 gaim_request_field_string_set_masked(field, TRUE); 329 gaim_request_field_string_set_masked(field, TRUE);
330 gaim_request_field_set_required(field, TRUE);
327 gaim_request_field_group_add_field(group, field); 331 gaim_request_field_group_add_field(group, field);
328 332
329 g_snprintf(primary, sizeof(primary), _("Change password for %s"), 333 g_snprintf(primary, sizeof(primary), _("Change password for %s"),
330 gaim_account_get_username(account)); 334 gaim_account_get_username(account));
331 335