If a new session was saved from Change Settings, a side-effect on Windows was
[u/mdw/putty] / windows / windlg.c
index 50d9cc6..91bf756 100644 (file)
@@ -42,8 +42,6 @@ static int nevents = 0, negsize = 0;
 
 extern Config cfg;                    /* defined in window.c */
 
-struct sesslist sesslist;             /* exported to window.c */
-
 #define PRINTER_DISABLED_STRING "None (printing disabled)"
 
 void force_normal(HWND hwnd)
@@ -362,6 +360,8 @@ static void create_controls(HWND hwnd, char *path)
 
 /*
  * This function is the configuration box.
+ * (Being a dialog procedure, in general it returns 0 if the default
+ * dialog processing should be performed, and 1 if it should not.)
  */
 static int CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg,
                                       WPARAM wParam, LPARAM lParam)
@@ -647,7 +647,7 @@ int do_config(void)
     int ret;
 
     ctrlbox = ctrl_new_box();
-    setup_config_box(ctrlbox, &sesslist, FALSE, 0, 0);
+    setup_config_box(ctrlbox, FALSE, 0, 0);
     win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), FALSE);
     dp_init(&dp);
     winctrl_init(&ctrls_base);
@@ -659,11 +659,9 @@ int do_config(void)
     dp.data = &cfg;
     dp.shortcuts['g'] = TRUE;         /* the treeview: `Cate&gory' */
 
-    get_sesslist(&sesslist, TRUE);
     ret =
        SaneDialogBox(hinst, MAKEINTRESOURCE(IDD_MAINBOX), NULL,
                  GenericMainDlgProc);
-    get_sesslist(&sesslist, FALSE);
 
     ctrl_free_box(ctrlbox);
     winctrl_cleanup(&ctrls_panel);
@@ -681,7 +679,7 @@ int do_reconfig(HWND hwnd, int protcfginfo)
     backup_cfg = cfg;                 /* structure copy */
 
     ctrlbox = ctrl_new_box();
-    setup_config_box(ctrlbox, &sesslist, TRUE, cfg.protocol, protcfginfo);
+    setup_config_box(ctrlbox, TRUE, cfg.protocol, protcfginfo);
     win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), TRUE);
     dp_init(&dp);
     winctrl_init(&ctrls_base);
@@ -909,7 +907,7 @@ void old_keyfile_warning(void)
 {
     static const char mbtitle[] = "%s Key File Warning";
     static const char message[] =
-       "You are loading an SSH 2 private key which has an\n"
+       "You are loading an SSH-2 private key which has an\n"
        "old version of the file format. This means your key\n"
        "file is not fully tamperproof. Future versions of\n"
        "%s may stop supporting this private key format,\n"