summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-12 19:58:37 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-12 19:58:37 +0300
commit82e4196bfcfe5fa976ef602f54fbaf82d3854f6d (patch)
tree8045756a9c048ffd1d08a311e560e19974390fe6 /main.cpp
parent5d7dc0a0e6021470eac321b7af090f01a7bfe82f (diff)
modified: main.cpp
modified: messages.cpp
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index 7d8ef1f..702a9b2 100644
--- a/main.cpp
+++ b/main.cpp
@@ -90,7 +90,8 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
TCHAR cmd[512];
_tcscpy(cmd, _T("--list-secret-keys"));
pxExecute(cmd, "", &out, &code);
- }
+ }
+ cp866_to_cp1251(&out);
while(p != string::npos)
{
if((p = out.find("sec ", p)) == string::npos)
@@ -112,11 +113,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
mir_free(tmp);
p = out.find("uid ", p);
p2 = out.find_first_not_of(" ", p+5);
- p = out.find(" ", p2);
+ p = out.find("<", p2);
tmp = mir_a2t(out.substr(p2,p-p2).c_str());
ListView_SetItemText(hwndList, iRow, 2, tmp);
mir_free(tmp);
- p = out.find("<", p) + 1;
+ p++;
p2 = out.find(">", p);
tmp = mir_a2t(out.substr(p,p2-p).c_str());
ListView_SetItemText(hwndList, iRow, 1, tmp);