summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-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 "));