]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix details of the Pageant and PuTTYgen GUIs for ECDSA.
authorSimon Tatham <anakin@pobox.com>
Sat, 1 Nov 2014 19:33:29 +0000 (19:33 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 2 Nov 2014 18:16:54 +0000 (18:16 +0000)
Pageant's list box needs its tab stops reorganised a little for new
tendencies in string length, and also has to cope with there only
being one prefix space in the output of the new string fingerprint
function. PuTTYgen needs to squash more radio buttons on to one line.

windows/winpgen.c
windows/winpgnt.c

index db47e60f8be7e2661302582d95dfeac29af6e27c..8f263efcbe3b421de14e1be74b492511a24dbd2e 100644 (file)
@@ -918,7 +918,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
        {
            struct ctlpos cp, cp2;
 
-           /* Accelerators used: acglops1rbd */
+           /* Accelerators used: acglops1rbde */
 
            ctlposinit(&cp, hwnd, 4, 4, 4);
            beginbox(&cp, "Key", IDC_BOX_KEY);
@@ -952,7 +952,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
                       "&Save private key", IDC_SAVE);
            endbox(&cp);
            beginbox(&cp, "Parameters", IDC_BOX_PARAMS);
-           radioline(&cp, "Type of key to generate:", IDC_TYPESTATIC, 3,
+           radioline(&cp, "Type of key to generate:", IDC_TYPESTATIC, 4,
                      "SSH-&1 (RSA)", IDC_KEYSSH1,
                      "SSH-2 &RSA", IDC_KEYSSH2RSA,
                       "SSH-2 &DSA", IDC_KEYSSH2DSA,
index b9addd196dac5a8cba3afc451256c649ebf92275..29882842fc3b60ffaeeaab34e0a20f1ec2c4b874 100644 (file)
@@ -349,27 +349,31 @@ static void keylist_update(void)
        }
        for (i = 0; NULL != (skey = index234(ssh2keys, i)); i++) {
            char *listentry, *p;
-           int fp_len;
+           int pos, fp_len;
            /*
-            * Replace two spaces in the fingerprint with tabs, for
-            * nice alignment in the box.
+            * Replace spaces with tabs in the fingerprint prefix, for
+            * nice alignment in the list box, until we encounter a :
+            * meaning we're into the fingerprint proper.
             */
            p = skey->alg->fingerprint(skey->data);
             listentry = dupprintf("%s\t%s", p, skey->comment);
             fp_len = strlen(listentry);
             sfree(p);
 
-           p = strchr(listentry, ' ');
-           if (p && p < listentry + fp_len)
-               *p = '\t';
-           p = strchr(listentry, ' ');
-           if (p && p < listentry + fp_len)
-               *p = '\t';
+            pos = 0;
+            while (1) {
+                pos += strcspn(listentry + pos, " :");
+                if (listentry[pos] == ':')
+                    break;
+                listentry[pos++] = '\t';
+            }
 
            SendDlgItemMessage(keylist, 100, LB_ADDSTRING, 0,
                               (LPARAM) listentry);
             sfree(listentry);
        }
+        SendDlgItemMessage(keylist, 100, LB_ADDSTRING, 0,
+                           (LPARAM)"0\t1\t2\t3\t4\t5\t6\t7\t8\t9\t10");
        SendDlgItemMessage(keylist, 100, LB_SETCURSEL, (WPARAM) - 1, 0);
     }
 }
@@ -1514,7 +1518,7 @@ static int CALLBACK KeyListProc(HWND hwnd, UINT msg,
 
        keylist = hwnd;
        {
-           static int tabs[] = { 35, 60, 210 };
+           static int tabs[] = { 35, 75, 250 };
            SendDlgItemMessage(hwnd, 100, LB_SETTABSTOPS,
                               sizeof(tabs) / sizeof(*tabs),
                               (LPARAM) tabs);