diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
commit | 88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch) | |
tree | b3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /plugins/Db3x_mmap | |
parent | 9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff) |
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap')
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.h | 2 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/ui.cpp | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index 509f8209e4..ff155a17a9 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -198,7 +198,7 @@ struct CDb3Mmap : public MIDatabase, public MIDatabaseChecker, public MZeroedObj int PrepareCheck(int*);
- __forceinline LPSTR GetMenuTitle() const { return m_bUsesPassword ? LPGEN("Change/remove password") : LPGEN("Set password"); }
+ __forceinline LPTSTR GetMenuTitle() const { return m_bUsesPassword ? LPGENT("Change/remove password") : LPGENT("Set password"); }
void DatabaseCorruption(TCHAR *text);
void WriteSignature(DBSignature&);
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 8e9f9d2d40..144b1d275e 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -299,11 +299,7 @@ static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM) void CDb3Mmap::UpdateMenuItem()
{
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_NAME;
- mi.icolibItem = iconList[1].hIcolib;
- mi.pszName = GetMenuTitle();
- Menu_ModifyItem(hSetPwdMenu, &mi);
+ Menu_ModifyItem(hSetPwdMenu, GetMenuTitle(), iconList[1].hIcolib);
}
static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
@@ -316,14 +312,14 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM) // main menu item
CLISTMENUITEM mi = { 0 };
- mi.pszName = LPGEN("Database");
+ mi.ptszName = LPGENT("Database");
mi.position = 500000000;
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.icolibItem = iconList[1].hIcolib;
- mi.pszName = db->GetMenuTitle();
+ mi.ptszName = db->GetMenuTitle();
mi.hParentMenu = hMenuRoot;
mi.pszService = MS_DB_CHANGEPASSWORD;
hSetPwdMenu = Menu_AddMainMenuItem(&mi);
|