Mercurial > pidgin
comparison src/gtkaccount.c @ 5664:7867ae4836ac
[gaim-migrate @ 6079]
Fixed some more warnings (I think) from when you add a new account.
Unfortunately, it seems that importing prefs and accounts from the old
.gaimrc is having some issues. I know why, will fix. :/
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 02 Jun 2003 10:10:37 +0000 |
parents | e9551e7d6f01 |
children | 46d7ad0dfa26 |
comparison
equal
deleted
inserted
replaced
5663:e9551e7d6f01 | 5664:7867ae4836ac |
---|---|
412 for (l = dialog->prpl_info->protocol_options; l != NULL; l = l->next) { | 412 for (l = dialog->prpl_info->protocol_options; l != NULL; l = l->next) { |
413 option = (GaimAccountOption *)l->data; | 413 option = (GaimAccountOption *)l->data; |
414 | 414 |
415 switch (gaim_account_option_get_type(option)) { | 415 switch (gaim_account_option_get_type(option)) { |
416 case GAIM_PREF_BOOLEAN: | 416 case GAIM_PREF_BOOLEAN: |
417 bool_value = gaim_account_get_bool(dialog->account, | 417 if (dialog->account == NULL) |
418 gaim_account_option_get_setting(option), | 418 bool_value = gaim_account_option_get_default_bool(option); |
419 gaim_account_option_get_default_bool(option)); | 419 else |
420 bool_value = gaim_account_get_bool(dialog->account, | |
421 gaim_account_option_get_setting(option), | |
422 gaim_account_option_get_default_bool(option)); | |
420 | 423 |
421 check = gtk_check_button_new_with_label( | 424 check = gtk_check_button_new_with_label( |
422 gaim_account_option_get_text(option)); | 425 gaim_account_option_get_text(option)); |
423 | 426 |
424 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), | 427 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), |
427 gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0); | 430 gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0); |
428 gtk_widget_show(check); | 431 gtk_widget_show(check); |
429 break; | 432 break; |
430 | 433 |
431 case GAIM_PREF_INT: | 434 case GAIM_PREF_INT: |
432 int_value = gaim_account_get_int(dialog->account, | 435 if (dialog->account == NULL) |
433 gaim_account_option_get_setting(option), | 436 int_value = gaim_account_option_get_default_int(option); |
434 gaim_account_option_get_default_int(option)); | 437 else |
438 int_value = gaim_account_get_int(dialog->account, | |
439 gaim_account_option_get_setting(option), | |
440 gaim_account_option_get_default_int(option)); | |
435 | 441 |
436 g_snprintf(buf, sizeof(buf), "%d", int_value); | 442 g_snprintf(buf, sizeof(buf), "%d", int_value); |
437 | 443 |
438 entry = gtk_entry_new(); | 444 entry = gtk_entry_new(); |
439 gtk_entry_set_text(GTK_ENTRY(entry), buf); | 445 gtk_entry_set_text(GTK_ENTRY(entry), buf); |
445 | 451 |
446 g_free(title); | 452 g_free(title); |
447 break; | 453 break; |
448 | 454 |
449 case GAIM_PREF_STRING: | 455 case GAIM_PREF_STRING: |
450 str_value = gaim_account_get_string(dialog->account, | 456 if (dialog->account == NULL) |
451 gaim_account_option_get_setting(option), | 457 str_value = gaim_account_option_get_default_string(option); |
452 gaim_account_option_get_default_string(option)); | 458 else |
459 str_value = gaim_account_get_string(dialog->account, | |
460 gaim_account_option_get_setting(option), | |
461 gaim_account_option_get_default_string(option)); | |
453 | 462 |
454 entry = gtk_entry_new(); | 463 entry = gtk_entry_new(); |
455 | 464 |
456 if (str_value != NULL) | 465 if (str_value != NULL) |
457 gtk_entry_set_text(GTK_ENTRY(entry), str_value); | 466 gtk_entry_set_text(GTK_ENTRY(entry), str_value); |