diff 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
line wrap: on
line diff
--- a/src/gtkaccount.c	Mon Aug 25 00:39:39 2003 +0000
+++ b/src/gtkaccount.c	Mon Aug 25 02:49:42 2003 +0000
@@ -736,6 +736,13 @@
 	gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
 	gtk_widget_show(item);
 
+	/* Use Environmental Settings */
+	item = gtk_menu_item_new_with_label(_("Use Environmental Settings"));
+	g_object_set_data(G_OBJECT(item), "proxytype",
+					  GINT_TO_POINTER(GAIM_PROXY_USE_ENVVAR));
+	gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+	gtk_widget_show(item);
+
 	gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu);
 
 	return dropdown;
@@ -748,7 +755,8 @@
 		gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)) - 1;
 
 	if (dialog->new_proxy_type == GAIM_PROXY_USE_GLOBAL ||
-		dialog->new_proxy_type == GAIM_PROXY_NONE) {
+		dialog->new_proxy_type == GAIM_PROXY_NONE ||
+		dialog->new_proxy_type == GAIM_PROXY_USE_ENVVAR) {
 
 		gtk_widget_hide_all(dialog->proxy_vbox);
 	}
@@ -832,10 +840,13 @@
 		GaimProxyType type = gaim_proxy_info_get_type(proxy_info);
 
 		/* Hah! */
+		/* I dunno what you're laughing about, fuzz ball. */
+		dialog->new_proxy_type = type;
 		gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->proxy_dropdown),
 									(int)type + 1);
 
-		if (type == GAIM_PROXY_NONE || type == GAIM_PROXY_USE_GLOBAL) {
+		if (type == GAIM_PROXY_USE_GLOBAL || type == GAIM_PROXY_NONE ||
+			type == GAIM_PROXY_USE_ENVVAR) {
 			gtk_widget_hide_all(vbox2);
 		}
 		else {
@@ -1030,7 +1041,7 @@
 	}
 
 	/* Set the proxy stuff. */
-	if (dialog->new_proxy_type == GAIM_PROXY_NONE) {
+	if (dialog->new_proxy_type == GAIM_PROXY_USE_GLOBAL) {
 		gaim_account_set_proxy_info(dialog->account, NULL);
 	}
 	else {
@@ -1106,8 +1117,6 @@
 static void
 register_account_prefs_cb(GtkWidget *w, AccountPrefsDialog *dialog)
 {
-	GaimPluginProtocolInfo *prpl_info = dialog->prpl_info;
-
 	ok_account_prefs_cb(NULL, dialog);
 
 	gaim_account_register(dialog->account);