summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-06-21 18:06:18 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-06-21 18:06:18 +0000
commit1cff03ea69bce85c652ac19d5cb059f12695509c (patch)
treed5d7e1ca82d4f709c6438e7af5697394d9c37ca8 /plugins
parent798a7bc2ee5f488d67831c11778f209bdadcba02 (diff)
custom translation for all menus
git-svn-id: http://svn.miranda-ng.org/main/trunk@515 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Alarms/frame.cpp2
-rw-r--r--plugins/ContactsPlus/receive.cpp2
-rw-r--r--plugins/ExtraIcons/options.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/linklist_dlg.c4
-rw-r--r--plugins/IEView/IEView.cpp10
-rw-r--r--plugins/NewAwaySysMod/MsgTree.cpp2
-rw-r--r--plugins/NewAwaySysMod/SetAwayMsg.cpp2
-rw-r--r--plugins/SRMM/msgdialog.c6
-rw-r--r--plugins/Scriver/chat/main.c2
-rw-r--r--plugins/SecureIM/options.cpp6
-rw-r--r--plugins/SimpleStatusMsg/msgbox.cpp2
-rw-r--r--plugins/Svc_crshdmp/ui.cpp2
12 files changed, 20 insertions, 22 deletions
diff --git a/plugins/Alarms/frame.cpp b/plugins/Alarms/frame.cpp
index cc36c3bc86..d51e021d4d 100644
--- a/plugins/Alarms/frame.cpp
+++ b/plugins/Alarms/frame.cpp
@@ -369,7 +369,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
DWORD item = SendMessage(hwnd_list, LB_ITEMFROMPOINT, 0, MAKELPARAM(pt.x, pt.y));
HMENU menu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_MENU1)), submenu = GetSubMenu(menu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)submenu,0);
+ TranslateMenu(submenu);
if (HIWORD(item) == 0) {
int sel = LOWORD(item);
diff --git a/plugins/ContactsPlus/receive.cpp b/plugins/ContactsPlus/receive.cpp
index 10a6a42e73..a480d3d990 100644
--- a/plugins/ContactsPlus/receive.cpp
+++ b/plugins/ContactsPlus/receive.cpp
@@ -190,7 +190,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
wndData->mhDbEvent = pcle->hDbEvent; /// initialized, pcle not needed anymore
wndData->mhListIcon = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLORDDB|ILC_MASK, 0, 1);
wndData->mhPopup = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTACTMENU));
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)wndData->mhPopup, 0);
+ TranslateMenu(wndData->mhPopup);
wndData->hHook = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_EVENTSENT);
char *szProto = GetContactProto(wndData->mhContact);
diff --git a/plugins/ExtraIcons/options.cpp b/plugins/ExtraIcons/options.cpp
index 411d3c59be..8308ac444c 100644
--- a/plugins/ExtraIcons/options.cpp
+++ b/plugins/ExtraIcons/options.cpp
@@ -438,7 +438,7 @@ static int ShowPopup(HWND hwndDlg, int popup)
HMENU menu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_OPT_POPUP));
HMENU submenu = GetSubMenu(menu, popup);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) submenu, 0);
+ TranslateMenu(submenu);
DWORD pos = GetMessagePos();
int ret = TrackPopupMenu(submenu, TPM_TOPALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_LEFTALIGN, LOWORD(pos),
diff --git a/plugins/HistoryLinkListPlus/linklist_dlg.c b/plugins/HistoryLinkListPlus/linklist_dlg.c
index 80d6b23f8f..6e26d8538d 100644
--- a/plugins/HistoryLinkListPlus/linklist_dlg.c
+++ b/plugins/HistoryLinkListPlus/linklist_dlg.c
@@ -68,7 +68,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
DlgParam = (DIALOGPARAM *)lParam;
TranslateDialogDefault(hDlg);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)listMenu, 0);
+ TranslateMenu(listMenu);
if ( DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00) == 0x00 )
hContact = NULL;
@@ -181,7 +181,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
if (mouseEvent == 0x01 )
EnableMenuItem(hSubMenu, IDM_SHOWMESSAGE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hSubMenu, 0);
+ TranslateMenu(hSubMenu);
link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&(pENLink->chrg)));
diff --git a/plugins/IEView/IEView.cpp b/plugins/IEView/IEView.cpp
index 2d43463612..9d698401e7 100644
--- a/plugins/IEView/IEView.cpp
+++ b/plugins/IEView/IEView.cpp
@@ -562,9 +562,8 @@ STDMETHODIMP IEView::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdTarge
{
return E_NOTIMPL;
/*
- HMENU hMenu;
- hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
- CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)hMenu,0);
+ HMENU hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
+ TranslateMenu(hMenu);
if (dwID == 6) { // anchor
EnableMenuItem(hMenu, ID_MENU_COPYLINK, MF_BYCOMMAND | MF_ENABLED);
} else if (dwID == 5) { // text select
@@ -594,9 +593,8 @@ STDMETHODIMP IEView::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdTarge
if (SUCCEEDED(pcmdTarget->QueryInterface(IID_IOleCommandTarget, (void**)&pOleCommandTarget))) {
if (SUCCEEDED(pOleCommandTarget->QueryInterface(IID_IOleWindow, (void**)&pOleWindow))) {
pOleWindow->GetWindow(&hSPWnd);
- HMENU hMenu;
- hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
- CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)hMenu,0);
+ HMENU hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
+ TranslateMenu(hMenu);
if (dwID == 5) { // anchor
EnableMenuItem(hMenu, ID_MENU_COPYLINK, MF_BYCOMMAND | MF_ENABLED);
} else if (dwID == 4) { // text select
diff --git a/plugins/NewAwaySysMod/MsgTree.cpp b/plugins/NewAwaySysMod/MsgTree.cpp
index ba84ba6f61..c04665d33f 100644
--- a/plugins/NewAwaySysMod/MsgTree.cpp
+++ b/plugins/NewAwaySysMod/MsgTree.cpp
@@ -448,7 +448,7 @@ static LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam,
}
_ASSERT(hMenu);
HMENU hPopupMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hPopupMenu, 0);
+ TranslateMenu(hPopupMenu);
ClientToScreen(hWnd, &ht.pt);
struct
{
diff --git a/plugins/NewAwaySysMod/SetAwayMsg.cpp b/plugins/NewAwaySysMod/SetAwayMsg.cpp
index a35db042a9..46748b991b 100644
--- a/plugins/NewAwaySysMod/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/SetAwayMsg.cpp
@@ -1362,7 +1362,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
HMENU hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_SAM_OPTIONS));
_ASSERT(hMenu);
HMENU hPopupMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hPopupMenu, 0);
+ TranslateMenu(hPopupMenu);
CheckMenuItem(hPopupMenu, IDM_SAM_OPTIONS_SHOWMSGTREE, MF_BYCOMMAND | (g_SetAwayMsgPage.GetValue(IDS_SAWAYMSG_SHOWMSGTREE) ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hPopupMenu, IDM_SAM_OPTIONS_SHOWCONTACTTREE, MF_BYCOMMAND | (g_SetAwayMsgPage.GetValue(IDS_SAWAYMSG_SHOWCONTACTTREE) ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hPopupMenu, IDM_SAM_OPTIONS_AUTOSAVEDLGSETTINGS, MF_BYCOMMAND | (g_SetAwayMsgPage.GetValue(IDS_SAWAYMSG_AUTOSAVEDLGSETTINGS) ? MF_CHECKED : MF_UNCHECKED));
diff --git a/plugins/SRMM/msgdialog.c b/plugins/SRMM/msgdialog.c
index a6dc2697c0..1e8849997a 100644
--- a/plugins/SRMM/msgdialog.c
+++ b/plugins/SRMM/msgdialog.c
@@ -432,7 +432,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
mwpd.hMenu = GetSubMenu(hMenu, 2);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)mwpd.hMenu, 0);
+ TranslateMenu(mwpd.hMenu);
SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
if (sel.cpMin == sel.cpMax)
@@ -1825,7 +1825,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
hSubMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hSubMenu, 0);
+ TranslateMenu(hSubMenu);
SendMessage(((NMHDR *) lParam)->hwndFrom, EM_EXGETSEL, 0, (LPARAM) & sel);
if (sel.cpMin == sel.cpMax)
EnableMenuItem(hSubMenu, IDM_COPY, MF_BYCOMMAND | MF_GRAYED);
@@ -1903,7 +1903,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
hSubMenu = GetSubMenu(hMenu, 1);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hSubMenu, 0);
+ TranslateMenu(hSubMenu);
pt.x = (short) LOWORD(((ENLINK *) lParam)->lParam);
pt.y = (short) HIWORD(((ENLINK *) lParam)->lParam);
ClientToScreen(((NMHDR *) lParam)->hwndFrom, &pt);
diff --git a/plugins/Scriver/chat/main.c b/plugins/Scriver/chat/main.c
index aa14d7f8df..ff2d980427 100644
--- a/plugins/Scriver/chat/main.c
+++ b/plugins/Scriver/chat/main.c
@@ -44,7 +44,7 @@ int Chat_Load()
{
InitializeCriticalSection(&cs);
g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU));
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) g_hMenu, 0);
+ TranslateMenu(g_hMenu);
HookEvents();
CreateServiceFunctions();
CreateHookableEvents();
diff --git a/plugins/SecureIM/options.cpp b/plugins/SecureIM/options.cpp
index 1925f19c09..d6cc1a70d6 100644
--- a/plugins/SecureIM/options.cpp
+++ b/plugins/SecureIM/options.cpp
@@ -531,7 +531,7 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR
}
if ( !hMenu )
hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDM_CLIST2));
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hMenu, 0);
+ TranslateMenu(hMenu);
CheckMenuItem(hMenu, ID_SIM_NATIVE+ptr->tmode, MF_CHECKED );
if ( !bPGP ) EnableMenuItem(hMenu, ID_SIM_PGP, MF_GRAYED );
if ( !bGPG ) EnableMenuItem(hMenu, ID_SIM_GPG, MF_GRAYED );
@@ -833,7 +833,7 @@ INT_PTR CALLBACK DlgProcOptionsPGP(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l
GetCursorPos(&p);
HMENU hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDM_CLIST));
CheckMenuItem(hMenu, ID_ENCRYPTION, MF_BYCOMMAND );
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hMenu, 0);
+ TranslateMenu(hMenu);
TrackPopupMenu(GetSubMenu(hMenu, 0), TPM_LEFTALIGN | TPM_TOPALIGN, p.x, p.y, 0, hDlg, 0);
DestroyMenu(hMenu);
} break;*/
@@ -1006,7 +1006,7 @@ INT_PTR CALLBACK DlgProcOptionsGPG(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l
GetCursorPos(&p);
HMENU hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDM_CLIST));
CheckMenuItem(hMenu, ID_ENCRYPTION, MF_BYCOMMAND );
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hMenu, 0);
+ TranslateMenu(hMenu);
TrackPopupMenu(GetSubMenu(hMenu, 0), TPM_LEFTALIGN | TPM_TOPALIGN, p.x, p.y, 0, hDlg, 0);
DestroyMenu(hMenu);
} break;*/
diff --git a/plugins/SimpleStatusMsg/msgbox.cpp b/plugins/SimpleStatusMsg/msgbox.cpp
index d2fd146baa..c74762e33e 100644
--- a/plugins/SimpleStatusMsg/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/msgbox.cpp
@@ -443,7 +443,7 @@ VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control)
HMENU hmenuTrackPopup = GetSubMenu(hmenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hmenuTrackPopup, 0);
+ TranslateMenu(hmenuTrackPopup);
ClientToScreen(hwnd, (LPPOINT) &pt);
diff --git a/plugins/Svc_crshdmp/ui.cpp b/plugins/Svc_crshdmp/ui.cpp
index 6aa37a72bd..00cf9c26cd 100644
--- a/plugins/Svc_crshdmp/ui.cpp
+++ b/plugins/Svc_crshdmp/ui.cpp
@@ -157,7 +157,7 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
HMENU hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
HMENU hSubMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hSubMenu, 0);
+ TranslateMenu(hSubMenu);
CHARRANGE sel;
SendMessage(hView, EM_EXGETSEL, 0, (LPARAM)&sel);