diff src/gtkprefs.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 7c14b35bc984
children 156e6643f9db
line wrap: on
line diff
--- a/src/gtkprefs.c	Mon Aug 25 00:39:39 2003 +0000
+++ b/src/gtkprefs.c	Mon Aug 25 02:49:42 2003 +0000
@@ -1067,7 +1067,10 @@
 	GtkWidget *frame = data;
 	const char *proxy = value;
 
-	gtk_widget_set_sensitive(frame, strcmp(proxy, "none"));
+	if (strcmp(proxy, "none") && strcmp(proxy, "envvar"))
+		gtk_widget_set_sensitive(frame, TRUE);
+	else
+		gtk_widget_set_sensitive(frame, FALSE);
 }
 
 static void proxy_print_option(GtkEntry *entry, int entrynum)
@@ -1080,9 +1083,6 @@
 		gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry));
 	else if (entrynum == PROXYPASS)
 		gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry));
-
-	/* If the user specifies it, we want to save it. */
-	gaim_global_proxy_set_from_prefs(TRUE);
 }
 
 GtkWidget *proxy_page() {
@@ -1104,6 +1104,7 @@
 				   "SOCKS 4", "socks4",
 				   "SOCKS 5", "socks5",
 				   "HTTP", "http",
+				   _("Use Environmental Settings"), "envvar",
 				   NULL);
 
 	vbox = gaim_gtk_make_frame(ret, _("Proxy Server"));
@@ -1112,7 +1113,8 @@
 	proxy_info = gaim_global_proxy_get_info();
 
 	if (proxy_info == NULL ||
-		gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_NONE) {
+		gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_NONE ||
+		gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_USE_ENVVAR) {
 
 		gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), FALSE);
 	}