comparison src/gtkaccount.c @ 6621:42fdf16f1dad

[gaim-migrate @ 7145] Individual accounts remember the "No Proxy" setting instead of reverting back to "Use Global Proxy Settings" Proxy settings for individual accounts do not revert to "No Proxy" if you open an account, don't change the proxy drop down, then save the account. Those two sound like the same thing, but they're different. I think. Added the "use environmental variables" setting in a way that isn't horrible. We're not using that thing that splits the proxy variable into host:port yet. I'll do that later. I would have done that earlier, but I had to go buy a bike. Also, I'd like to show what the environmental variables are set to somewhere. That'll come later. Also a patch from Robot101: (22:10:25) Bzubhipheron: I have a patch that replaces #define WFLAG_* with GaimMessageFlags GAIM_MESSAGE_* (22:10:30) Bzubhipheron: (an enum in disguise) (22:14:18) Bzubhipheron: GaimMessageFlags protrays much better typing information than "int". most of the other #defines are gone, and glib standardises on enums for its flags too. (22:14:27) Bzubhipheron: (gone or going) (22:14:45) Bzubhipheron: and it makes the prototype of my message queueing stuff prettier. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 25 Aug 2003 02:49:42 +0000
parents 0473a28ce807
children 156e6643f9db
comparison
equal deleted inserted replaced
6620:7230e5920911 6621:42fdf16f1dad
734 g_object_set_data(G_OBJECT(item), "proxytype", 734 g_object_set_data(G_OBJECT(item), "proxytype",
735 GINT_TO_POINTER(GAIM_PROXY_SOCKS5)); 735 GINT_TO_POINTER(GAIM_PROXY_SOCKS5));
736 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); 736 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
737 gtk_widget_show(item); 737 gtk_widget_show(item);
738 738
739 /* Use Environmental Settings */
740 item = gtk_menu_item_new_with_label(_("Use Environmental Settings"));
741 g_object_set_data(G_OBJECT(item), "proxytype",
742 GINT_TO_POINTER(GAIM_PROXY_USE_ENVVAR));
743 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
744 gtk_widget_show(item);
745
739 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); 746 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu);
740 747
741 return dropdown; 748 return dropdown;
742 } 749 }
743 750
746 { 753 {
747 dialog->new_proxy_type = 754 dialog->new_proxy_type =
748 gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)) - 1; 755 gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)) - 1;
749 756
750 if (dialog->new_proxy_type == GAIM_PROXY_USE_GLOBAL || 757 if (dialog->new_proxy_type == GAIM_PROXY_USE_GLOBAL ||
751 dialog->new_proxy_type == GAIM_PROXY_NONE) { 758 dialog->new_proxy_type == GAIM_PROXY_NONE ||
759 dialog->new_proxy_type == GAIM_PROXY_USE_ENVVAR) {
752 760
753 gtk_widget_hide_all(dialog->proxy_vbox); 761 gtk_widget_hide_all(dialog->proxy_vbox);
754 } 762 }
755 else 763 else
756 gtk_widget_show_all(dialog->proxy_vbox); 764 gtk_widget_show_all(dialog->proxy_vbox);
830 (proxy_info = gaim_account_get_proxy_info(dialog->account)) != NULL) { 838 (proxy_info = gaim_account_get_proxy_info(dialog->account)) != NULL) {
831 839
832 GaimProxyType type = gaim_proxy_info_get_type(proxy_info); 840 GaimProxyType type = gaim_proxy_info_get_type(proxy_info);
833 841
834 /* Hah! */ 842 /* Hah! */
843 /* I dunno what you're laughing about, fuzz ball. */
844 dialog->new_proxy_type = type;
835 gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->proxy_dropdown), 845 gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->proxy_dropdown),
836 (int)type + 1); 846 (int)type + 1);
837 847
838 if (type == GAIM_PROXY_NONE || type == GAIM_PROXY_USE_GLOBAL) { 848 if (type == GAIM_PROXY_USE_GLOBAL || type == GAIM_PROXY_NONE ||
849 type == GAIM_PROXY_USE_ENVVAR) {
839 gtk_widget_hide_all(vbox2); 850 gtk_widget_hide_all(vbox2);
840 } 851 }
841 else { 852 else {
842 const char *value; 853 const char *value;
843 int int_val; 854 int int_val;
1028 break; 1039 break;
1029 } 1040 }
1030 } 1041 }
1031 1042
1032 /* Set the proxy stuff. */ 1043 /* Set the proxy stuff. */
1033 if (dialog->new_proxy_type == GAIM_PROXY_NONE) { 1044 if (dialog->new_proxy_type == GAIM_PROXY_USE_GLOBAL) {
1034 gaim_account_set_proxy_info(dialog->account, NULL); 1045 gaim_account_set_proxy_info(dialog->account, NULL);
1035 } 1046 }
1036 else { 1047 else {
1037 proxy_info = gaim_account_get_proxy_info(dialog->account); 1048 proxy_info = gaim_account_get_proxy_info(dialog->account);
1038 1049
1104 } 1115 }
1105 1116
1106 static void 1117 static void
1107 register_account_prefs_cb(GtkWidget *w, AccountPrefsDialog *dialog) 1118 register_account_prefs_cb(GtkWidget *w, AccountPrefsDialog *dialog)
1108 { 1119 {
1109 GaimPluginProtocolInfo *prpl_info = dialog->prpl_info;
1110
1111 ok_account_prefs_cb(NULL, dialog); 1120 ok_account_prefs_cb(NULL, dialog);
1112 1121
1113 gaim_account_register(dialog->account); 1122 gaim_account_register(dialog->account);
1114 } 1123 }
1115 1124