Add an "open" command to the "file" (now "session") menu on the Mac to
[u/mdw/putty] / settings.c
index fe90f11..0c642f5 100644 (file)
@@ -150,6 +150,7 @@ void save_settings(char *section, int do_host, Config * cfg)
 
     /* proxy settings */
     write_setting_s(sesskey, "ProxyExcludeList", cfg->proxy_exclude_list);
+    write_setting_i(sesskey, "ProxyDNS", cfg->proxy_dns);
     write_setting_i(sesskey, "ProxyLocalhost", cfg->even_proxy_localhost);
     write_setting_i(sesskey, "ProxyType", cfg->proxy_type);
     write_setting_s(sesskey, "ProxyHost", cfg->proxy_host);
@@ -320,11 +321,17 @@ void save_settings(char *section, int do_host, Config * cfg)
 
 void load_settings(char *section, int do_host, Config * cfg)
 {
-    int i;
-    char prot[10];
     void *sesskey;
 
     sesskey = open_settings_r(section);
+    load_open_settings(sesskey, do_host, cfg);
+    close_settings_r(sesskey);
+}
+
+void load_open_settings(void *sesskey, int do_host, Config *cfg)
+{
+    int i;
+    char prot[10];
 
     cfg->ssh_subsys = 0;              /* FIXME: load this properly */
     cfg->remote_cmd_ptr = cfg->remote_cmd;
@@ -384,6 +391,7 @@ void load_settings(char *section, int do_host, Config * cfg)
     /* proxy settings */
     gpps(sesskey, "ProxyExcludeList", "", cfg->proxy_exclude_list,
         sizeof(cfg->proxy_exclude_list));
+    gppi(sesskey, "ProxyDNS", PROXYDNS_AUTO, &i); cfg->proxy_dns = i;
     gppi(sesskey, "ProxyLocalhost", 0, &cfg->even_proxy_localhost);
     gppi(sesskey, "ProxyType", PROXY_NONE, &i); cfg->proxy_type = i;
     gpps(sesskey, "ProxyHost", "proxy", cfg->proxy_host,
@@ -635,8 +643,6 @@ void load_settings(char *section, int do_host, Config * cfg)
     gppi(sesskey, "ScrollbarOnLeft", 0, &cfg->scrollbar_on_left);
     gpps(sesskey, "BoldFont", "", cfg->boldfont, sizeof(cfg->boldfont));
     gppi(sesskey, "ShadowBoldOffset", 1, &cfg->shadowboldoffset);
-
-    close_settings_r(sesskey);
 }
 
 void do_defaults(char *session, Config * cfg)