summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.cpp25
-rw-r--r--new_gpg.rc49
-rw-r--r--new_gpg.vcxproj2
-rw-r--r--options.cpp18
4 files changed, 55 insertions, 39 deletions
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<<time_str()<<": GPG execution timed out, aborted\n";
break;
}
diff --git a/new_gpg.rc b/new_gpg.rc
index b0c87ab..51c2747 100644
--- a/new_gpg.rc
+++ b/new_gpg.rc
@@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
+// Русский (Россия) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
@@ -56,11 +56,11 @@ CAPTION "Load Public GPG key"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "ОК",ID_OK,7,169,50,14
- PUSHBUTTON "Load from file",ID_LOAD_FROM_FILE,277,169,54,14
+ PUSHBUTTON "Load from file",ID_LOAD_FROM_FILE,273,169,58,14
EDITTEXT IDC_PUBLIC_KEY_EDIT,7,7,324,134,ES_MULTILINE | WS_VSCROLL,WS_EX_STATICEDGE
- PUSHBUTTON "Select existing",IDC_SELECT_EXISTING,146,169,50,14
+ PUSHBUTTON "Select existing",IDC_SELECT_EXISTING,136,169,68,14
CONTROL "Turn on encryption",IDC_ENABLE_ENCRYPTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,143,196,10
- PUSHBUTTON "Import key from keyserver",IDC_IMPORT,231,152,97,14,WS_DISABLED
+ PUSHBUTTON "Import key from keyserver",IDC_IMPORT,205,152,123,14,WS_DISABLED
END
IDD_FIRST_RUN DIALOGEX 0, 0, 291, 205
@@ -70,12 +70,12 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "ОК",ID_OK,12,184,50,14,WS_DISABLED
CONTROL "",IDC_KEY_LIST,"SysListView32",LVS_REPORT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,23,277,105
- PUSHBUTTON "Generate key",IDC_GENERATE_KEY,11,131,58,14
+ PUSHBUTTON "Generate key",IDC_GENERATE_KEY,8,131,74,14
LTEXT "Select key for use",IDC_STATIC,16,12,186,8
EDITTEXT IDC_KEY_PASSWORD,94,147,77,14,ES_PASSWORD | ES_AUTOHSCROLL
RTEXT "Key password:",IDC_STATIC,12,149,76,8
- PUSHBUTTON "Load other",IDC_OTHER,73,131,56,14
- PUSHBUTTON "Delete key",IDC_DELETE_KEY,132,131,56,14
+ PUSHBUTTON "Load other",IDC_OTHER,83,131,64,14
+ PUSHBUTTON "Delete key",IDC_DELETE_KEY,149,131,70,14
PUSHBUTTON "Generate and use random key",IDC_GENERATE_RANDOM,99,163,118,14
END
@@ -112,8 +112,8 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPT
CAPTION "Key Generation dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "ОК",IDOK,7,145,50,14
- PUSHBUTTON "Отмена",IDCANCEL,152,145,50,14
+ DEFPUSHBUTTON "OK",IDOK,7,145,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,152,145,50,14
COMBOBOX IDC_KEY_TYPE,65,14,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP
LTEXT "Key type:",IDC_STATIC,8,16,32,8
LTEXT "Key length:",IDC_STATIC,7,32,38,8
@@ -127,9 +127,9 @@ BEGIN
EDITTEXT IDC_KEY_REAL_NAME,65,61,55,14,ES_AUTOHSCROLL | WS_GROUP
EDITTEXT IDC_KEY_COMMENT,65,91,55,14,ES_AUTOHSCROLL | WS_GROUP
EDITTEXT IDC_KEY_EXPIRE_DATE,65,106,55,14,ES_AUTOHSCROLL | ES_NUMBER | WS_GROUP
- LTEXT "ex.: 2010-08-15",IDC_STATIC,127,108,54,8
+ LTEXT "ex.: 2010-08-15",IDC_STATIC,127,108,75,8
EDITTEXT IDC_KEY_LENGTH,65,30,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_GROUP
- LTEXT "From 1024 to 4096",IDC_STATIC,113,33,62,8
+ LTEXT "From 1024 to 4096",IDC_STATIC,113,33,89,8
LTEXT "It can take a long time, be patient",IDC_STATIC,15,132,164,8
LTEXT "0 - does not expire",IDC_STATIC,67,122,62,8
END
@@ -292,12 +292,12 @@ BEGIN
END
END
-#endif // Russian (Russia) resources
+#endif // Русский (Россия) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
+// Английский (США) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
@@ -314,8 +314,8 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
CONTROL "",IDC_USERLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,17,272,112
CTEXT "Userlist:",IDC_STATIC,25,7,201,8
- PUSHBUTTON "Export PubKey",IDC_SAVE_KEY_BUTTON,8,135,66,14
- PUSHBUTTON "Delete key",IDC_DELETE_KEY_BUTTON,78,135,70,14
+ PUSHBUTTON "Export PubKey",IDC_SAVE_KEY_BUTTON,8,135,75,14
+ PUSHBUTTON "Delete key",IDC_DELETE_KEY_BUTTON,90,135,70,14
PUSHBUTTON "Select own key",IDC_SELECT_KEY,170,193,109,14
CONTROL "Turn on debug log",IDC_DEBUG_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,181,159,89,10
EDITTEXT IDC_LOG_FILE_EDIT,11,157,98,14,ES_AUTOHSCROLL
@@ -324,7 +324,7 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,175,251,10
LTEXT "Current key",IDC_CURRENT_KEY,48,196,116,8
CONTROL "Encrypt file transfers",IDC_FILE_TRANSFERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,185,137,10
- CONTROL "Automatic key exchange",IDC_AUTO_EXCHANGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,137,117,10
+ CONTROL "Automatic key exchange",IDC_AUTO_EXCHANGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,163,137,111,10
END
IDD_OPT_GPG_BIN DIALOGEX 0, 0, 282, 214
@@ -357,7 +357,22 @@ BEGIN
RTEXT "Close:",IDC_STATIC,127,49,23,8
END
-#endif // English (United States) resources
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPT_GPG, DIALOG
+ BEGIN
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // Английский (США) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/new_gpg.vcxproj b/new_gpg.vcxproj
index c156164..3a81c15 100644
--- a/new_gpg.vcxproj
+++ b/new_gpg.vcxproj
@@ -499,7 +499,7 @@
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies) libboost_thread-vc100-mt-sgd-1_46_1.lib</AdditionalDependencies>
+ <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies) libboost_thread-vc100-mt-sgd-1_47.lib</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>e:\temp\windows\libs\Boost\lib-debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
diff --git a/options.cpp b/options.cpp
index c9b9de7..7eafe97 100644
--- a/options.cpp
+++ b/options.cpp
@@ -100,31 +100,31 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- col.pszText = _T("Contact");
+ col.pszText = TranslateW(_T("Contact"));
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.fmt = LVCFMT_LEFT;
col.cx = 60;
ListView_InsertColumn(hwndList, 0, &col);
ZeroMemory(&col,sizeof(col));
- col.pszText = _T("Key ID");
+ col.pszText = TranslateW(_T("Key ID"));
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.fmt = LVCFMT_LEFT;
col.cx = 50;
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 = 50;
ListView_InsertColumn(hwndList, 2, &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 = 50;
ListView_InsertColumn(hwndList, 3, &col);
ZeroMemory(&col,sizeof(col));
- col.pszText = _T("Protocol");
+ col.pszText = TranslateW(_T("Protocol"));
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.fmt = LVCFMT_LEFT;
col.cx = 60;
@@ -180,7 +180,7 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(GetDlgItem(hwndDlg, IDC_JABBER_API), bIsMiranda09);
EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), (bIsMiranda09 && bJabberAPI));
{
- string keyinfo = "Current private key id: ";
+ string keyinfo = Translate("Current private key id: ");
char *keyid = UniGetContactSettingUtf(NULL, szGPGModuleName, "KeyID", "");
keyinfo += (strlen(keyid) > 0)?keyid:"not set";
mir_free(keyid);
@@ -651,7 +651,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
hcnt = metaGetMostOnline(hcnt);
TranslateDialogDefault(hwndDlg);
{
- string msg = "Load Public GPG Key for ";
+ string msg = Translate("Load Public GPG Key for ");
msg += (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hcnt, 0);
SetWindowTextA(hwndDlg, msg.c_str());
}
@@ -662,10 +662,10 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_ENCRYPTION), 0);
}
if(isContactSecured(hcnt))
- SetDlgItemText(hwndDlg, IDC_ENABLE_ENCRYPTION, _T("Turn off encryption"));
+ SetDlgItemText(hwndDlg, IDC_ENABLE_ENCRYPTION, TranslateW(_T("Turn off encryption")));
else
{
- SetDlgItemText(hwndDlg, IDC_ENABLE_ENCRYPTION, _T("Turn on encryption"));
+ SetDlgItemText(hwndDlg, IDC_ENABLE_ENCRYPTION, TranslateW(_T("Turn on encryption")));
CheckDlgButton(hwndDlg, IDC_ENABLE_ENCRYPTION, 1);
}
if(hcnt)