summaryrefslogtreecommitdiff
path: root/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
commit88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch)
treeb3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
parent9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (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/ClientChangeNotify/src/ClientChangeNotify.cpp')
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 7bbccfe061..5db1b10683 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -275,18 +275,10 @@ static int PrebuildMainMenu(WPARAM wParam, LPARAM lParam)
{
// we have to use ME_CLIST_PREBUILDMAINMENU instead of updating menu items only on settings change, because "popup_enabled" and "popup_disabled" icons are not always available yet in ModulesLoaded
if (bPopupExists) {
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_TCHAR | CMIM_NAME | CMIM_ICON;
- if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY)) {
- mi.ptszName = LPGENT("Disable c&lient change notification");
- mi.hIcon = IcoLib_GetIcon("popup_enabled");
- }
- else {
- mi.ptszName = LPGENT("Enable c&lient change notification");
- mi.hIcon = IcoLib_GetIcon("popup_disabled");
- }
- mi.ptszPopupName = LPGENT("Popups");
- Menu_ModifyItem(g_hTogglePopupsMenuItem, &mi);
+ if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
+ Menu_ModifyItem(g_hTogglePopupsMenuItem, LPGENT("Disable c&lient change notification"), IcoLib_GetIcon("popup_enabled"));
+ else
+ Menu_ModifyItem(g_hTogglePopupsMenuItem, LPGENT("Enable c&lient change notification"), IcoLib_GetIcon("popup_disabled"));
}
return 0;
}