Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
6620:7230e5920911 | 6621:42fdf16f1dad |
---|---|
1065 gpointer data) | 1065 gpointer data) |
1066 { | 1066 { |
1067 GtkWidget *frame = data; | 1067 GtkWidget *frame = data; |
1068 const char *proxy = value; | 1068 const char *proxy = value; |
1069 | 1069 |
1070 gtk_widget_set_sensitive(frame, strcmp(proxy, "none")); | 1070 if (strcmp(proxy, "none") && strcmp(proxy, "envvar")) |
1071 gtk_widget_set_sensitive(frame, TRUE); | |
1072 else | |
1073 gtk_widget_set_sensitive(frame, FALSE); | |
1071 } | 1074 } |
1072 | 1075 |
1073 static void proxy_print_option(GtkEntry *entry, int entrynum) | 1076 static void proxy_print_option(GtkEntry *entry, int entrynum) |
1074 { | 1077 { |
1075 if (entrynum == PROXYHOST) | 1078 if (entrynum == PROXYHOST) |
1078 gaim_prefs_set_int("/core/proxy/port", atoi(gtk_entry_get_text(entry))); | 1081 gaim_prefs_set_int("/core/proxy/port", atoi(gtk_entry_get_text(entry))); |
1079 else if (entrynum == PROXYUSER) | 1082 else if (entrynum == PROXYUSER) |
1080 gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry)); | 1083 gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry)); |
1081 else if (entrynum == PROXYPASS) | 1084 else if (entrynum == PROXYPASS) |
1082 gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry)); | 1085 gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry)); |
1083 | |
1084 /* If the user specifies it, we want to save it. */ | |
1085 gaim_global_proxy_set_from_prefs(TRUE); | |
1086 } | 1086 } |
1087 | 1087 |
1088 GtkWidget *proxy_page() { | 1088 GtkWidget *proxy_page() { |
1089 GtkWidget *ret; | 1089 GtkWidget *ret; |
1090 GtkWidget *vbox; | 1090 GtkWidget *vbox; |
1102 "/core/proxy/type", | 1102 "/core/proxy/type", |
1103 _("No proxy"), "none", | 1103 _("No proxy"), "none", |
1104 "SOCKS 4", "socks4", | 1104 "SOCKS 4", "socks4", |
1105 "SOCKS 5", "socks5", | 1105 "SOCKS 5", "socks5", |
1106 "HTTP", "http", | 1106 "HTTP", "http", |
1107 _("Use Environmental Settings"), "envvar", | |
1107 NULL); | 1108 NULL); |
1108 | 1109 |
1109 vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); | 1110 vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); |
1110 prefs_proxy_frame = vbox; | 1111 prefs_proxy_frame = vbox; |
1111 | 1112 |
1112 proxy_info = gaim_global_proxy_get_info(); | 1113 proxy_info = gaim_global_proxy_get_info(); |
1113 | 1114 |
1114 if (proxy_info == NULL || | 1115 if (proxy_info == NULL || |
1115 gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_NONE) { | 1116 gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_NONE || |
1117 gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_USE_ENVVAR) { | |
1116 | 1118 |
1117 gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), FALSE); | 1119 gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), FALSE); |
1118 } | 1120 } |
1119 proxy_pref_id = gaim_prefs_connect_callback("/core/proxy/type", | 1121 proxy_pref_id = gaim_prefs_connect_callback("/core/proxy/type", |
1120 proxy_changed_cb, prefs_proxy_frame); | 1122 proxy_changed_cb, prefs_proxy_frame); |