Mercurial > pidgin
comparison src/multi.c @ 2411:123aaa84109a
[gaim-migrate @ 2424]
Rob, you took too long to do it
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 02 Oct 2001 05:52:56 +0000 |
| parents | 8555e48c02df |
| children | 5948060f486c |
comparison
equal
deleted
inserted
replaced
| 2410:65928d810c22 | 2411:123aaa84109a |
|---|---|
| 45 static GtkWidget *acctedit = NULL; | 45 static GtkWidget *acctedit = NULL; |
| 46 static GtkWidget *list = NULL; /* the clist of names in the accteditor */ | 46 static GtkWidget *list = NULL; /* the clist of names in the accteditor */ |
| 47 static GtkWidget *newmod = NULL; /* the dialog for creating a new account */ | 47 static GtkWidget *newmod = NULL; /* the dialog for creating a new account */ |
| 48 static GtkWidget *newmain = NULL; /* the notebook that holds options */ | 48 static GtkWidget *newmain = NULL; /* the notebook that holds options */ |
| 49 static struct aim_user tmpusr = { "", "", "", OPT_USR_REM_PASS, DEFAULT_PROTO, | 49 static struct aim_user tmpusr = { "", "", "", OPT_USR_REM_PASS, DEFAULT_PROTO, |
| 50 {"", "", "", "", "", "", ""}, "", NULL, NULL, NULL, NULL, NULL, | 50 {"", "", "", "", "", "", ""}, "", NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
| 51 NULL, NULL, OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL | 51 OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL, "", NULL, NULL, NULL, NULL, NULL |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 static void generate_prpl_options(struct aim_user *, GtkWidget *); | 54 static void generate_prpl_options(struct aim_user *, GtkWidget *); |
| 55 | 55 |
| 56 struct mod_usr_opt { | 56 struct mod_usr_opt { |
| 254 } | 254 } |
| 255 if (u->opt_entries) | 255 if (u->opt_entries) |
| 256 g_list_free(u->opt_entries); | 256 g_list_free(u->opt_entries); |
| 257 u->opt_entries = NULL; | 257 u->opt_entries = NULL; |
| 258 | 258 |
| 259 g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", u->tmp_iconfile); | |
| 260 if (u->icondlg) | |
| 261 gtk_widget_destroy(u->icondlg); | |
| 262 u->icondlg = NULL; | |
| 263 | |
| 259 gtk_widget_destroy(u->mod); | 264 gtk_widget_destroy(u->mod); |
| 260 } else { | 265 } else { |
| 261 txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.name)); | 266 txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.name)); |
| 262 u = new_user(txt, tmpusr.protocol, tmpusr.options); | 267 u = new_user(txt, tmpusr.protocol, tmpusr.options); |
| 263 | 268 |
| 274 } | 279 } |
| 275 if (tmpusr.opt_entries) | 280 if (tmpusr.opt_entries) |
| 276 g_list_free(tmpusr.opt_entries); | 281 g_list_free(tmpusr.opt_entries); |
| 277 tmpusr.opt_entries = NULL; | 282 tmpusr.opt_entries = NULL; |
| 278 | 283 |
| 284 g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", tmpusr.tmp_iconfile); | |
| 285 if (tmpusr.icondlg) | |
| 286 gtk_widget_destroy(tmpusr.icondlg); | |
| 287 tmpusr.icondlg = NULL; | |
| 288 | |
| 279 gtk_widget_destroy(newmod); | 289 gtk_widget_destroy(newmod); |
| 280 } | 290 } |
| 281 save_prefs(); | 291 save_prefs(); |
| 282 } | 292 } |
| 283 | 293 |
| 286 if (u) { | 296 if (u) { |
| 287 if (u->opt_entries) | 297 if (u->opt_entries) |
| 288 g_list_free(u->opt_entries); | 298 g_list_free(u->opt_entries); |
| 289 u->opt_entries = NULL; | 299 u->opt_entries = NULL; |
| 290 gtk_widget_destroy(u->mod); | 300 gtk_widget_destroy(u->mod); |
| 301 if (u->icondlg) | |
| 302 gtk_widget_destroy(u->icondlg); | |
| 303 u->icondlg = NULL; | |
| 291 } else { | 304 } else { |
| 292 if (tmpusr.opt_entries) | 305 if (tmpusr.opt_entries) |
| 293 g_list_free(tmpusr.opt_entries); | 306 g_list_free(tmpusr.opt_entries); |
| 294 tmpusr.opt_entries = NULL; | 307 tmpusr.opt_entries = NULL; |
| 295 gtk_widget_destroy(newmod); | 308 gtk_widget_destroy(newmod); |
| 309 if (tmpusr.icondlg) | |
| 310 gtk_widget_destroy(tmpusr.icondlg); | |
| 311 tmpusr.icondlg = NULL; | |
| 296 } | 312 } |
| 297 } | 313 } |
| 298 | 314 |
| 299 static void set_prot(GtkWidget *opt, int proto) | 315 static void set_prot(GtkWidget *opt, int proto) |
| 300 { | 316 { |
| 316 if (!(p->options & OPT_PROTO_MAIL_CHECK) && (q->options & OPT_PROTO_MAIL_CHECK)) { | 332 if (!(p->options & OPT_PROTO_MAIL_CHECK) && (q->options & OPT_PROTO_MAIL_CHECK)) { |
| 317 gtk_widget_show(u->checkmail); | 333 gtk_widget_show(u->checkmail); |
| 318 } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { | 334 } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { |
| 319 gtk_widget_hide(u->checkmail); | 335 gtk_widget_hide(u->checkmail); |
| 320 } | 336 } |
| 337 if (!(p->options & OPT_PROTO_BUDDY_ICON) && (q->options & OPT_PROTO_BUDDY_ICON)) { | |
| 338 gtk_widget_show(u->iconsel); | |
| 339 } else if ((p->options & OPT_PROTO_BUDDY_ICON) && !(q->options & OPT_PROTO_BUDDY_ICON)) { | |
| 340 gtk_widget_hide(u->iconsel); | |
| 341 } | |
| 321 u->tmp_protocol = proto; | 342 u->tmp_protocol = proto; |
| 322 generate_prpl_options(u, u->main); | 343 generate_prpl_options(u, u->main); |
| 323 } else if (!u && (tmpusr.tmp_protocol != proto)) { | 344 } else if (!u && (tmpusr.tmp_protocol != proto)) { |
| 324 int i; | 345 int i; |
| 325 for (i = 0; i < 7; i++) | 346 for (i = 0; i < 7; i++) |
| 335 if (!(p->options & OPT_PROTO_MAIL_CHECK) && (q->options & OPT_PROTO_MAIL_CHECK)) { | 356 if (!(p->options & OPT_PROTO_MAIL_CHECK) && (q->options & OPT_PROTO_MAIL_CHECK)) { |
| 336 gtk_widget_show(tmpusr.checkmail); | 357 gtk_widget_show(tmpusr.checkmail); |
| 337 } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { | 358 } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { |
| 338 gtk_widget_hide(tmpusr.checkmail); | 359 gtk_widget_hide(tmpusr.checkmail); |
| 339 } | 360 } |
| 361 if (!(p->options & OPT_PROTO_BUDDY_ICON) && (q->options & OPT_PROTO_BUDDY_ICON)) { | |
| 362 gtk_widget_show(tmpusr.iconsel); | |
| 363 } else if ((p->options & OPT_PROTO_BUDDY_ICON) && !(q->options & OPT_PROTO_BUDDY_ICON)) { | |
| 364 gtk_widget_hide(tmpusr.iconsel); | |
| 365 } | |
| 340 tmpusr.tmp_protocol = tmpusr.protocol = proto; | 366 tmpusr.tmp_protocol = tmpusr.protocol = proto; |
| 341 generate_prpl_options(NULL, newmain); | 367 generate_prpl_options(NULL, newmain); |
| 342 } | 368 } |
| 343 } | 369 } |
| 344 | 370 |
| 387 gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), count); | 413 gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), count); |
| 388 | 414 |
| 389 return optmenu; | 415 return optmenu; |
| 390 } | 416 } |
| 391 | 417 |
| 418 static void des_icon_sel(GtkWidget *w, struct aim_user *u) | |
| 419 { | |
| 420 w = u->icondlg; | |
| 421 if (u->icondlg) | |
| 422 u->icondlg = NULL; | |
| 423 if (w) | |
| 424 gtk_widget_destroy(w); | |
| 425 } | |
| 426 | |
| 427 static void set_icon(GtkWidget *w, struct aim_user *u) | |
| 428 { | |
| 429 GtkWidget *sel = u ? u->icondlg : tmpusr.icondlg; | |
| 430 char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sel)); | |
| 431 | |
| 432 if (file_is_dir(file, sel)) | |
| 433 return; | |
| 434 | |
| 435 if (u) { | |
| 436 gtk_entry_set_text(GTK_ENTRY(u->iconentry), file); | |
| 437 g_snprintf(u->tmp_iconfile, sizeof(u->tmp_iconfile), "%s", file); | |
| 438 u->icondlg = NULL; | |
| 439 } else { | |
| 440 gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), file); | |
| 441 g_snprintf(tmpusr.tmp_iconfile, sizeof(tmpusr.tmp_iconfile), "%s", file); | |
| 442 tmpusr.icondlg = NULL; | |
| 443 } | |
| 444 | |
| 445 gtk_widget_destroy(sel); | |
| 446 } | |
| 447 | |
| 448 static void sel_icon_dlg(GtkWidget *w, struct aim_user *u) | |
| 449 { | |
| 450 GtkWidget *dlg; | |
| 451 char buf[256]; | |
| 452 | |
| 453 if ((u && u->icondlg) || (!u && tmpusr.icondlg)) { | |
| 454 if (u) | |
| 455 gtk_widget_show(u->icondlg); | |
| 456 else | |
| 457 gtk_widget_show(tmpusr.icondlg); | |
| 458 return; | |
| 459 } | |
| 460 | |
| 461 dlg = gtk_file_selection_new(_("Gaim - Load Buddy Icon")); | |
| 462 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(dlg)); | |
| 463 g_snprintf(buf, sizeof(buf), "%s/", g_get_home_dir()); | |
| 464 gtk_file_selection_set_filename(GTK_FILE_SELECTION(dlg), buf); | |
| 465 | |
| 466 gtk_signal_connect(GTK_OBJECT(dlg), "destroy", GTK_SIGNAL_FUNC(des_icon_sel), u); | |
| 467 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dlg)->cancel_button), "clicked", | |
| 468 GTK_SIGNAL_FUNC(des_icon_sel), u); | |
| 469 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dlg)->ok_button), "clicked", | |
| 470 GTK_SIGNAL_FUNC(set_icon), u); | |
| 471 | |
| 472 if (u) | |
| 473 u->icondlg = dlg; | |
| 474 else | |
| 475 tmpusr.icondlg = dlg; | |
| 476 | |
| 477 gtk_widget_show(dlg); | |
| 478 } | |
| 479 | |
| 480 static void reset_icon(GtkWidget *w, struct aim_user *u) | |
| 481 { | |
| 482 if (u) { | |
| 483 u->tmp_iconfile[0] = 0; | |
| 484 gtk_entry_set_text(GTK_ENTRY(u->iconentry), u->iconfile); | |
| 485 } else { | |
| 486 tmpusr.tmp_iconfile[0] = 0; | |
| 487 gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), ""); | |
| 488 } | |
| 489 } | |
| 490 | |
| 491 static GtkWidget *build_icon_selection(struct aim_user *u, GtkWidget *box) | |
| 492 { | |
| 493 GtkWidget *hbox; | |
| 494 GtkWidget *label; | |
| 495 GtkWidget *name; | |
| 496 GtkWidget *browse; | |
| 497 GtkWidget *reset; | |
| 498 | |
| 499 hbox = gtk_hbox_new(FALSE, 0); | |
| 500 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); | |
| 501 gtk_widget_show(hbox); | |
| 502 | |
| 503 label = gtk_label_new(_("Buddy Icon File:")); | |
| 504 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
| 505 gtk_widget_show(label); | |
| 506 | |
| 507 name = gtk_entry_new(); | |
| 508 if (u) | |
| 509 gtk_entry_set_text(GTK_ENTRY(name), u->iconfile); | |
| 510 else | |
| 511 gtk_entry_set_text(GTK_ENTRY(name), tmpusr.iconfile); | |
| 512 gtk_entry_set_editable(GTK_ENTRY(name), FALSE); | |
| 513 gtk_box_pack_start(GTK_BOX(hbox), name, TRUE, TRUE, 5); | |
| 514 gtk_widget_show(name); | |
| 515 if (u) | |
| 516 u->iconentry = name; | |
| 517 else | |
| 518 tmpusr.iconentry = name; | |
| 519 | |
| 520 browse = gtk_button_new_with_label(_("Browse")); | |
| 521 gtk_signal_connect(GTK_OBJECT(browse), "clicked", GTK_SIGNAL_FUNC(sel_icon_dlg), u); | |
| 522 gtk_box_pack_start(GTK_BOX(hbox), browse, FALSE, FALSE, 0); | |
| 523 gtk_widget_show(browse); | |
| 524 | |
| 525 reset = gtk_button_new_with_label(_("Reset")); | |
| 526 gtk_signal_connect(GTK_OBJECT(reset), "clicked", GTK_SIGNAL_FUNC(reset_icon), u); | |
| 527 gtk_box_pack_start(GTK_BOX(hbox), reset, FALSE, FALSE, 0); | |
| 528 gtk_widget_show(reset); | |
| 529 | |
| 530 return hbox; | |
| 531 } | |
| 532 | |
| 392 static void generate_general_options(struct aim_user *u, GtkWidget *book) | 533 static void generate_general_options(struct aim_user *u, GtkWidget *book) |
| 393 { | 534 { |
| 394 GtkWidget *vbox; | 535 GtkWidget *vbox; |
| 395 GtkWidget *hbox; | 536 GtkWidget *hbox; |
| 396 GtkWidget *pwdbox; | 537 GtkWidget *pwdbox; |
| 397 GtkWidget *label; | 538 GtkWidget *label; |
| 398 GtkWidget *name; | 539 GtkWidget *name; |
| 399 GtkWidget *pass; | 540 GtkWidget *pass; |
| 400 GtkWidget *rempass; | 541 GtkWidget *rempass; |
| 401 GtkWidget *checkmail; | 542 GtkWidget *checkmail; |
| 543 GtkWidget *iconsel; | |
| 402 | 544 |
| 403 vbox = gtk_vbox_new(FALSE, 5); | 545 vbox = gtk_vbox_new(FALSE, 5); |
| 404 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 546 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
| 405 gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(_("General Options"))); | 547 gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(_("General Options"))); |
| 406 | 548 |
| 434 | 576 |
| 435 rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox); | 577 rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox); |
| 436 acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox); | 578 acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox); |
| 437 /*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox); */ | 579 /*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox); */ |
| 438 checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox); | 580 checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox); |
| 581 | |
| 582 iconsel = build_icon_selection(u, vbox); | |
| 439 | 583 |
| 440 gtk_widget_show_all(vbox); | 584 gtk_widget_show_all(vbox); |
| 441 | 585 |
| 442 if (u) { | 586 if (u) { |
| 443 u->name = name; | 587 u->name = name; |
| 444 u->pwdbox = pwdbox; | 588 u->pwdbox = pwdbox; |
| 445 u->pass = pass; | 589 u->pass = pass; |
| 446 u->rempass = rempass; | 590 u->rempass = rempass; |
| 447 u->checkmail = checkmail; | 591 u->checkmail = checkmail; |
| 592 u->iconsel = iconsel; | |
| 448 gtk_entry_set_text(GTK_ENTRY(name), u->username); | 593 gtk_entry_set_text(GTK_ENTRY(name), u->username); |
| 449 gtk_entry_set_text(GTK_ENTRY(pass), u->password); | 594 gtk_entry_set_text(GTK_ENTRY(pass), u->password); |
| 450 gtk_entry_set_editable(GTK_ENTRY(name), FALSE); | 595 gtk_entry_set_editable(GTK_ENTRY(name), FALSE); |
| 451 } else { | 596 } else { |
| 452 tmpusr.name = name; | 597 tmpusr.name = name; |
| 453 tmpusr.pwdbox = pwdbox; | 598 tmpusr.pwdbox = pwdbox; |
| 454 tmpusr.pass = pass; | 599 tmpusr.pass = pass; |
| 455 tmpusr.rempass = rempass; | 600 tmpusr.rempass = rempass; |
| 456 tmpusr.checkmail = checkmail; | 601 tmpusr.checkmail = checkmail; |
| 602 tmpusr.iconsel = iconsel; | |
| 457 } | 603 } |
| 458 } | 604 } |
| 459 | 605 |
| 460 static void generate_prpl_options(struct aim_user *u, GtkWidget *book) | 606 static void generate_prpl_options(struct aim_user *u, GtkWidget *book) |
| 461 { | 607 { |
| 567 gtk_signal_connect(GTK_OBJECT(mod), "destroy", GTK_SIGNAL_FUNC(delmod), u); | 713 gtk_signal_connect(GTK_OBJECT(mod), "destroy", GTK_SIGNAL_FUNC(delmod), u); |
| 568 | 714 |
| 569 box = gtk_vbox_new(FALSE, 5); | 715 box = gtk_vbox_new(FALSE, 5); |
| 570 gtk_container_border_width(GTK_CONTAINER(mod), 5); | 716 gtk_container_border_width(GTK_CONTAINER(mod), 5); |
| 571 gtk_container_add(GTK_CONTAINER(mod), box); | 717 gtk_container_add(GTK_CONTAINER(mod), box); |
| 718 gtk_widget_show(box); | |
| 572 | 719 |
| 573 book = gtk_notebook_new(); | 720 book = gtk_notebook_new(); |
| 574 gtk_box_pack_start(GTK_BOX(box), book, FALSE, FALSE, 0); | 721 gtk_box_pack_start(GTK_BOX(box), book, FALSE, FALSE, 0); |
| 722 gtk_widget_show(book); | |
| 575 | 723 |
| 576 if (u) { | 724 if (u) { |
| 577 if (find_prpl(u->protocol)) | 725 if (find_prpl(u->protocol)) |
| 578 u->tmp_protocol = u->protocol; | 726 u->tmp_protocol = u->protocol; |
| 579 else if (protocols) | 727 else if (protocols) |
| 591 generate_general_options(u, book); | 739 generate_general_options(u, book); |
| 592 generate_prpl_options(u, book); | 740 generate_prpl_options(u, book); |
| 593 | 741 |
| 594 hbox = gtk_hbox_new(FALSE, 5); | 742 hbox = gtk_hbox_new(FALSE, 5); |
| 595 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); | 743 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
| 744 gtk_widget_show(hbox); | |
| 596 | 745 |
| 597 button = picture_button(mod, _("Cancel"), cancel_xpm); | 746 button = picture_button(mod, _("Cancel"), cancel_xpm); |
| 598 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 747 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 599 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_mod), u); | 748 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_mod), u); |
| 749 gtk_widget_show(button); | |
| 600 | 750 |
| 601 button = picture_button(mod, _("OK"), ok_xpm); | 751 button = picture_button(mod, _("OK"), ok_xpm); |
| 602 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 752 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 603 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_mod), u); | 753 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_mod), u); |
| 754 gtk_widget_show(button); | |
| 604 | 755 |
| 605 if (u) { | 756 if (u) { |
| 606 u->mod = mod; | 757 u->mod = mod; |
| 607 u->main = book; /* sorry, i think i broke the joke :) */ | 758 u->main = book; /* sorry, i think i broke the joke :) */ |
| 608 u->tmp_options = u->options; | 759 u->tmp_options = u->options; |
| 609 } else { | 760 } else { |
| 610 newmod = mod; | 761 newmod = mod; |
| 611 newmain = book; | 762 newmain = book; |
| 612 } | 763 } |
| 613 | 764 |
| 614 gtk_widget_show_all(mod); | |
| 615 | |
| 616 if (u) { | 765 if (u) { |
| 617 p = find_prpl(u->tmp_protocol); | 766 p = find_prpl(u->tmp_protocol); |
| 618 if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { | 767 if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { |
| 619 gtk_widget_hide(u->pwdbox); | 768 gtk_widget_hide(u->pwdbox); |
| 620 gtk_widget_hide(u->rempass); | 769 gtk_widget_hide(u->rempass); |
| 621 } | 770 } |
| 622 if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) | 771 if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) |
| 623 gtk_widget_hide(u->checkmail); | 772 gtk_widget_hide(u->checkmail); |
| 773 if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) | |
| 774 gtk_widget_hide(u->iconsel); | |
| 624 } else { | 775 } else { |
| 625 p = find_prpl(tmpusr.tmp_protocol); | 776 p = find_prpl(tmpusr.tmp_protocol); |
| 626 if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { | 777 if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { |
| 627 gtk_widget_hide(tmpusr.pwdbox); | 778 gtk_widget_hide(tmpusr.pwdbox); |
| 628 gtk_widget_hide(tmpusr.rempass); | 779 gtk_widget_hide(tmpusr.rempass); |
| 629 } | 780 } |
| 630 if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) | 781 if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) |
| 631 gtk_widget_hide(tmpusr.checkmail); | 782 gtk_widget_hide(tmpusr.checkmail); |
| 632 } | 783 if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) |
| 784 gtk_widget_hide(tmpusr.iconsel); | |
| 785 } | |
| 786 | |
| 787 gtk_widget_show(mod); | |
| 633 } | 788 } |
| 634 | 789 |
| 635 static void add_acct(GtkWidget *w, gpointer d) | 790 static void add_acct(GtkWidget *w, gpointer d) |
| 636 { | 791 { |
| 637 show_acct_mod(NULL); | 792 show_acct_mod(NULL); |
