diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-20 18:01:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-20 18:01:28 +0000 |
commit | 0308f566ea2232525f3dd53995050b78824521cd (patch) | |
tree | 247759687fd438e1bc97c9f308232f5dfd1a0fd1 /src/modules/clist | |
parent | e54a5dbe7727ef0de01172b25eff813e45bf6107 (diff) |
fix for the custom menu names
git-svn-id: http://svn.miranda-ng.org/main/trunk@1610 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/genmenu.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index 62749733d3..92da9dba13 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -76,7 +76,7 @@ LPTSTR GetMenuItemText(PMO_IntMenuItem pimi) {
if (pimi->mi.flags & CMIF_KEEPUNTRANSLATED)
return pimi->mi.ptszName;
-
+
return TranslateTH(pimi->mi.hLangpack, pimi->mi.ptszName);
}
@@ -823,7 +823,8 @@ static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *l mii.fType |= MFT_MENUBARBREAK;
}
- mii.dwTypeData = GetMenuItemText(pimi);
+ if (!pimi->CustomName)
+ mii.dwTypeData = GetMenuItemText(pimi);
InsertMenuItem(hMenu, uItem, TRUE, &mii);
}
@@ -923,10 +924,8 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para // mi.pszName
mir_snprintf(DBString, SIZEOF(DBString), "%s_name", menuItemName);
if ( !DBGetContactSettingTString(NULL, MenuNameItems, DBString, &dbv)) {
- if (_tcslen(dbv.ptszVal) > 0) {
- if (pmi->CustomName) mir_free(pmi->CustomName);
- pmi->CustomName = mir_tstrdup(dbv.ptszVal);
- }
+ if (_tcslen(dbv.ptszVal) > 0)
+ replaceStrT(pmi->CustomName, dbv.ptszVal);
DBFreeVariant(&dbv);
}
|