summaryrefslogtreecommitdiff
path: root/src/modules/langpack
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 21:45:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 21:45:34 +0000
commit322628ed561643404f8ecb123d054bbd677288bb (patch)
tree406d2ea32e4ac5267cb7dfa8b196f44615af4aa8 /src/modules/langpack
parent24762a4ffa51b4a392fa5aebe979df675b06335c (diff)
minor menu cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@420 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/langpack')
-rw-r--r--src/modules/langpack/lpservices.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/langpack/lpservices.cpp b/src/modules/langpack/lpservices.cpp
index 0de43ecb6a..4cb0c597bb 100644
--- a/src/modules/langpack/lpservices.cpp
+++ b/src/modules/langpack/lpservices.cpp
@@ -38,18 +38,23 @@ static INT_PTR TranslateString(WPARAM wParam, LPARAM lParam)
return (INT_PTR)LangPackTranslateString( LangPackLookupUuid(wParam), (const char *)lParam, (wParam & LANG_UNICODE) ? 1 : 0);
}
+TCHAR* LangPackTranslateStringT(int hLangpack, const TCHAR* tszEnglish)
+{
+ LangPackMuuid* pUuid = (hLangpack) ? LangPackLookupUuid(hLangpack) : 0;
+ return (TCHAR*)LangPackTranslateString(pUuid, (LPCSTR)tszEnglish, 1);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR TranslateMenu(WPARAM wParam, LPARAM lParam)
{
- HMENU hMenu = ( HMENU )wParam;
- int i;
- MENUITEMINFO mii;
- TCHAR str[256];
+ HMENU hMenu = ( HMENU )wParam;
LangPackMuuid* uuid = LangPackLookupUuid( lParam );
+ MENUITEMINFO mii;
mii.cbSize = MENUITEMINFO_V4_SIZE;
- for ( i = GetMenuItemCount( hMenu )-1; i >= 0; i--) {
+ for (int i = GetMenuItemCount( hMenu )-1; i >= 0; i--) {
+ TCHAR str[256];
mii.fMask = MIIM_TYPE|MIIM_SUBMENU;
mii.dwTypeData = ( TCHAR* )str;
mii.cch = SIZEOF(str);