summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-06-02 14:54:56 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-06-02 14:54:56 +0300
commit0711166b41c6e4f0b788ab34ef15289e98e46a31 (patch)
tree399096310f33977cf36343e71a4a0d0016601c07
parentdd580e5cae07351821fa52c24fe7ac254bc8004f (diff)
fixed "accept and turn on encryption" on key inport
-rwxr-xr-xmain.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index cbc36a9..5e4034e 100755
--- a/main.cpp
+++ b/main.cpp
@@ -989,7 +989,7 @@ static BOOL CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam,
{
extern HANDLE new_key_hcnt;
extern boost::mutex new_key_hcnt_mutex;
- HANDLE hContact = INVALID_HANDLE_VALUE;
+ static HANDLE hContact = INVALID_HANDLE_VALUE;
void ImportKey();
TCHAR *tmp = NULL;
switch (msg)
@@ -1001,9 +1001,9 @@ static BOOL CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam,
SetWindowPos(hwndDlg, 0, new_key_rect.left, new_key_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW);
TranslateDialogDefault(hwndDlg);
TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));
- SetDlgItemText(hwndDlg, IDC_MESSAGE, (_tcslen(tmp) > 0)?TranslateT("There is existing key for contact, would you like to replace with new key ?"):TranslateT("New public key was received, do you want to import it?"));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, tmp[0]?TranslateT("There is existing key for contact, would you like to replace with new key ?"):TranslateT("New public key was received, do you want to import it?"));
EnableWindow(GetDlgItem(hwndDlg, IDC_IMPORT_AND_USE), DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0)?0:1);
- SetDlgItemText(hwndDlg, ID_IMPORT, (_tcslen(tmp) > 0)?TranslateT("Replace"):_T("Accept"));
+ SetDlgItemText(hwndDlg, ID_IMPORT, tmp[0]?TranslateT("Replace"):TranslateT("Accept"));
mir_free(tmp);
tmp = new TCHAR [256];
_tcscpy(tmp, TranslateT("Received key from "));