From b665a90f50f09435aef5bc3b5b9da710e4558690 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 16:54:27 +0000 Subject: various menu items quirks, simplifications & optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@4319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'plugins/BuddyExpectator/src/BuddyExpectator.cpp') diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index bdaff06159..d3a55b4afa 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -27,7 +27,7 @@ int hLangpack; DWORD timer_id = 0; HANDLE hContactReturnedAction, hContactStillAbsentAction, hMissYouAction, hMenuMissYouClick; -HANDLE hContactMenu; +HGENMENU hContactMenu; HICON hIcon; HANDLE hExtraIcon; @@ -453,20 +453,17 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) else mi.flags = CMIM_FLAGS; - if (db_get_b((HANDLE)wParam, MODULE_NAME, "MissYou", 0)) - { + if (db_get_b((HANDLE)wParam, MODULE_NAME, "MissYou", 0)) { mi.flags |= CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR; mi.ptszName = LPGENT("Disable Miss You"); mi.icolibItem = iconList[1].hIcolib; } - else - { + else { mi.flags |= CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR; mi.ptszName = LPGENT("Enable Miss You"); mi.icolibItem = iconList[2].hIcolib; } - - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenu, (LPARAM)&mi); + Menu_ModifyItem(hContactMenu, &mi); return 0; } -- cgit v1.2.3