diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdchat/src/services.cpp | 4 | ||||
-rw-r--r-- | src/core/stdemail/email.cpp | 1 | ||||
-rw-r--r-- | src/core/stdfile/file.cpp | 2 | ||||
-rw-r--r-- | src/core/stdhelp/help.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 2 | ||||
-rw-r--r-- | src/core/stduihist/history.cpp | 1 | ||||
-rw-r--r-- | src/core/stdurl/url.cpp | 1 | ||||
-rw-r--r-- | src/core/stduserinfo/userinfo.cpp | 1 | ||||
-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 | ||||
-rw-r--r-- | src/modules/findadd/findadd.cpp | 1 | ||||
-rw-r--r-- | src/modules/icolib/skin2icons.cpp | 30 | ||||
-rw-r--r-- | src/modules/options/options.cpp | 1 | ||||
-rw-r--r-- | src/modules/protocols/protoopts.cpp | 1 |
16 files changed, 26 insertions, 47 deletions
diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp index 6a2cc1db9a..a57293814c 100644 --- a/src/core/stdchat/src/services.cpp +++ b/src/core/stdchat/src/services.cpp @@ -761,7 +761,7 @@ static int ModulesLoaded(WPARAM wParam,LPARAM lParam) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090001;
- mi.flags = CMIF_DEFAULT | CMIF_ICONFROMICOLIB;
+ mi.flags = CMIF_DEFAULT;
mi.icolibItem = LoadSkinnedIconHandle( SKINICON_CHAT_JOIN );
mi.pszName = LPGEN("&Join");
mi.pszService = "GChat/JoinChat";
@@ -769,7 +769,7 @@ static int ModulesLoaded(WPARAM wParam,LPARAM lParam) mi.position = -2000090000;
mi.icolibItem = LoadSkinnedIconHandle( SKINICON_CHAT_LEAVE );
- mi.flags = CMIF_NOTOFFLINE | CMIF_ICONFROMICOLIB;
+ mi.flags = CMIF_NOTOFFLINE;
mi.pszName = LPGEN("&Leave");
mi.pszService = "GChat/LeaveChat";
hLeaveMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdemail/email.cpp b/src/core/stdemail/email.cpp index 95f772884b..3d8ffc470c 100644 --- a/src/core/stdemail/email.cpp +++ b/src/core/stdemail/email.cpp @@ -67,7 +67,6 @@ int LoadSendRecvEMailModule(void) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000010000;
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_SENDEMAIL);
mi.pszName = LPGEN("&E-mail");
mi.pszService = MS_EMAIL_SENDEMAIL;
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp index 8e67d7f802..292eb13873 100644 --- a/src/core/stdfile/file.cpp +++ b/src/core/stdfile/file.cpp @@ -325,7 +325,6 @@ static int SRFileModulesLoaded(WPARAM, LPARAM) mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_FILE);
mi.pszName = LPGEN("&File");
mi.pszService = MS_FILE_SENDFILE;
- mi.flags = CMIF_ICONFROMICOLIB;
hSRFileMenuItem = Menu_AddContactMenuItem(&mi);
RemoveUnreadFileEvents();
@@ -419,7 +418,6 @@ int LoadSendRecvFileModule(void) CreateServiceFunction("FtMgr/Show", FtMgrShowCommand);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
mi.pszName = LPGEN("File &Transfers...");
diff --git a/src/core/stdhelp/help.cpp b/src/core/stdhelp/help.cpp index 86ce15e997..4440aece1f 100644 --- a/src/core/stdhelp/help.cpp +++ b/src/core/stdhelp/help.cpp @@ -86,7 +86,6 @@ int LoadHelpModule(void) SetHookDefaultForHookableEvent(hBugEvent, BugCommandEvent);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszPopupName = LPGEN("&Help");
mi.popupPosition = 2000090000;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 61ed781665..ba8063ea65 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -301,7 +301,7 @@ static int SplitmsgModulesLoaded(WPARAM wParam, LPARAM lParam) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090000;
- mi.flags = CMIF_ICONFROMICOLIB | CMIF_DEFAULT;
+ mi.flags = CMIF_DEFAULT;
mi.icolibItem = LoadSkinnedIconHandle( SKINICON_EVENT_MESSAGE );
mi.pszName = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp index da39ccaee2..e21e9cf21f 100644 --- a/src/core/stduihist/history.cpp +++ b/src/core/stduihist/history.cpp @@ -406,7 +406,6 @@ int LoadHistoryModule(void) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1000090000;
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("View &History");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index 945cdefabe..ff4d8ec72a 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -122,7 +122,6 @@ static int SRUrlModulesLoaded(WPARAM, LPARAM) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000040000;
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_URL);
mi.pszName = LPGEN("Web Page Address (&URL)");
mi.pszService = MS_URL_SENDURL;
diff --git a/src/core/stduserinfo/userinfo.cpp b/src/core/stduserinfo/userinfo.cpp index d9bf4050b3..152b4b34b3 100644 --- a/src/core/stduserinfo/userinfo.cpp +++ b/src/core/stduserinfo/userinfo.cpp @@ -636,7 +636,6 @@ int LoadUserInfoModule(void) HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownUserInfo);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_ICONFROMICOLIB;
mi.position = 1000050000;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_USERDETAILS);
mi.pszName = LPGEN("User &Details");
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);
diff --git a/src/modules/findadd/findadd.cpp b/src/modules/findadd/findadd.cpp index 91a53c8ffd..9bbc8ddcff 100644 --- a/src/modules/findadd/findadd.cpp +++ b/src/modules/findadd/findadd.cpp @@ -1026,7 +1026,6 @@ int LoadFindAddModule(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 500020000;
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszName = LPGEN("&Find/Add Contacts...");
mi.pszService = MS_FINDADD_FINDADD;
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp index f5e7484df2..46f60374fd 100644 --- a/src/modules/icolib/skin2icons.cpp +++ b/src/modules/icolib/skin2icons.cpp @@ -449,12 +449,8 @@ static void IcoLib_RemoveSection(SectionItem* section) IcolibItem* IcoLib_FindIcon(const char* pszIconName)
{
- int indx;
- IcolibItem key = { (char*)pszIconName };
- if ((indx = iconList.getIndex(&key)) != -1)
- return iconList[ indx ];
-
- return NULL;
+ int indx = iconList.getIndex((IcolibItem*)&pszIconName);
+ return (indx != -1) ? iconList[ indx ] : 0;
}
IcolibItem* IcoLib_FindHIcon(HICON hIcon, bool &big)
@@ -465,7 +461,7 @@ IcolibItem* IcoLib_FindHIcon(HICON hIcon, bool &big) big = (p->source_small == NULL);
return p;
}
- if (p->source_small && p->source_small->icon == hIcon) {
+ if (p->source_small && p->source_small->icon == hIcon) {
big = false;
return p;
}
@@ -838,18 +834,18 @@ int LoadIcoLibModule(void) hIconBlank = LoadIconEx(NULL, MAKEINTRESOURCE(IDI_BLANK), 0);
InitializeCriticalSection(&csIconList);
- hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
- hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
- hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
- hIcoLib_GetIconHandle = CreateServiceFunction(MS_SKIN2_GETICONHANDLE, sttIcoLib_GetIconHandle);
- hIcoLib_GetIcon2 = CreateServiceFunction(MS_SKIN2_GETICONBYHANDLE, sttIcoLib_GetIconByHandle);
- hIcoLib_IsManaged = CreateServiceFunction(MS_SKIN2_ISMANAGEDICON, sttIcoLib_IsManaged);
- hIcoLib_AddRef = CreateServiceFunction(MS_SKIN2_ADDREFICON, IcoLib_AddRef);
- hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICON, sttIcoLib_ReleaseIcon);
- hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICONBIG, sttIcoLib_ReleaseIconBig);
+ hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
+ hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
+ hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
+ hIcoLib_GetIconHandle = CreateServiceFunction(MS_SKIN2_GETICONHANDLE, sttIcoLib_GetIconHandle);
+ hIcoLib_GetIcon2 = CreateServiceFunction(MS_SKIN2_GETICONBYHANDLE, sttIcoLib_GetIconByHandle);
+ hIcoLib_IsManaged = CreateServiceFunction(MS_SKIN2_ISMANAGEDICON, sttIcoLib_IsManaged);
+ hIcoLib_AddRef = CreateServiceFunction(MS_SKIN2_ADDREFICON, IcoLib_AddRef);
+ hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICON, sttIcoLib_ReleaseIcon);
+ hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICONBIG, sttIcoLib_ReleaseIconBig);
hIcons2ChangedEvent = CreateHookableEvent(ME_SKIN2_ICONSCHANGED);
- hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED);
+ hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED);
HookEvent(ME_SYSTEM_MODULESLOADED, SkinSystemModulesLoaded);
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 881258106e..9b0c4e0e11 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -1390,7 +1390,6 @@ static INT_PTR AddOptionsPage(WPARAM wParam, LPARAM lParam) static int OptModulesLoaded(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
mi.pszName = LPGEN("&Options...");
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 90e9ac6df6..3e03433e15 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -1043,7 +1043,6 @@ static INT_PTR OptProtosShow(WPARAM, LPARAM) int OptProtosLoaded(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
mi.pszName = LPGEN("&Accounts...");
|