summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-20 18:01:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-20 18:01:28 +0000
commit0308f566ea2232525f3dd53995050b78824521cd (patch)
tree247759687fd438e1bc97c9f308232f5dfd1a0fd1 /src
parente54a5dbe7727ef0de01172b25eff813e45bf6107 (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')
-rw-r--r--src/modules/clist/genmenu.cpp11
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);
}