summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AvatarHistory/src/options.cpp5
-rw-r--r--plugins/ListeningTo/src/options.cpp20
-rw-r--r--plugins/QuickContacts/src/options.cpp4
-rw-r--r--plugins/SpellChecker/src/options.cpp198
-rw-r--r--plugins/VoiceService/src/options.cpp2
5 files changed, 123 insertions, 106 deletions
diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp
index 5bdca65851..0e14643672 100644
--- a/plugins/AvatarHistory/src/options.cpp
+++ b/plugins/AvatarHistory/src/options.cpp
@@ -50,6 +50,9 @@ static OptPageControl popupsControls[] = {
static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ if (msg == WM_INITDIALOG)
+ TranslateDialogDefault(hwndDlg);
+
return SaveOptsDlgProc(optionsControls, _countof(optionsControls), MODULENAME, hwndDlg, msg, wParam, lParam);
}
@@ -89,6 +92,8 @@ static INT_PTR CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
{
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+
SendDlgItemMessage(hwndDlg, IDC_RIGHT_ACTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Do nothing"));
SendDlgItemMessage(hwndDlg, IDC_RIGHT_ACTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Close popup"));
SendDlgItemMessage(hwndDlg, IDC_RIGHT_ACTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Show avatar history"));
diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp
index 36868a5bb9..75e7d207f8 100644
--- a/plugins/ListeningTo/src/options.cpp
+++ b/plugins/ListeningTo/src/options.cpp
@@ -170,6 +170,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+
if (hExtraIcon != nullptr) {
ShowWindow(GetDlgItem(hwndDlg, IDC_SHOW_ADV_ICON), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_ADV_ICON), SW_HIDE);
@@ -191,14 +193,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return TRUE;
case WM_NOTIFY:
- {
- LPNMHDR lpnmhdr = (LPNMHDR)lParam;
- if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY) {
- RebuildMenu();
- StartTimer();
+ {
+ LPNMHDR lpnmhdr = (LPNMHDR)lParam;
+ if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY) {
+ RebuildMenu();
+ StartTimer();
+ }
}
- }
- break;
+ break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
@@ -252,6 +254,7 @@ static INT_PTR CALLBACK PlayersDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
PlayersEnableDisableCtrls(hwndDlg);
break;
@@ -276,5 +279,8 @@ static INT_PTR CALLBACK PlayersDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
static INT_PTR CALLBACK FormatDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ if (msg == WM_INITDIALOG)
+ TranslateDialogDefault(hwndDlg);
+
return SaveOptsDlgProc(formatControls, _countof(formatControls), MODULENAME, hwndDlg, msg, wParam, lParam);
}
diff --git a/plugins/QuickContacts/src/options.cpp b/plugins/QuickContacts/src/options.cpp
index 8a5e486d86..0bfac965fb 100644
--- a/plugins/QuickContacts/src/options.cpp
+++ b/plugins/QuickContacts/src/options.cpp
@@ -41,7 +41,8 @@ void LoadOptions()
// Options page
-static OptPageControl controls[] = {
+static OptPageControl controls[] =
+{
{ nullptr, CONTROL_CHECKBOX, IDC_LASTSENTTO, "EnableLastSentTo", (uint8_t)TRUE },
{ nullptr, CONTROL_RADIO, IDC_GLOBAL, "MsgTypeRec", (uint16_t)TYPE_GLOBAL, TYPE_GLOBAL },
{ nullptr, CONTROL_RADIO, IDC_LOCAL, "MsgTypeRec", (uint16_t)TYPE_GLOBAL, TYPE_LOCAL },
@@ -60,6 +61,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
{
BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_LASTSENTTO);
EnableWindow(GetDlgItem(hwndDlg, IDC_GLOBAL), enabled);
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp
index dae8b89ae8..c034205fda 100644
--- a/plugins/SpellChecker/src/options.cpp
+++ b/plugins/SpellChecker/src/options.cpp
@@ -162,26 +162,27 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
switch (msg) {
case WM_INITDIALOG:
- {
- int sel = -1;
- for (int i = 0; i < languages.getCount(); i++) {
- SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LPARAM)languages[i]->full_name);
- SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (LPARAM)languages[i]);
+ TranslateDialogDefault(hwndDlg);
+ {
+ int sel = -1;
+ for (int i = 0; i < languages.getCount(); i++) {
+ SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LPARAM)languages[i]->full_name);
+ SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (LPARAM)languages[i]);
- if (!mir_wstrcmp(opts.default_language, languages[i]->language))
- sel = i;
+ if (!mir_wstrcmp(opts.default_language, languages[i]->language))
+ sel = i;
+ }
+ SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0);
+
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Line"));
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dotted"));
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dash"));
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dash dot"));
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dash dot dot"));
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Wave"));
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Thick"));
}
- SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0);
-
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Line"));
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dotted"));
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dash"));
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dash dot"));
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Dash dot dot"));
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Wave"));
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Thick"));
- }
- break;
+ break;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_GETMORE)
@@ -195,31 +196,31 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
break;
case WM_NOTIFY:
- {
- LPNMHDR lpnmhdr = (LPNMHDR)lParam;
- if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) {
- int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0);
- if (sel >= languages.getCount())
- sel = 0;
- g_plugin.setWString("DefaultLanguage",
- (wchar_t *)languages[sel]->language);
- mir_wstrcpy(opts.default_language, languages[sel]->language);
+ {
+ LPNMHDR lpnmhdr = (LPNMHDR)lParam;
+ if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) {
+ int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0);
+ if (sel >= languages.getCount())
+ sel = 0;
+ g_plugin.setWString("DefaultLanguage",
+ (wchar_t *)languages[sel]->language);
+ mir_wstrcpy(opts.default_language, languages[sel]->language);
+ }
}
- }
- break;
+ break;
case WM_DRAWITEM:
- {
- LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam;
- if (lpdis->CtlID != IDC_DEF_LANG)
- break;
- if (lpdis->itemID == -1)
- break;
+ {
+ LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam;
+ if (lpdis->CtlID != IDC_DEF_LANG)
+ break;
+ if (lpdis->itemID == -1)
+ break;
- Dictionary *dict = (Dictionary *)lpdis->itemData;
- DrawItem(lpdis, dict);
- }
- return TRUE;
+ Dictionary *dict = (Dictionary *)lpdis->itemData;
+ DrawItem(lpdis, dict);
+ }
+ return TRUE;
case WM_MEASUREITEM:
LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam;
@@ -358,37 +359,38 @@ static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
{
switch (msg) {
case WM_INITDIALOG:
- {
- BOOL ret = SaveOptsDlgProc(autoReplaceControls, _countof(autoReplaceControls), MODULENAME, hwndDlg, msg, wParam, lParam);
+ {
+ TranslateDialogDefault(hwndDlg);
+ BOOL ret = SaveOptsDlgProc(autoReplaceControls, _countof(autoReplaceControls), MODULENAME, hwndDlg, msg, wParam, lParam);
- int sel = -1;
- for (int i = 0; i < languages.getCount(); i++) {
- Dictionary *p = languages[i];
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)p->full_name);
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (LPARAM)new AutoreplaceData(p));
+ int sel = -1;
+ for (int i = 0; i < languages.getCount(); i++) {
+ Dictionary *p = languages[i];
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)p->full_name);
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (LPARAM)new AutoreplaceData(p));
- if (!mir_wstrcmp(opts.default_language, p->language))
- sel = i;
- }
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0);
+ if (!mir_wstrcmp(opts.default_language, p->language))
+ sel = i;
+ }
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0);
- HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS);
+ HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS);
- ListView_SetExtendedListViewStyle(hList, ListView_GetExtendedListViewStyle(hList) | LVS_EX_FULLROWSELECT);
+ ListView_SetExtendedListViewStyle(hList, ListView_GetExtendedListViewStyle(hList) | LVS_EX_FULLROWSELECT);
- LVCOLUMN col = { 0 };
- col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
- col.fmt = LVCFMT_LEFT;
- col.cx = 175;
- col.pszText = TranslateT("Wrong word");
- ListView_InsertColumn(hList, 0, &col);
+ LVCOLUMN col = { 0 };
+ col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
+ col.fmt = LVCFMT_LEFT;
+ col.cx = 175;
+ col.pszText = TranslateT("Wrong word");
+ ListView_InsertColumn(hList, 0, &col);
- col.pszText = TranslateT("Correction");
- ListView_InsertColumn(hList, 1, &col);
+ col.pszText = TranslateT("Correction");
+ ListView_InsertColumn(hList, 1, &col);
- LoadReplacements(hwndDlg);
- return ret;
- }
+ LoadReplacements(hwndDlg);
+ return ret;
+ }
case WM_COMMAND:
if (LOWORD(wParam) == IDC_LANGUAGE && HIWORD(wParam) == CBN_SELCHANGE)
@@ -436,48 +438,48 @@ static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
break;
case WM_NOTIFY:
- {
- LPNMHDR lpnmhdr = (LPNMHDR)lParam;
- if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) {
- for (int i = 0; i < languages.getCount(); i++) {
- AutoreplaceData *data = (AutoreplaceData *)SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0);
- if (data->changed) {
- data->dict->autoReplace->setMap(data->autoReplaceMap);
- data->changed = FALSE;
+ {
+ LPNMHDR lpnmhdr = (LPNMHDR)lParam;
+ if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) {
+ for (int i = 0; i < languages.getCount(); i++) {
+ AutoreplaceData *data = (AutoreplaceData *)SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0);
+ if (data->changed) {
+ data->dict->autoReplace->setMap(data->autoReplaceMap);
+ data->changed = FALSE;
+ }
}
}
- }
- else if (lpnmhdr->idFrom == IDC_REPLACEMENTS) {
- switch (lpnmhdr->code) {
- case LVN_ITEMCHANGED:
- case NM_CLICK:
- EnableDisableCtrls(hwndDlg);
- break;
-
- case NM_DBLCLK:
- LPNMITEMACTIVATE lpnmitem = (LPNMITEMACTIVATE)lParam;
- if (lpnmitem->iItem >= 0)
- ShowAddReplacement(hwndDlg, lpnmitem->iItem);
- break;
+ else if (lpnmhdr->idFrom == IDC_REPLACEMENTS) {
+ switch (lpnmhdr->code) {
+ case LVN_ITEMCHANGED:
+ case NM_CLICK:
+ EnableDisableCtrls(hwndDlg);
+ break;
+
+ case NM_DBLCLK:
+ LPNMITEMACTIVATE lpnmitem = (LPNMITEMACTIVATE)lParam;
+ if (lpnmitem->iItem >= 0)
+ ShowAddReplacement(hwndDlg, lpnmitem->iItem);
+ break;
+ }
}
+ else if (lpnmhdr->idFrom == IDC_AUTO_USER)
+ EnableDisableCtrls(hwndDlg);
}
- else if (lpnmhdr->idFrom == IDC_AUTO_USER)
- EnableDisableCtrls(hwndDlg);
- }
- break;
+ break;
case WM_DRAWITEM:
- {
- LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam;
- if (lpdis->CtlID != IDC_LANGUAGE)
- break;
- if (lpdis->itemID == -1)
- break;
+ {
+ LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam;
+ if (lpdis->CtlID != IDC_LANGUAGE)
+ break;
+ if (lpdis->itemID == -1)
+ break;
- AutoreplaceData *data = (AutoreplaceData *)lpdis->itemData;
- DrawItem(lpdis, data->dict);
- }
- return TRUE;
+ AutoreplaceData *data = (AutoreplaceData *)lpdis->itemData;
+ DrawItem(lpdis, data->dict);
+ }
+ return TRUE;
case WM_MEASUREITEM:
LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam;
diff --git a/plugins/VoiceService/src/options.cpp b/plugins/VoiceService/src/options.cpp
index 729b6bfa24..4038a2e2b2 100644
--- a/plugins/VoiceService/src/options.cpp
+++ b/plugins/VoiceService/src/options.cpp
@@ -85,6 +85,8 @@ static INT_PTR CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+
hwndCombo = GetDlgItem(hwndDlg, IDC_RIGHT_ACTION);
ComboBox_AddString(hwndCombo, TranslateT("Do nothing"));
ComboBox_AddString(hwndCombo, TranslateT("Close popup"));