diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-16 12:19:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-16 12:19:24 +0000 |
commit | ac7bf920f219a7aed7eb163c8b3195e66c12e4da (patch) | |
tree | e0ac11ce212c61ac5ebe0e90f32853f71ac44f96 /src/modules/clist/genmenu.cpp | |
parent | aafecc66f4056279e5ddccf7804b147b54167612 (diff) |
fix for menu items' translation in the editor
git-svn-id: http://svn.miranda-ng.org/main/trunk@445 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/genmenu.cpp')
-rw-r--r-- | src/modules/clist/genmenu.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index 2399286f72..59fe7a84b2 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -72,6 +72,14 @@ int GetMenuObjbyId( const int id ) return -1;
}
+LPTSTR GetMenuItemText(PMO_IntMenuItem pimi)
+{
+ if (pimi->mi.flags & CMIF_KEEPUNTRANSLATED)
+ return pimi->mi.ptszName;
+
+ return LangPackTranslateStringT(pimi->mi.hLangpack, pimi->mi.ptszName);
+}
+
PMO_IntMenuItem MO_RecursiveWalkMenu( PMO_IntMenuItem parent, pfnWalkFunc func, void* param )
{
if ( parent == NULL )
@@ -825,16 +833,14 @@ static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *l mii = *lpmii;
int count = GetMenuItemCount( hMenu );
- if (count != 0 && (count % 33 ) == 0)
- if ( pimi->mi.root != NULL ) {
- if ( !( mii.fMask & MIIM_FTYPE ))
- mii.fType = 0;
- mii.fMask |= MIIM_FTYPE;
- mii.fType |= MFT_MENUBARBREAK;
- }
+ if (count != 0 && (count % 33 ) == 0 && pimi->mi.root != NULL ) {
+ if ( !( mii.fMask & MIIM_FTYPE ))
+ mii.fType = 0;
+ mii.fMask |= MIIM_FTYPE;
+ mii.fType |= MFT_MENUBARBREAK;
+ }
- if ( !( pimi->mi.flags & CMIF_KEEPUNTRANSLATED))
- mii.dwTypeData = LangPackTranslateStringT(pimi->mi.hLangpack, mii.dwTypeData);
+ mii.dwTypeData = GetMenuItemText(pimi);
InsertMenuItem( hMenu, uItem, TRUE, &mii);
}
|