From 88790eed4ffd9ca555c8f9b73cb014a93b57a34f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 22 Jun 2015 20:38:56 +0000 Subject: Menu_ModifyItem unbound from CLISTMENUITEM structure git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ClientChangeNotify/src/ClientChangeNotify.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'plugins/ClientChangeNotify/src') 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; } -- cgit v1.2.3