diff options
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 1 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 1 | ||||
-rw-r--r-- | src/modules/clist/genmenu.cpp | 23 | ||||
-rw-r--r-- | src/modules/clist/movetogroup.cpp | 2 |
4 files changed, 10 insertions, 17 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index debabd55a2..4222f2d6ed 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -1391,7 +1391,6 @@ void InitCustomMenus(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 0x7fffffff;
- mi.flags = CMIF_ICONFROMICOLIB;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_EXIT);
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index f99841a069..7b6e5f7db0 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -349,7 +349,6 @@ int LoadCLUIModule(void) 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_ICONFROMICOLIB;
CreateServiceFunction("CList/DeleteContactCommand", MenuItem_DeleteContact);
mi.position = 2000070000;
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index b7df40afcb..47909e8d1b 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -316,15 +316,16 @@ int MO_ModifyMenuItem(PMO_IntMenuItem menuHandle, PMO_MenuItem pmi) }
if (pmi->flags & CMIM_FLAGS) {
- oldflags = pimi->mi.flags & (CMIF_ROOTHANDLE | CMIF_ICONFROMICOLIB);
+ oldflags = (pimi->mi.flags & CMIF_ROOTHANDLE);
pimi->mi.flags = (pmi->flags & ~CMIM_ALL) | oldflags;
}
if ((pmi->flags & CMIM_ICON) && !bIconsDisabled) {
- if (pimi->mi.flags & CMIF_ICONFROMICOLIB) {
- HICON hIcon = IcoLib_GetIconByHandle(pmi->hIcolibItem, false);
+ HANDLE hIcolibItem = IcoLib_IsManaged(pmi->hIcon);
+ if (hIcolibItem) {
+ HICON hIcon = IcoLib_GetIconByHandle(hIcolibItem, false);
if (hIcon != NULL) {
- pimi->hIcolibItem = pmi->hIcolibItem;
+ pimi->hIcolibItem = hIcolibItem;
pimi->iconId = ImageList_ReplaceIcon(pimi->parent->m_hMenuIcons, pimi->iconId, hIcon);
IcoLib_ReleaseIcon(hIcon, 0);
}
@@ -648,20 +649,14 @@ PMO_IntMenuItem MO_AddNewMenuItem(HANDLE menuobjecthandle, PMO_MenuItem pmi) p->mi.ptszName = mir_a2u(pmi->pszName);
if (pmi->hIcon != NULL && !bIconsDisabled) {
- if (pmi->flags & CMIF_ICONFROMICOLIB) {
- HICON hIcon = IcoLib_GetIconByHandle(pmi->hIcolibItem, false);
+ HANDLE hIcolibItem = IcoLib_IsManaged(pmi->hIcon);
+ if (hIcolibItem != NULL) {
+ HICON hIcon = IcoLib_GetIconByHandle(hIcolibItem, false);
p->iconId = ImageList_AddIcon(pmo->m_hMenuIcons, hIcon);
p->hIcolibItem = pmi->hIcolibItem;
IcoLib_ReleaseIcon(hIcon, 0);
}
- else {
- HANDLE hIcolibItem = IcoLib_IsManaged(pmi->hIcon);
- if (hIcolibItem) {
- p->iconId = ImageList_AddIcon(pmo->m_hMenuIcons, pmi->hIcon);
- p->hIcolibItem = hIcolibItem;
- }
- else p->iconId = ImageList_AddIcon(pmo->m_hMenuIcons, pmi->hIcon);
- }
+ else p->iconId = ImageList_AddIcon(pmo->m_hMenuIcons, pmi->hIcon);
}
if (p->mi.root == HGENMENU_ROOT)
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp index b661c90c55..5877bb9949 100644 --- a/src/modules/clist/movetogroup.cpp +++ b/src/modules/clist/movetogroup.cpp @@ -90,7 +90,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 100000;
mi.pszName = LPGEN("&Move to Group");
- mi.flags = CMIF_ROOTHANDLE | CMIF_ICONFROMICOLIB;
+ mi.flags = CMIF_ROOTHANDLE;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_GROUP);
hMoveToGroupItem = Menu_AddContactMenuItem(&mi);
|