From 77664979ae7f2e534e31f66aa9286d874d9da2bc Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 1 Apr 2011 10:14:07 +0300 Subject: modified: gpg_wrapper.cpp modified: gpg_wrapper.h modified: main.cpp modified: messages.cpp modified: options.cpp modified: utilities.cpp --- main.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index cccb846..f2df7bb 100644 --- a/main.cpp +++ b/main.cpp @@ -95,6 +95,7 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM { gpg_thread.~thread(); TerminateProcess(params.hProcess, 1); + params.hProcess = NULL; debuglog< Date: Fri, 1 Apr 2011 10:26:04 +0300 Subject: modified: main.cpp --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index f2df7bb..601ebf1 100644 --- a/main.cpp +++ b/main.cpp @@ -1995,7 +1995,7 @@ void ImportKey() tmp = new char [output.substr(s,s2-s-1).length()+1]; strcpy(tmp, output.substr(s,s2-s-1).c_str()); mir_utf8decode(tmp, 0); - DBWriteContactSettingString(metaGetContact(hContact), szGPGModuleName, "KeyMainName", tmp); + DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "KeyMainName", tmp); mir_free(tmp); if((s = output.find(")", s2)) == string::npos) s = output.find(">", s2); -- cgit v1.2.3 From eacaecb90d386044d24f47606007a0d348e92ebb Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sat, 9 Apr 2011 21:53:35 +0300 Subject: Improved translation ability requested on forums --- main.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 601ebf1..7fdf27c 100644 --- a/main.cpp +++ b/main.cpp @@ -41,31 +41,32 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM { SetWindowPos(hwndDlg, 0, firstrun_rect.left, firstrun_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); + SetWindowText(hwndDlg, TranslateW(_T("Set own key"))); col.pszText = _T("Key ID"); col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 50; ListView_InsertColumn(hwndList, 0, &col); ZeroMemory(&col,sizeof(col)); - col.pszText = _T("Email"); + col.pszText = TranslateW(_T("Email")); col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; ListView_InsertColumn(hwndList, 1, &col); ZeroMemory(&col,sizeof(col)); - col.pszText = _T("Name"); + col.pszText = TranslateW(_T("Name")); col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 250; ListView_InsertColumn(hwndList, 2, &col); ZeroMemory(&col,sizeof(col)); - col.pszText = _T("Creation date"); + col.pszText = TranslateW(_T("Creation date")); col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; ListView_InsertColumn(hwndList, 3, &col); ZeroMemory(&col,sizeof(col)); - col.pszText = _T("Key length"); + col.pszText = TranslateW(_T("Key length")); col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; @@ -1071,6 +1072,7 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, { SetWindowPos(hwndDlg, 0, key_gen_rect.left, key_gen_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); + SetWindowText(hwndDlg, TranslateW(_T("Key Generation dialog"))); ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("RSA"), 0); ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("DSA"), 1); SendDlgItemMessage(hwndDlg, IDC_KEY_TYPE, CB_SETCURSEL, (WPARAM)1, 0); @@ -1096,7 +1098,7 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, if(_tcslen(tmp) < 3) { mir_free(tmp); - MessageBox(0, _T("You must set encryption algorythm first"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("You must set encryption algorythm first")), TranslateW(_T("Error")), MB_OK); break; } mir_free(tmp); @@ -1106,14 +1108,14 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, mir_free(tmp); if(length < 1024 || length > 4096) { - MessageBox(0, _T("Key length must be of length from 1024 to 4096 bits"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("Key length must be of length from 1024 to 4096 bits")), TranslateW(_T("Error")), MB_OK); break; } tmp = new TCHAR [12]; GetDlgItemText(hwndDlg, IDC_KEY_EXPIRE_DATE, tmp, 12); if(_tcslen(tmp) != 10 && tmp[0] != '0') { - MessageBox(0, _T("Invalid date"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("Invalid date")), TranslateW(_T("Error")), MB_OK); delete [] tmp; break; } @@ -1122,13 +1124,13 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, GetDlgItemText(hwndDlg, IDC_KEY_REAL_NAME, tmp, 128); if(_tcslen(tmp) < 5) { - MessageBox(0, _T("Name must contain at least 5 characters"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("Name must contain at least 5 characters")), TranslateW(_T("Error")), MB_OK); delete [] tmp; break; } else if (_tcschr(tmp, _T('(')) || _tcschr(tmp, _T(')'))) { - MessageBox(0, _T("Name cannot contain '(' or ')'"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("Name cannot contain '(' or ')'")), TranslateW(_T("Error")), MB_OK); delete [] tmp; break; } @@ -1137,7 +1139,7 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, GetDlgItemText(hwndDlg, IDC_KEY_EMAIL, tmp, 128); if((_tcslen(tmp)) < 5 || (!_tcschr(tmp, _T('@'))) || (!_tcschr(tmp, _T('.')))) { - MessageBox(0, _T("Invalid Email"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("Invalid Email")), TranslateW(_T("Error")), MB_OK); delete [] tmp; break; } @@ -1153,7 +1155,7 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, wfstream f(path.c_str(), std::ios::out); if(!f.is_open()) { - MessageBox(0, _T("Failed to open file"), _T("Error"), MB_OK); + MessageBox(0, TranslateW(_T("Failed to open file")), TranslateW(_T("Error")), MB_OK); break; } f<<"Key-Type: "; @@ -1251,7 +1253,6 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, gpg_thread.~thread(); TerminateProcess(params.hProcess, 1); params.hProcess = NULL; - MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK); debuglog<