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/BasicHistory | |
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/BasicHistory')
-rw-r--r-- | plugins/BasicHistory/src/BasicHistory.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 4da30e3d49..0bb43e1036 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -119,8 +119,8 @@ void InitMenuItems() void InitTaskMenuItems()
{
if (Options::instance->taskOptions.size() > 0) {
- CLISTMENUITEM mi = { 0 };
if (hTaskMainMenu == NULL) {
+ CLISTMENUITEM mi = { 0 };
mi.position = 500060005;
mi.flags = CMIF_ROOTPOPUP;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
@@ -130,24 +130,15 @@ void InitTaskMenuItems() std::vector<TaskOptions>::iterator taskIt = Options::instance->taskOptions.begin();
std::vector<HGENMENU>::iterator it = taskMenus.begin();
- for (; it != taskMenus.end() && taskIt != Options::instance->taskOptions.end(); ++it, ++taskIt) {
- memset(&mi, 0, sizeof(mi));
- mi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.hParentMenu = hTaskMainMenu;
- mi.ptszName = (TCHAR*)taskIt->taskName.c_str();
- Menu_ModifyItem((HGENMENU)*it, &mi);
- }
+ for (; it != taskMenus.end() && taskIt != Options::instance->taskOptions.end(); ++it, ++taskIt)
+ Menu_ModifyItem(*it, taskIt->taskName.c_str());
- for (; it != taskMenus.end(); ++it) {
- memset(&mi, 0, sizeof(mi));
- mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | CMIF_HIDDEN;
- mi.hParentMenu = hTaskMainMenu;
- Menu_ModifyItem((HGENMENU)*it, &mi);
- }
+ for (; it != taskMenus.end(); ++it)
+ Menu_ShowItem(*it, false);
int pos = (int)taskMenus.size();
for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) {
- memset(&mi, 0, sizeof(mi));
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.hParentMenu = hTaskMainMenu;
@@ -157,11 +148,8 @@ void InitTaskMenuItems() taskMenus.push_back(menu);
}
}
- else if (hTaskMainMenu != NULL) {
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS | CMIF_ROOTPOPUP | CMIF_HIDDEN;
- Menu_ModifyItem(hTaskMainMenu, &mi);
- }
+ else if (hTaskMainMenu != NULL)
+ Menu_ShowItem(hTaskMainMenu, false);
}
IconItem iconList[] =
|