Mercurial > pidgin
comparison src/multi.c @ 3756:08742bf8a7be
[gaim-migrate @ 3895]
This should work a bit better now. Changing protocols doesn't mess things
up in the account settings dialogs.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sat, 19 Oct 2002 23:29:24 +0000 |
| parents | a868e1181321 |
| children | 521b0f9ed00f |
comparison
equal
deleted
inserted
replaced
| 3755:a868e1181321 | 3756:08742bf8a7be |
|---|---|
| 608 return hbox; | 608 return hbox; |
| 609 } | 609 } |
| 610 | 610 |
| 611 static void generate_login_options(struct mod_user *u, GtkWidget *box) | 611 static void generate_login_options(struct mod_user *u, GtkWidget *box) |
| 612 { | 612 { |
| 613 GtkWidget *frame; | 613 GtkWidget *frame, *frame_parent; |
| 614 GtkWidget *vbox; | 614 GtkWidget *vbox; |
| 615 GtkWidget *hbox; | 615 GtkWidget *hbox; |
| 616 GtkWidget *label; | 616 GtkWidget *label; |
| 617 | 617 |
| 618 struct prpl *p; | 618 struct prpl *p; |
| 619 | 619 |
| 620 frame = make_frame(box, _("Login Options")); | 620 frame = make_frame(box, _("Login Options")); |
| 621 frame_parent = gtk_widget_get_parent(gtk_widget_get_parent(frame)); | |
| 621 | 622 |
| 622 vbox = gtk_vbox_new(FALSE, 5); | 623 vbox = gtk_vbox_new(FALSE, 5); |
| 623 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 624 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
| 624 gtk_container_add(GTK_CONTAINER(frame), vbox); | 625 gtk_container_add(GTK_CONTAINER(frame), vbox); |
| 625 | 626 |
| 669 make_protocol_menu(hbox, u); | 670 make_protocol_menu(hbox, u); |
| 670 | 671 |
| 671 u->rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox); | 672 u->rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox); |
| 672 acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox); | 673 acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox); |
| 673 | 674 |
| 674 gtk_widget_show_all(frame); | 675 gtk_widget_show_all(frame_parent); |
| 675 | 676 |
| 676 if (u->user) { | 677 if (u->user) { |
| 677 gtk_entry_set_text(GTK_ENTRY(u->name), u->user->username); | 678 gtk_entry_set_text(GTK_ENTRY(u->name), u->user->username); |
| 678 gtk_entry_set_text(GTK_ENTRY(u->alias), u->user->alias); | 679 gtk_entry_set_text(GTK_ENTRY(u->alias), u->user->alias); |
| 679 gtk_entry_set_text(GTK_ENTRY(u->pass), u->user->password); | 680 gtk_entry_set_text(GTK_ENTRY(u->pass), u->user->password); |
| 696 * the frame itself (like generate_protocol_options). I'd do it myself, but I'm | 697 * the frame itself (like generate_protocol_options). I'd do it myself, but I'm |
| 697 * tired and I don't care. */ | 698 * tired and I don't care. */ |
| 698 /* Sean was right. I did do that. I told him I would. */ | 699 /* Sean was right. I did do that. I told him I would. */ |
| 699 | 700 |
| 700 GtkWidget *vbox; | 701 GtkWidget *vbox; |
| 702 GtkWidget *frame; | |
| 701 | 703 |
| 702 struct prpl *p = find_prpl(u->protocol); | 704 struct prpl *p = find_prpl(u->protocol); |
| 703 | 705 |
| 704 u->user_frame = make_frame(box, _("User Options")); | 706 frame = make_frame(box, _("User Options")); |
| 705 gtk_widget_show(u->user_frame); | 707 u->user_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); |
| 708 gtk_widget_show_all(u->user_frame); | |
| 706 | 709 |
| 707 vbox = gtk_vbox_new(FALSE, 5); | 710 vbox = gtk_vbox_new(FALSE, 5); |
| 708 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 711 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
| 709 gtk_container_add(GTK_CONTAINER(u->user_frame), vbox); | 712 gtk_container_add(GTK_CONTAINER(frame), vbox); |
| 710 gtk_widget_show(vbox); | 713 gtk_widget_show(vbox); |
| 711 | 714 |
| 712 u->checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox); | 715 u->checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox); |
| 713 u->iconsel = build_icon_selection(u, vbox); | 716 u->iconsel = build_icon_selection(u, vbox); |
| 714 | 717 |
| 861 | 864 |
| 862 u->mod = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 865 u->mod = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
| 863 gtk_window_set_wmclass(GTK_WINDOW(u->mod), "account", "Gaim"); | 866 gtk_window_set_wmclass(GTK_WINDOW(u->mod), "account", "Gaim"); |
| 864 gtk_widget_realize(u->mod); | 867 gtk_widget_realize(u->mod); |
| 865 gtk_window_set_title(GTK_WINDOW(u->mod), _("Gaim - Modify Account")); | 868 gtk_window_set_title(GTK_WINDOW(u->mod), _("Gaim - Modify Account")); |
| 866 gtk_window_set_policy(GTK_WINDOW(u->mod), FALSE, TRUE, TRUE); /* nothing odd here :) */ | 869 gtk_window_set_policy(GTK_WINDOW(u->mod), FALSE, FALSE, TRUE); /* nothing odd here :) */ |
| 867 gtk_signal_connect(GTK_OBJECT(u->mod), "destroy", GTK_SIGNAL_FUNC(delmod), u); | 870 gtk_signal_connect(GTK_OBJECT(u->mod), "destroy", GTK_SIGNAL_FUNC(delmod), u); |
| 868 | 871 |
| 869 vbox = gtk_vbox_new(FALSE, 6); | 872 vbox = gtk_vbox_new(FALSE, 6); |
| 870 gtk_container_border_width(GTK_CONTAINER(vbox), 6); | 873 gtk_container_border_width(GTK_CONTAINER(vbox), 6); |
| 871 gtk_container_add(GTK_CONTAINER(u->mod), vbox); | 874 gtk_container_add(GTK_CONTAINER(u->mod), vbox); |
| 875 gtk_widget_show(vbox); | |
| 872 | 876 |
| 873 u->main = gtk_vbox_new(FALSE, 12); | 877 u->main = gtk_vbox_new(FALSE, 12); |
| 874 gtk_container_border_width(GTK_CONTAINER(u->main), 6); | 878 gtk_container_border_width(GTK_CONTAINER(u->main), 6); |
| 875 gtk_box_pack_start(GTK_BOX(vbox), u->main, FALSE, FALSE, 0); | 879 gtk_box_pack_start(GTK_BOX(vbox), u->main, FALSE, FALSE, 0); |
| 880 gtk_widget_show(u->main); | |
| 876 | 881 |
| 877 u->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 882 u->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 878 | 883 |
| 879 generate_login_options(u, u->main); | 884 generate_login_options(u, u->main); |
| 880 generate_user_options(u, u->main); | 885 generate_user_options(u, u->main); |
| 881 generate_protocol_options(u, u->main); | 886 generate_protocol_options(u, u->main); |
| 882 | |
| 883 sep = gtk_hseparator_new(); | |
| 884 gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); | |
| 885 | 887 |
| 886 hbox = gtk_hbox_new(FALSE, 6); | 888 hbox = gtk_hbox_new(FALSE, 6); |
| 887 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); | 889 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); |
| 888 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 890 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 889 | 891 |
| 897 button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); | 899 button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); |
| 898 gtk_size_group_add_widget(button_sg, button); | 900 gtk_size_group_add_widget(button_sg, button); |
| 899 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 901 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 900 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_mod), u); | 902 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cancel_mod), u); |
| 901 | 903 |
| 902 gtk_widget_show_all(u->mod); | 904 sep = gtk_hseparator_new(); |
| 905 gtk_box_pack_end (GTK_BOX (vbox), sep, FALSE, FALSE, 0); | |
| 906 gtk_widget_show(sep); | |
| 907 | |
| 908 gtk_widget_show_all(hbox); | |
| 909 gtk_widget_show(u->mod); | |
| 903 } | 910 } |
| 904 | 911 |
| 905 static void add_acct(GtkWidget *w, gpointer d) | 912 static void add_acct(GtkWidget *w, gpointer d) |
| 906 { | 913 { |
| 907 show_acct_mod(NULL); | 914 show_acct_mod(NULL); |
