summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-11-30 20:45:13 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2010-11-30 20:45:13 +0200
commita6578e563d25ff567ddefa93ca04baf8eb416eec (patch)
tree83ef3c18410e8f2d263132afae7ee9e308250a37
parentb9278adb04c824b47da7ac0ec7c1c8ef5931c888 (diff)
fixed key list parsing
-rw-r--r--main.cpp19
-rw-r--r--new_gpg.rc16
2 files changed, 23 insertions, 12 deletions
diff --git a/main.cpp b/main.cpp
index ebe5ed8..8d12350 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1408,6 +1408,13 @@ static BOOL CALLBACK DlgProcLoadExistingKey(HWND hwndDlg,UINT msg,WPARAM wParam,
tmp = mir_wstrdup(toUTF16(out.substr(p2,p-p2)).c_str());
ListView_SetItemText(hwndList, iRow, 0, tmp);
mir_free(tmp);
+
+ p++;
+ p2 = out.find("\n", p);
+ tmp = mir_wstrdup(toUTF16(out.substr(p,p2-p)).c_str());
+ ListView_SetItemText(hwndList, iRow, 3, tmp);
+ mir_free(tmp);
+
p = out.find("uid ", p);
p2 = out.find_first_not_of(" ", p+5);
p = out.find("<", p2);
@@ -1419,12 +1426,12 @@ static BOOL CALLBACK DlgProcLoadExistingKey(HWND hwndDlg,UINT msg,WPARAM wParam,
tmp = mir_wstrdup(toUTF16(out.substr(p,p2-p)).c_str());
ListView_SetItemText(hwndList, iRow, 1, tmp);
mir_free(tmp);
- p = out.find("sub ", p2) + 6;
- p = out.find(" ", p) + 1;
- p2 = out.find("\n", p);
- tmp = mir_wstrdup(toUTF16(out.substr(p,p2-p-1)).c_str());
- ListView_SetItemText(hwndList, iRow, 3, tmp);
- mir_free(tmp);
+// p = out.find("sub ", p2) + 6;
+// p = out.find(" ", p) + 1;
+// p2 = out.find("\n", p);
+// tmp = mir_wstrdup(toUTF16(out.substr(p,p2-p-1)).c_str());
+// ListView_SetItemText(hwndList, iRow, 3, tmp);
+// mir_free(tmp);
ListView_SetColumnWidth(hwndList, 0, LVSCW_AUTOSIZE);// not sure about this
ListView_SetColumnWidth(hwndList, 1, LVSCW_AUTOSIZE);
ListView_SetColumnWidth(hwndList, 2, LVSCW_AUTOSIZE);
diff --git a/new_gpg.rc b/new_gpg.rc
index f6b5fee..a0535cc 100644
--- a/new_gpg.rc
+++ b/new_gpg.rc
@@ -134,14 +134,14 @@ BEGIN
LTEXT "0 - does not expire",IDC_STATIC,67,122,62,8
END
-IDD_LOAD_EXISTING_KEY DIALOGEX 0, 0, 316, 156
+IDD_LOAD_EXISTING_KEY DIALOGEX 0, 0, 370, 257
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Select existing public key from list"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "خت",IDOK,7,135,50,14,WS_DISABLED
- PUSHBUTTON "Cancel",IDCANCEL,259,135,50,14
- CONTROL "",IDC_EXISTING_KEY_LIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,14,292,113
+ DEFPUSHBUTTON "خت",IDOK,7,236,50,14,WS_DISABLED
+ PUSHBUTTON "Cancel",IDCANCEL,313,236,50,14
+ CONTROL "",IDC_EXISTING_KEY_LIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,14,356,217
END
IDD_KEY_PASSWD DIALOGEX 0, 0, 207, 108
@@ -221,9 +221,9 @@ BEGIN
IDD_LOAD_EXISTING_KEY, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 309
+ RIGHTMARGIN, 363
TOPMARGIN, 7
- BOTTOMMARGIN, 149
+ BOTTOMMARGIN, 250
END
IDD_KEY_PASSWD, DIALOG
@@ -369,6 +369,10 @@ BEGIN
IDD_OPT_GPG, DIALOG
BEGIN
END
+
+ IDD_OPT_GPG_BIN, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED