diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2012-10-05 05:58:08 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2012-10-05 05:58:08 +0000 |
commit | 6a1066dcc71002eae9a3576534f8a806ee5bd75b (patch) | |
tree | c23f9e71d05e2567ed93db2bc66dd6d695057fec /plugins/New_GPG/src/main.cpp | |
parent | 80c1341499556e15f55929202ac3596b354ff7f0 (diff) |
fixed ui logic bug
git-svn-id: http://svn.miranda-ng.org/main/trunk@1784 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/main.cpp')
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 0908fc9061..056b3594ed 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -239,29 +239,14 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR else { char setting[64]; - PROTOACCOUNT *acc = (PROTOACCOUNT*)CallService(MS_PROTO_GETCONTACTBASEPROTO, 0, (LPARAM)buf); - std::string acc_str; - if(acc) - { - acc_str = toUTF8(acc->tszAccountName); - acc_str += "("; - acc_str += acc->szModuleName; - acc_str += ")" ; + std::string acc_str = buf; acc_str += "_GPGPubKey"; DBWriteContactSettingString(NULL, szGPGModuleName, acc_str.c_str(), out.c_str()); - acc_str = toUTF8(acc->tszAccountName); - acc_str += "("; - acc_str += acc->szModuleName; - acc_str += ")" ; acc_str += "_KeyMainName"; DBWriteContactSettingTString(NULL, szGPGModuleName, acc_str.c_str(), name); - acc_str = toUTF8(acc->tszAccountName); - acc_str += "("; - acc_str += acc->szModuleName; - acc_str += ")" ; + acc_str = buf; acc_str += "_KeyID"; DBWriteContactSettingTString(NULL, szGPGModuleName, acc_str.c_str(), fp); - } } } TCHAR passwd[64]; @@ -645,21 +630,12 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR string keyinfo = Translate("key id"); keyinfo += ": "; char setting[64]; - PROTOACCOUNT *acc = (PROTOACCOUNT*)CallService(MS_PROTO_GETCONTACTBASEPROTO, 0, (LPARAM)buf); - std::string acc_str; - if(acc) - { - acc_str = toUTF8(acc->tszAccountName); - acc_str += "("; - acc_str += acc->szModuleName; - acc_str += ")" ; - acc_str += "_KeyID"; - char *keyid = UniGetContactSettingUtf(NULL, szGPGModuleName, acc_str.c_str(), ""); - keyinfo += (strlen(keyid) > 0)?keyid:Translate("not set"); - mir_free(keyid); - SetDlgItemTextA(hwndDlg, IDC_KEY_ID, keyinfo.c_str()); - } - + std::string acc_str= buf; + acc_str += "_KeyID"; + char *keyid = UniGetContactSettingUtf(NULL, szGPGModuleName, acc_str.c_str(), ""); + keyinfo += (strlen(keyid) > 0)?keyid:Translate("not set"); + mir_free(keyid); + SetDlgItemTextA(hwndDlg, IDC_KEY_ID, keyinfo.c_str()); } } break; |