diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-12 19:58:37 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-12 19:58:37 +0300 |
commit | 82e4196bfcfe5fa976ef602f54fbaf82d3854f6d (patch) | |
tree | 8045756a9c048ffd1d08a311e560e19974390fe6 /main.cpp | |
parent | 5d7dc0a0e6021470eac321b7af090f01a7bfe82f (diff) |
modified: main.cpp
modified: messages.cpp
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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);
|