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/Boltun/src/boltun.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'plugins/Boltun/src/boltun.cpp') diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 381b057440..bf3ea229f1 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -545,25 +545,20 @@ static INT_PTR ContactClickStartChatting(WPARAM hContact, LPARAM) static int MessagePrebuild(WPARAM hContact, LPARAM) { - CLISTMENUITEM clmi = { 0 }; - if (!blInit || (db_get_b(hContact, "CList", "NotOnList", 0) == 1)) { - clmi.flags = CMIM_FLAGS | CMIF_GRAYED; - - Menu_ModifyItem(hMenuItemAutoChat, &clmi); - Menu_ModifyItem(hMenuItemNotToChat, &clmi); + Menu_ModifyItem(hMenuItemAutoChat, NULL, INVALID_HANDLE_VALUE, CMIF_GRAYED); + Menu_ModifyItem(hMenuItemNotToChat, NULL, INVALID_HANDLE_VALUE, CMIF_GRAYED); } else { - BOOL boltunautochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE); - BOOL boltunnottochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE); - - clmi.flags = CMIM_FLAGS | CMIM_ICON | (boltunautochat ? CMIF_CHECKED : 0); - clmi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE((boltunautochat ? IDI_TICK : IDI_NOTICK))); - Menu_ModifyItem(hMenuItemAutoChat, &clmi); + if (db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE)) + Menu_ModifyItem(hMenuItemAutoChat, NULL, Skin_LoadIcon(SKINICON_OTHER_TICK), CMIF_CHECKED); + else + Menu_ModifyItem(hMenuItemAutoChat, NULL, Skin_LoadIcon(SKINICON_OTHER_NOTICK), 0); - clmi.flags = CMIM_FLAGS | CMIM_ICON | (boltunnottochat ? CMIF_CHECKED : 0); - clmi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE((boltunnottochat ? IDI_TICK : IDI_NOTICK))); - Menu_ModifyItem(hMenuItemNotToChat, &clmi); + if (db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE)) + Menu_ModifyItem(hMenuItemNotToChat, NULL, Skin_LoadIcon(SKINICON_OTHER_TICK), CMIF_CHECKED); + else + Menu_ModifyItem(hMenuItemNotToChat, NULL, Skin_LoadIcon(SKINICON_OTHER_NOTICK), 0); } return 0; } -- cgit v1.2.3