Just for Jacob, the ciphers drag list is now six lines high instead
[u/mdw/putty] / config.c
index 922bfa1..df8134b 100644 (file)
--- a/config.c
+++ b/config.c
@@ -274,7 +274,7 @@ static void sessionsaver_handler(union control *ctrl, void *dlg,
        } else if (ctrl == ssd->savebutton) {
            int isdef = !strcmp(ssd->savedsession, "Default Settings");
            if (!ssd->savedsession[0]) {
-               int i = dlg_listbox_index(ctrl, dlg);
+               int i = dlg_listbox_index(ssd->listbox, dlg);
                if (i < 0) {
                    dlg_beep(dlg);
                    return;
@@ -288,13 +288,13 @@ static void sessionsaver_handler(union control *ctrl, void *dlg,
                    ssd->savedsession[0] = '\0';
                }
            }
-           save_settings(ssd->savedsession, isdef, cfg);
+           save_settings(ssd->savedsession, !isdef, cfg);
            get_sesslist(ssd->sesslist, FALSE);
            get_sesslist(ssd->sesslist, TRUE);
            dlg_refresh(ssd->editbox, dlg);
            dlg_refresh(ssd->listbox, dlg);
        } else if (ctrl == ssd->delbutton) {
-           int i = dlg_listbox_index(ctrl, dlg);
+           int i = dlg_listbox_index(ssd->listbox, dlg);
            if (i <= 0) {
                dlg_beep(dlg);
            } else {
@@ -1384,9 +1384,11 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
                          "2 only", 'n', I(3), NULL);
 
        s = ctrl_getset(b, "Connection/SSH", "encryption", "Encryption options");
-       ctrl_draglist(s, "Encryption cipher selection policy:", 's',
-                     HELPCTX(ssh_ciphers),
-                     cipherlist_handler, P(NULL));
+       c = ctrl_draglist(s, "Encryption cipher selection policy:", 's',
+                         HELPCTX(ssh_ciphers),
+                         cipherlist_handler, P(NULL));
+       c->listbox.height = 6;
+       
        ctrl_checkbox(s, "Enable non-standard use of single-DES in SSH 2", 'i',
                      HELPCTX(ssh_ciphers),
                      dlg_stdcheckbox_handler,