From 6640a8f419a9ef61ad7af41a419615c2d07b872e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 6 Apr 2013 23:05:29 +0000 Subject: menu item flag CMIF_ICONFROMICOLIB is ignored by the core from now on git-svn-id: http://svn.miranda-ng.org/main/trunk@4354 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_clist.h | 2 +- plugins/AddContactPlus/src/main.cpp | 2 +- plugins/Alarms/src/options.cpp | 2 +- plugins/AutoShutdown/src/settingsdlg.cpp | 2 +- plugins/BasicHistory/src/BasicHistory.cpp | 10 +++----- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 4 +-- plugins/CSList/src/cslist.cpp | 2 +- plugins/Clist_modern/src/modern_clistmenus.cpp | 4 +-- plugins/Clist_modern/src/modern_clisttray.cpp | 1 - plugins/Clist_modern/src/modern_cluiframes.cpp | 3 +-- plugins/Clist_modern/src/modern_groupmenu.cpp | 3 --- plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp | 2 +- plugins/Clist_mw/src/groupmenu.cpp | 2 -- plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 4 +-- plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp | 5 ---- plugins/CrashDumper/src/crshdmp.cpp | 4 +-- plugins/Dbx_mmap_SA/src/dialogs.cpp | 2 +- plugins/FTPFileYM/src/ftpfile.cpp | 6 ++--- plugins/FavContacts/src/main.cpp | 1 - plugins/IEView/src/MUCCHTMLBuilder.cpp | 6 ++--- plugins/Import/src/main.cpp | 1 - plugins/ListeningTo/src/listeningto.cpp | 2 +- plugins/MetaContacts/src/meta_services.cpp | 3 +-- plugins/MirOTR/MirOTR/src/mirotrmenu.cpp | 24 ++++++------------ plugins/MirOTR/MirOTR/src/svcs_menu.cpp | 4 +-- plugins/NewXstatusNotify/src/main.cpp | 2 +- plugins/NewsAggregator/Src/Menus.cpp | 2 +- plugins/NewsAggregator/Src/Services.cpp | 2 +- plugins/Non-IM Contact/src/main.cpp | 1 - plugins/NotesAndReminders/src/main.cpp | 2 +- plugins/Nudge/src/main.cpp | 2 +- plugins/OpenFolder/src/openFolder.cpp | 2 +- plugins/PasteIt/src/PasteIt.cpp | 2 +- plugins/PluginUpdater/src/PluginUpdater.cpp | 1 - plugins/Quotes/src/Forex.cpp | 7 +++--- plugins/RecentContacts/src/RecentContacts.cpp | 1 - plugins/Restart/src/restart.cpp | 3 +-- plugins/Scriver/src/chat/main.cpp | 5 ++-- plugins/Scriver/src/msgs.cpp | 2 +- plugins/Sessions/Src/Main.cpp | 2 +- plugins/SimpleStatusMsg/src/awaymsg.cpp | 1 - plugins/SimpleStatusMsg/src/main.cpp | 2 +- plugins/SmileyAdd/src/main.cpp | 2 +- plugins/TabSRMM/src/chat/services.cpp | 4 +-- plugins/TabSRMM/src/globals.cpp | 2 +- plugins/Weather/src/weather_svcs.cpp | 5 ++-- plugins/WhenWasIt/src/hooked_events.cpp | 2 +- plugins/YAMN/src/main.cpp | 1 - protocols/AimOscar/src/theme.cpp | 12 ++++----- protocols/FacebookRM/src/theme.cpp | 16 ++++++------ protocols/Gadu-Gadu/src/gg.cpp | 8 +++--- protocols/Gadu-Gadu/src/groupchat.cpp | 2 +- protocols/Gadu-Gadu/src/image.cpp | 2 +- protocols/Gadu-Gadu/src/import.cpp | 2 +- protocols/Gadu-Gadu/src/links.cpp | 1 - protocols/Gadu-Gadu/src/sessions.cpp | 2 +- protocols/IRCG/src/services.cpp | 5 ++-- protocols/IcqOscarJ/src/icq_menu.cpp | 1 - protocols/IcqOscarJ/src/icq_xstatus.cpp | 2 +- protocols/JabberG/src/jabber_menu.cpp | 20 ++++++--------- protocols/JabberG/src/jabber_privacy.cpp | 6 ++--- protocols/JabberG/src/jabber_xstatus.cpp | 4 +-- protocols/MRA/src/MraIcons.cpp | 4 +-- protocols/MRA/src/Mra_svcs.cpp | 2 +- protocols/MSN/src/msn_menu.cpp | 9 +++---- protocols/Tlen/src/tlen.cpp | 5 ++-- protocols/Twitter/src/proto.cpp | 2 +- protocols/Twitter/src/theme.cpp | 2 +- protocols/Yahoo/src/services.cpp | 5 ++-- src/core/stdchat/src/services.cpp | 4 +-- src/core/stdemail/email.cpp | 1 - src/core/stdfile/file.cpp | 2 -- src/core/stdhelp/help.cpp | 1 - src/core/stdmsg/src/msgs.cpp | 2 +- src/core/stduihist/history.cpp | 1 - src/core/stdurl/url.cpp | 1 - src/core/stduserinfo/userinfo.cpp | 1 - src/modules/clist/clistmenus.cpp | 1 - src/modules/clist/clui.cpp | 1 - src/modules/clist/genmenu.cpp | 23 +++++++---------- src/modules/clist/movetogroup.cpp | 2 +- src/modules/findadd/findadd.cpp | 1 - src/modules/icolib/skin2icons.cpp | 30 ++++++++++------------- src/modules/options/options.cpp | 1 - src/modules/protocols/protoopts.cpp | 1 - 85 files changed, 134 insertions(+), 207 deletions(-) diff --git a/include/m_clist.h b/include/m_clist.h index bcf0a3aaa7..eba83c6769 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -138,7 +138,7 @@ typedef struct { #endif #define CMIF_KEEPUNTRANSLATED 1024 // don't translate a menu item -#define CMIF_ICONFROMICOLIB 2048 // use icolibName instead of hIcon +//#define CMIF_ICONFROMICOLIB 2048 // use icolibName instead of hIcon, unused #define CMIF_DEFAULT 4096 // this menu item is the default one // for compatibility. since 0.8.0 they both mean nothing diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index fff077c55c..f8c4f270a2 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -91,7 +91,7 @@ static int OnAccListChanged(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 500020001; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_TCHAR; mi.icolibItem = icon.hIcolib; mi.ptszName = LPGENT("&Add contact..."); mi.pszService = MS_ADDCONTACTPLUS_SHOW; diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index 39c4713838..ffb359fabb 100644 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -693,7 +693,7 @@ void AddMenuItem() if (hMainMenuItem) return; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_ALL | CMIF_ICONFROMICOLIB; + mi.flags = CMIM_ALL; mi.icolibItem = Skin_GetIconHandle("alarms_menu_set"); mi.pszName = "Set Alarm"; mi.pszService = MODULE "/NewAlarm"; diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 05ed98263d..96e29316e6 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -437,7 +437,7 @@ void SetShutdownMenuItem(BOOL fActive) mi.icolibItem = fActive ? iconList[1].hIcolib : iconList[2].hIcolib; mi.ptszName = fActive ? LPGENT("Stop automatic &shutdown") : LPGENT("Automatic &shutdown..."); /* autotranslated */ mi.pszService = "AutoShutdown/MenuCommand"; - mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_TCHAR; if (hMainMenuItem != NULL) { mi.flags |= CMIM_NAME | CMIM_ICON; Menu_ModifyItem(hMainMenuItem, &mi); diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 7810489920..c8ee22d2b8 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -99,7 +99,6 @@ void InitMenuItems() { CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 1000090000; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY); mi.pszName = LPGEN("View &History"); mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY; @@ -110,7 +109,6 @@ void InitMenuItems() Menu_AddMainMenuItem(&mi); mi.position = 1000090001; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); mi.pszName = LPGEN("Delete All User History"); mi.pszService = MS_HISTORY_DELETEALLCONTACTHISTORY; @@ -121,13 +119,11 @@ void InitMenuItems() void InitTaskMenuItems() { - if(Options::instance->taskOptions.size() > 0) - { + if(Options::instance->taskOptions.size() > 0) { CLISTMENUITEM mi = { sizeof(mi) }; - if(hTaskMainMenu == NULL) - { + if(hTaskMainMenu == NULL) { mi.position = 500060005; - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ROOTPOPUP; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY); mi.pszName = LPGEN("Execute history task"); hTaskMainMenu = Menu_AddMainMenuItem(&mi); diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 13a6303ee3..54864b2e89 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -447,7 +447,7 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) return 0; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR; if (db_get_b((HANDLE)wParam, MODULE_NAME, "MissYou", 0)) { mi.ptszName = LPGENT("Disable Miss You"); mi.icolibItem = iconList[1].hIcolib; @@ -643,7 +643,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) HookEvent(ME_CLIST_PREBUILDCONTACTMENU, onPrebuildContactMenu); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_TCHAR; mi.icolibItem = iconList[2].hIcolib; mi.position = 200000; mi.ptszName = LPGENT("Enable Miss You"); diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 4fe55e4279..98f0c86410 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -247,7 +247,7 @@ void addProtoStatusMenuItem(char *protoName) CreateServiceFunctionParam(buf, showList, (LPARAM)protoName); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR; mi.icolibItem = forms[0].hIcoLibItem; mi.ptszName = _T(MODULENAME); mi.position = 2000040000; diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 42a1d0b016..a4b940bbbe 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -110,7 +110,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mir_sntprintf(name, bufsize/sizeof(TCHAR), _T("%s (%s)"),FAVMENUROOTNAME,rates[bContactRate]); mi.ptszName = name; } - mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; if ( !hFavoriteContactMenu) hFavoriteContactMenu = Menu_AddContactMenuItem(&mi); else { @@ -135,7 +135,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) for (i=0; i < SIZEOF(rates); i++) { mi.icolibItem = iconList[i].hIcolib; mi.ptszName = rates[i]; - mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | ((bContactRate == i)?CMIF_CHECKED:0) | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | ((bContactRate == i) ? CMIF_CHECKED : 0); mi.pszService = CLUI_FAVSETRATE; mi.popupPosition = i; if (bModifyMenu && hFavoriteContactMenuItems[i]) { diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index b4339c7720..f99b24ca6d 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -612,7 +612,6 @@ void InitTrayMenus(void) mi.position = 900000; mi.pszService = "CloseAction"; mi.pszName = LPGEN("E&xit"); - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT); AddTrayMenuItem(0, (LPARAM)&mi); diff --git a/plugins/Clist_modern/src/modern_cluiframes.cpp b/plugins/Clist_modern/src/modern_cluiframes.cpp index 1f0bdb8beb..c6cad48918 100644 --- a/plugins/Clist_modern/src/modern_cluiframes.cpp +++ b/plugins/Clist_modern/src/modern_cluiframes.cpp @@ -827,7 +827,6 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGEN return NULL; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB; mi.pszPopupName = (char *)root; mi.popupPosition = frameid; mi.position = popuppos++; @@ -1719,7 +1718,7 @@ static int CLUIFramesLoadMainMenu() // create root menu CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE; + mi.flags = CMIF_ROOTHANDLE; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FRAME); mi.position = 3000090000; mi.pszName = LPGEN("Frames"); diff --git a/plugins/Clist_modern/src/modern_groupmenu.cpp b/plugins/Clist_modern/src/modern_groupmenu.cpp index ab78f0f0b6..5f6ac01363 100644 --- a/plugins/Clist_modern/src/modern_groupmenu.cpp +++ b/plugins/Clist_modern/src/modern_groupmenu.cpp @@ -296,7 +296,6 @@ void GroupMenus_Init(void) mi.pszService = "CloseAction"; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT); mi.pszName = LPGEN("E&xit"); - mi.flags = CMIF_ICONFROMICOLIB; AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 500; @@ -609,7 +608,6 @@ void InitSubGroupMenus(void) memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = 900001; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; mi.pszName = LPGEN("&Rename Group"); @@ -618,7 +616,6 @@ void InitSubGroupMenus(void) DestroyIcon_protect(mi.hIcon); mi.position = 900002; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; mi.pszName = LPGEN("&Delete Group"); diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index 4441022cfa..f9676744c2 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -1414,7 +1414,7 @@ static int CLUIFramesLoadMainMenu() // create root menu CLISTMENUITEM mi = { sizeof(mi) }; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FRAME); - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ROOTPOPUP; mi.position = 3000090000; mi.pszPopupName = (char*)-1; mi.pszName = LPGEN("Frames"); diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp index 121f166b26..01f428247d 100644 --- a/plugins/Clist_mw/src/groupmenu.cpp +++ b/plugins/Clist_mw/src/groupmenu.cpp @@ -596,7 +596,6 @@ void InitSubGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = 900001; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_RENAME)); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; mi.pszName = LPGEN("&Rename Group"); @@ -606,7 +605,6 @@ void InitSubGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = 900002; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_DELETE)); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; mi.pszName = LPGEN("&Delete Group"); diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index 052ef37f2d..e371374fe7 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -648,7 +648,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.popupPosition = frameid; mi.position = popuppos++; mi.pszName = LPGEN("&FrameTitle"); - mi.flags = CMIF_CHILDPOPUP | CMIF_GRAYED | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_CHILDPOPUP | CMIF_GRAYED; mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMITitle = menuid; @@ -1599,7 +1599,7 @@ static int CLUIFramesLoadMainMenu() // create root menu CLISTMENUITEM mi = { sizeof(mi) }; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FRAME); - mi.flags = CMIF_ROOTHANDLE | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ROOTHANDLE; mi.position = 3000090000; mi.pszPopupName = (char*) - 1; mi.pszName = LPGEN("Frames"); diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index fd261b6f6a..2bb67ac6c4 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -315,7 +315,6 @@ void InitGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize=sizeof(mi); mi.position=200000; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem=LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER); //LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER)); mi.pszService="FindAdd/FindAddCommand"; mi.pszName=LPGEN("&Find/Add Contacts..."); @@ -345,7 +344,6 @@ void InitGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize=sizeof(mi); mi.position=400000; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem=LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_OPTIONS)); mi.pszService="Options/OptionsCommand"; mi.pszName=LPGEN("&Options..."); @@ -355,7 +353,6 @@ void InitGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize=sizeof(mi); mi.position=500000; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem=LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_MIRANDA)); mi.pszService="CLN/About"; mi.pszName=LPGEN("&About the contact list..."); @@ -637,7 +634,6 @@ void InitSubGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize=sizeof(mi); mi.position=900001; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem=LoadSkinnedIconHandle(SKINICON_OTHER_RENAME); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_RENAME)); mi.pszService="CLISTMENUSSubGroup/GroupMenuExecProxy"; mi.pszName=LPGEN("&Rename Group"); @@ -647,7 +643,6 @@ void InitSubGroupMenus(void) memset(&mi,0,sizeof(mi)); mi.cbSize=sizeof(mi); mi.position=900002; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem=LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_DELETE)); mi.pszService="CLISTMENUSSubGroup/GroupMenuExecProxy"; mi.pszName=LPGEN("&Delete Group"); diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index c9ec9a7b76..7bb5e53445 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -253,13 +253,13 @@ static int ModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) }; mi.popupPosition = 2000089999; mi.position = 2000089999; - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; mi.icolibItem = GetIconHandle(IDI_VI); mi.ptszName = LPGENT("Version Information"); mi.pszPopupName = (char *)-1; HANDLE hMenuRoot = Menu_AddMainMenuItem(&mi); - mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR; mi.pszPopupName = (char *)hMenuRoot; mi.popupPosition = 0; diff --git a/plugins/Dbx_mmap_SA/src/dialogs.cpp b/plugins/Dbx_mmap_SA/src/dialogs.cpp index c1b8e29d1f..4af9f177ac 100644 --- a/plugins/Dbx_mmap_SA/src/dialogs.cpp +++ b/plugins/Dbx_mmap_SA/src/dialogs.cpp @@ -97,7 +97,7 @@ int InitMenus(void *obj, WPARAM, LPARAM) // main menu item CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_ALL | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIM_ALL | CMIF_TCHAR; mi.icolibItem = iconList[1].hIcolib; mi.ptszName = (p->m_bEncoding) ? LPGENT("Change password") : LPGENT("Set password"); mi.ptszPopupName = LPGENT("Database"); diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index d0747f234b..53b2c5ef1f 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -93,7 +93,7 @@ void InitMenuItems() TCHAR stzName[256]; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib; mi.position = 3000090001; mi.ptszName = LPGENT("FTP File"); @@ -115,7 +115,7 @@ void InitMenuItems() if (DB::getStringF(0, MODULE, "Name%d", i, stzName)) mir_sntprintf(stzName, SIZEOF(stzName), TranslateT("FTP Server %d"), i + 1); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_TCHAR; mi.hParentMenu = 0; if (opt.bUseSubmenu) { @@ -164,7 +164,7 @@ void InitMenuItems() memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof(mi); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR; + mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR; mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib; mi.position = 3000090001; mi.ptszName = LPGENT("FTP File manager"); diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index 7e065d60fd..fdef5aeb9b 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -299,7 +299,6 @@ extern "C" __declspec(dllexport) int Load(void) #ifdef _DEBUG CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS); mi.position = 1900000000; mi.pszName = LPGEN("&Favourite Contacts..."); diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp index ee70762939..e8d5b30c19 100644 --- a/plugins/IEView/src/MUCCHTMLBuilder.cpp +++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp @@ -186,9 +186,9 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) { for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) { DWORD dwData = eventData->dwData; char *style = NULL; - int styleSize; - int isSent = eventData->bIsMe; - int outputSize; + int styleSize; + bool isSent = eventData->bIsMe != 0; + int outputSize; char *output = NULL; mir_ptr szName, szText; if (eventData->iType == IEED_MUCC_EVENT_MESSAGE) { diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index c5cb25aa7e..4329e6a5c5 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -124,7 +124,6 @@ extern "C" __declspec(dllexport) int Load(void) mi.pszName = LPGEN("&Import..."); mi.position = 500050000; mi.pszService = IMPORT_SERVICE; - mi.flags = CMIF_ICONFROMICOLIB; Menu_AddMainMenuItem(&mi); HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 6e82365846..62ecd7c48e 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -320,7 +320,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 500080000; mi.ptszName = LPGENT("Listening to"); - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; mi.icolibItem = iconList[0].hIcolib; hMainMenuGroup = Menu_AddMainMenuItem(&mi); diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp index 042a0e43a1..5a02ddfe42 100755 --- a/plugins/MetaContacts/src/meta_services.cpp +++ b/plugins/MetaContacts/src/meta_services.cpp @@ -1003,7 +1003,7 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam) //////////////////////////////////////////////////////////////////////////// CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_ALL | CMIF_ICONFROMICOLIB; + mi.flags = CMIM_ALL; // main menu item mi.icolibItem = GetIconHandle(I_MENUOFF); @@ -1047,7 +1047,6 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam) mi.pszContactOwner = META_PROTO; mi.position = -99000; - mi.flags &= ~CMIF_ICONFROMICOLIB; for (i = 0; i < MAX_CONTACTS; i++) { mi.position--; strcpy(buffer3, (char *)Translate("Context")); diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp index 03d5f70a39..0b94d69c66 100644 --- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp @@ -106,7 +106,7 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam,LPARAM) if ( mi.flags & CMIF_NOTNOTPRIVATE && level==TRUST_NOT_PRIVATE ) return FALSE; if (pcpp->MenuItemHandle == hStatusInfoItem) { - mi.flags = CMIM_NAME | CMIM_ICON | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR; switch (level) { case TRUST_PRIVATE: mi.hIcolibItem = GetIconHandle(ICON_PRIVATE); @@ -190,7 +190,6 @@ void ShowOTRMenu(HANDLE hContact, POINT pt){ void InitMirOTRMenu(void) { - WNDCLASS wc = {0}; wc.hInstance = hInst; wc.lpfnWndProc = PopupMenuWndProc; @@ -205,14 +204,9 @@ void InitMirOTRMenu(void) CreateServiceFunction("MIROTRMENUS/FreeOwnerDataMirOTRMenu",FreeOwnerDataMirOTRMenu); CreateServiceFunction("MIROTRMENUS/OnAddMenuItemMirOTRMenu",OnAddMenuItemMirOTRMenu); - CreateServiceFunction(MS_MIROTR_ADDMIROTRMENUITEM,AddMirOTRMenuItem); CreateServiceFunction(MS_MIROTR_MENUBUILDMIROTR,BuildMirOTRMenu); CreateServiceFunction(MS_MIROTR_REMOVEMIROTRMENUITEM,RemoveMirOTRMenuItem); - - //hPreBuildMirOTRMenuEvent=CreateHookableEvent(ME_CLIST_PREBUILDMirOTRMENU); - - //MirOTR menu { TMenuParam tmp = { 0 }; tmp.cbSize=sizeof(tmp); @@ -236,37 +230,36 @@ void InitMirOTRMenu(void) params.Value = (INT_PTR)"MIROTRMENUS/OnAddMenuItemMirOTRMenu"; CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)¶ms); - MIROTRMENUITEM mi = {0}; mi.cbSize = sizeof(mi); - mi.flags = CMIF_DISABLED|CMIF_TCHAR|CMIF_ICONFROMICOLIB; + mi.flags = CMIF_DISABLED | CMIF_TCHAR; mi.ptszName = LPGENT("OTR Status"); mi.position = 0; hStatusInfoItem = (HGENMENU) AddMirOTRMenuItem(0, (LPARAM) &mi); - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_NOTPRIVATE|CMIF_NOTUNVERIFIED; + mi.flags = CMIF_TCHAR | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED; mi.ptszName = _T(LANG_MENU_START); mi.position = 100001; mi.pszService = MS_OTR_MENUSTART; mi.icolibItem = GetIconHandle(ICON_UNVERIFIED); AddMirOTRMenuItem(0, (LPARAM) &mi); - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_NOTNOTPRIVATE|CMIF_NOTFINISHED; + mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED; mi.ptszName = _T(LANG_MENU_REFRESH); mi.position = 100002; mi.pszService = MS_OTR_MENUREFRESH; mi.icolibItem = GetIconHandle(ICON_FINISHED); AddMirOTRMenuItem(0, (LPARAM) &mi); - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_NOTNOTPRIVATE; + mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE; mi.ptszName = _T(LANG_MENU_STOP); mi.position = 100003; mi.pszService = MS_OTR_MENUSTOP; mi.icolibItem = GetIconHandle(ICON_NOT_PRIVATE); AddMirOTRMenuItem(0, (LPARAM) &mi); - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_NOTNOTPRIVATE|CMIF_NOTFINISHED; + mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED; mi.ptszName = _T(LANG_MENU_VERIFY); mi.position = 200001; mi.pszService = MS_OTR_MENUVERIFY; @@ -278,9 +271,6 @@ void InitMirOTRMenu(void) mi.position = 300001; mi.pszService = MS_OTR_MENUTOGGLEHTML; hHTMLConvMenuItem = (HGENMENU) AddMirOTRMenuItem(0, (LPARAM) &mi); - - - } void UninitMirOTRMenu(void) @@ -290,4 +280,4 @@ void UninitMirOTRMenu(void) UnregisterClass(_T("MirOTRPopUpMenuProcessor"), hInst); if ( hMirOTRMenuObject ) CallService( MO_REMOVEMENUOBJECT, (WPARAM)hMirOTRMenuObject, 0 ); hMirOTRMenuObject = 0; -} \ No newline at end of file +} diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp index f1885a31a3..9a7e4a7488 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp @@ -132,7 +132,7 @@ void InitMenu() CreateServiceFunction(MS_OTR_MENUTOGGLEHTML, SVC_ToggleHTMLOTR); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR; mi.position = -400000; mi.ptszName = _T(LANG_STOP_OTR); @@ -155,7 +155,7 @@ int SVC_PrebuildContactMenu(WPARAM wParam, LPARAM lParam) HANDLE hContact = (HANDLE)wParam; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_TCHAR; const char *proto = contact_get_proto(hContact); DWORD pol = CONTACT_DEFAULT_POLICY; diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 1dc3bf3188..093dd46ac2 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1059,7 +1059,7 @@ INT_PTR EnableDisableMenuCommand(WPARAM wParam, LPARAM lParam) void InitMainMenuItem() { CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_TCHAR; mi.ptszPopupName = ServiceExists(MS_POPUP_ADDPOPUP) ? _T("PopUps") : NULL; mi.pszService = MS_STATUSCHANGE_MENUCOMMAND; hEnableDisableMenu = Menu_AddMainMenuItem(&mi); diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp index d58654d4ea..1299e03af5 100644 --- a/plugins/NewsAggregator/Src/Menus.cpp +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -25,7 +25,7 @@ VOID InitMenu() { CLISTMENUITEM mi = { sizeof(mi) }; mi.pszContactOwner = MODULE; - mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIF_NOTOFFLINE; + mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE; // adding main menu items mi.ptszPopupName = LPGENT("News Aggregator"); diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 622723f205..238e7f1145 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -254,7 +254,7 @@ void UpdateMenu(BOOL State) mi.icolibItem = GetIconHandle("disabled"); } - mi.flags = CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR; Menu_ModifyItem(hService2[0], &mi); CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : TTBST_RELEASED); db_set_b(NULL, MODULE, "AutoUpdate", !State); diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 4aca53a150..02df17e56d 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -147,7 +147,6 @@ extern "C" __declspec(dllexport) int Load() CreateServiceFunction("NIM_Contact/DoubleClick", doubleClick); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB; mi.position = 600090000; mi.pszPopupName = LPGEN("&Non-IM Contact"); mi.popupPosition = 600090000; diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 2322ca2f7b..386cc792fb 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -187,7 +187,7 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam) CLISTMENUITEM mi = { sizeof(mi) }; mi.pszContactOwner = NULL; mi.ptszPopupName = LPGENT("Notes && Reminders"); - mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_TCHAR; mi.position = 1600000000; mi.icolibItem = iconList[2].hIcolib; diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 73caaf1db3..e675a22868 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -674,7 +674,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto) mi.popupPosition = 500085000; mi.pszContactOwner = proto->szModuleName; mi.pszPopupName = proto->szModuleName; - mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR; mi.position = -500050004; mi.icolibItem = newNudge->item.hIcoLibItem; mi.ptszName = LPGENT( "Send &Nudge" ); diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index ec6f3c90fa..17e242acac 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -75,7 +75,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 0x7FFFFFFF; - mi.flags = CMIF_ICONFROMICOLIB|CMIF_TCHAR; + mi.flags = CMIF_TCHAR; mi.icolibItem = icon.hIcolib; mi.ptszName = LPGENT("Open Folder"); mi.pszService = MS_OPENFOLDER_OPEN; diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 3c30104e26..d8466a2033 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -348,7 +348,7 @@ INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam) void InitMenuItems() { CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; mi.icolibItem = icon.hIcolib; mi.position = 3000090005; mi.ptszName = LPGENT("Paste It"); diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index d0875df06c..fbd28aa8af 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -105,7 +105,6 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = -0x7FFFFFFF; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = Skin_GetIconHandle("check_update"); mi.pszName = LPGEN("Check for plugin updates"); mi.pszService = MODNAME"/CheckUpdates"; diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index be9da5bb35..4a93c23d63 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -48,13 +48,13 @@ namespace { CLISTMENUITEM mi = { sizeof(mi) }; mi.ptszName = LPGENT("Quotes"); - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTPOPUP; + mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP; mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN); HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi); g_ahMenus.push_back(hMenuRoot); mi.ptszName = LPGENT("Refresh All Quotes\\Rates"); - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE; + mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE; //mi.position = 0x0FFFFFFF; mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN); mi.pszService = "Quotes/RefreshAll"; @@ -107,7 +107,7 @@ namespace { mi.pszPopupName=(char *)-1; mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN); - mi.flags = CMIF_ICONFROMICOLIB|CMIF_TCHAR|CMIF_ROOTPOPUP; + mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP; tstring sProtocolName = quotes_a2t(QUOTES_PROTOCOL_NAME); mi.ptszName = const_cast(sProtocolName.c_str());//A2T(QUOTES_PROTOCOL_NAME); mi.position = 0; @@ -124,7 +124,6 @@ namespace mi.ptszName = LPGENT("Refresh"); mi.popupPosition = 0; - mi.flags |= CMIF_ICONFROMICOLIB; mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH); mi.pszService = "Quotes/RefreshContact"; hMenu = Menu_AddContactMenuItem(&mi); diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 1d7574dfaa..0f66c5587a 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -442,7 +442,6 @@ int Create_TopToolbarShowList(WPARAM wParam, LPARAM lParam) int Create_MenuitemShowList(void) { CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = icon.hIcolib; mi.pszName = msLastUC_ShowListName; mi.pszService = msLastUC_ShowList; diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp index 6b65c68550..bf61367c2c 100644 --- a/plugins/Restart/src/restart.cpp +++ b/plugins/Restart/src/restart.cpp @@ -48,9 +48,8 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = -0x7FFFFFFF; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; mi.icolibItem = icon.hIcolib; - mi.ptszName = LPGENT("Restart"); + mi.pszName = LPGEN("Restart"); mi.pszService = "System/RestartMe"; Menu_AddMainMenuItem(&mi); Menu_AddTrayMenuItem(&mi); diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 56ca3965ef..23bc536582 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -76,14 +76,14 @@ int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam) CLISTMENUITEM mi = { sizeof(mi) }; mi.cbSize = 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"; hJoinMenuItem = Menu_AddContactMenuItem(&mi); mi.position = -2000090000; - mi.flags = CMIF_NOTOFFLINE | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTOFFLINE; mi.icolibItem = LoadSkinnedIconHandle( SKINICON_CHAT_LEAVE ); mi.pszName = LPGEN("&Leave"); mi.pszService = "GChat/LeaveChat"; @@ -93,7 +93,6 @@ int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam) return 0; } - void LoadIcons(void) { LoadMsgLogBitmaps(); diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 0f3eb1f6f2..6bda0dfb90 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -452,7 +452,7 @@ static int OnModulesLoaded(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/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 35276af9c3..7f2b2f4dbd 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -962,7 +962,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) // Main menu CLISTMENUITEM cl = { sizeof(cl) }; cl.position = 1000000000; - cl.flags = CMIM_ALL | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + cl.flags = CMIM_ALL | CMIF_TCHAR; cl.ptszName = LPGENT("Save session..."); cl.ptszPopupName = LPGENT("Sessions Manager"); diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index e286a13dbd..9a470fda94 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -455,7 +455,6 @@ int LoadAwayMsgModule(void) mi.pszService = MS_AWAYMSG_SHOWAWAYMSG; hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi); - mi.flags |= CMIF_ICONFROMICOLIB; CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand); mi.position = -2000006000; mi.icolibItem = GetIconHandle(IDI_COPY); diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 92676a3b32..4aa0db4416 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1646,7 +1646,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam) return 0; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_TCHAR; if (!db_get_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1)) mi.flags |= CMIF_HIDDEN; mi.icolibItem = GetIconHandle(IDI_CSMSG); diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index 795760164f..f8ee1407a1 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -58,7 +58,7 @@ static int ModulesLoaded(WPARAM, LPARAM) metaProtoName = mir_strdup(temp == CALLSERVICE_NOTFOUND ? NULL : (char*)temp); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ROOTPOPUP; mi.popupPosition = 2000070050; mi.position = 2000070050; mi.icolibItem = icon.hIcolib; diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 59d4cd646f..3f5d199c0e 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -67,14 +67,14 @@ int Chat_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"; hJoinMenuItem = Menu_AddContactMenuItem(&mi); mi.position = -2000090000; - mi.flags = CMIF_NOTOFFLINE | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTOFFLINE; mi.icolibItem = LoadSkinnedIconHandle( SKINICON_CHAT_LEAVE ); mi.pszName = LPGEN("&Leave"); mi.pszService = "GChat/LeaveChat"; diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 38581de550..cb41598cc4 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -205,7 +205,7 @@ void CGlobals::reloadSystemModulesChanged() 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/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 0f074e292a..0185b78072 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -240,7 +240,7 @@ void UpdateMenu(BOOL State) opt.AutoUpdate = 0; } - mi.flags = CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB; + mi.flags = CMIM_ICON | CMIM_NAME; Menu_ModifyItem(hEnableDisableMenu, &mi); CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, !State ? TTBST_PUSHED : TTBST_RELEASED); @@ -264,7 +264,7 @@ void UpdatePopupMenu(BOOL State) mi.icolibItem = GetIconHandle("nopopup"); } - mi.flags = CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB; + mi.flags = CMIM_ICON | CMIM_NAME; Menu_ModifyItem(hEnableDisablePopupMenu, &mi); } @@ -288,7 +288,6 @@ void AddMenuItems(void) { CLISTMENUITEM mi = { sizeof(mi) }; mi.pszContactOwner = WEATHERPROTONAME; - mi.flags = CMIF_ICONFROMICOLIB; // contact menu CreateServiceFunction(MS_WEATHER_UPDATE, UpdateSingleStation); diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index df5f28b418..c34865fbc6 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -86,7 +86,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) CLISTMENUITEM cl = { sizeof(cl) }; cl.position = 10000000; - cl.flags = CMIF_ICONFROMICOLIB|CMIF_TCHAR; + cl.flags = CMIF_TCHAR; cl.ptszPopupName = LPGENT("Birthdays (When Was It)"); cl.pszService = MS_WWI_CHECK_BIRTHDAYS; diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index ccb7598853..64b9642e64 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -196,7 +196,6 @@ int SystemModulesLoaded(WPARAM, LPARAM) //Insert "Check mail (YAMN)" item to Miranda's menu CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 0xb0000000; - mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = g_GetIconHandle(0); mi.pszName = LPGEN("Check &mail (All Account)"); mi.pszPopupName = NULL;//YAMN_DBMODULE; diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index c32409f5b2..b5c0ae20a7 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -270,7 +270,7 @@ void CAimProto::InitMainMenus(void) HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName); if (hRoot == NULL) { - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; mi.icolibItem = GetIconHandle("aim"); mi.ptszName = m_tszUserName; mi.hParentMenu = HGENMENU_ROOT; @@ -285,7 +285,7 @@ void CAimProto::InitMainMenus(void) mi.pszService = service_name; mi.hParentMenu = hRoot; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_CHILDPOPUP; mir_snprintf(service_name, sizeof(service_name), "%s%s", m_szModuleName, "/ManageAccount"); CreateProtoService("/ManageAccount", &CAimProto::ManageAccount); @@ -323,7 +323,7 @@ void CAimProto::InitContactMenus(void) mi.position = -2000006000; mi.icolibItem = GetIconHandle("away"); mi.pszName = LPGEN("Read &HTML Away Message"); - mi.flags = CMIF_NOTOFFLINE | CMIF_HIDDEN | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTOFFLINE | CMIF_HIDDEN; hHTMLAwayContextMenuItem = Menu_AddContactMenuItem(&mi); mir_snprintf(service_name, sizeof(service_name), "%s%s", m_szModuleName, "/GetProfile"); @@ -331,7 +331,7 @@ void CAimProto::InitContactMenus(void) mi.position = -2000005090; mi.icolibItem = GetIconHandle("profile"); mi.pszName = LPGEN("Read Profile"); - mi.flags = CMIF_NOTOFFLINE | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTOFFLINE; hReadProfileMenuItem = Menu_AddContactMenuItem(&mi); mir_snprintf(service_name, sizeof(service_name), "%s%s", m_szModuleName, "/AddToServerList"); @@ -339,7 +339,7 @@ void CAimProto::InitContactMenus(void) mi.position = -2000005080; mi.icolibItem = GetIconHandle("add"); mi.pszName = LPGEN("Add To Server List"); - mi.flags = CMIF_NOTONLINE | CMIF_HIDDEN | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_NOTONLINE | CMIF_HIDDEN; hAddToServerListContextMenuItem = Menu_AddContactMenuItem(&mi); mir_snprintf(service_name, sizeof(service_name), "%s%s", m_szModuleName, "/BlockCommand"); @@ -347,7 +347,7 @@ void CAimProto::InitContactMenus(void) mi.position = -2000005060; mi.icolibItem = GetIconHandle("block"); mi.pszName = LPGEN("&Block"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_HIDDEN; + mi.flags = CMIF_HIDDEN; hBlockContextMenuItem = Menu_AddContactMenuItem(&mi); } diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index e7dff88aba..c43cc7666e 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -100,8 +100,6 @@ void InitContactMenus() HookEvent(ME_CLIST_PREBUILDCONTACTMENU,PrebuildContactMenu); CLISTMENUITEM mi = {sizeof(mi)}; - mi.flags = CMIF_ICONFROMICOLIB; - mi.position=-2000006000; mi.icolibItem = GetIconHandle("homepage"); mi.pszName = GetIconDescription("homepage"); @@ -178,7 +176,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) if (hRoot == NULL) { mi.popupPosition = 500085000; mi.hParentMenu = HGENMENU_ROOT; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | ( this->isOnline() ? 0 : CMIF_GRAYED ); + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | ( this->isOnline() ? 0 : CMIF_GRAYED ); mi.icolibItem = GetIconHandle( "facebook" ); mi.ptszName = m_tszUserName; hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi); @@ -188,7 +186,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) m_hMenuRoot = NULL; } - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP | ( this->isOnline() ? 0 : CMIF_GRAYED ); + mi.flags = CMIF_CHILDPOPUP | ( this->isOnline() ? 0 : CMIF_GRAYED ); mi.position = 201001; CreateProtoService(m_szModuleName,"/Mind",&FacebookProto::OnMind,this); @@ -200,7 +198,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) CreateProtoService(m_szModuleName,"/VisitProfile",&FacebookProto::VisitProfile,this); strcpy(tDest,"/VisitProfile"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_CHILDPOPUP; mi.pszName = LPGEN("Visit Profile"); mi.icolibItem = GetIconHandle("homepage"); // TODO RM: remember and properly free in destructor? @@ -209,13 +207,13 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) // Services... mi.pszName = LPGEN("Services..."); strcpy( tDest, "/Services" ); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP | ( this->isOnline() ? 0 : CMIF_GRAYED ); + mi.flags = CMIF_CHILDPOPUP | ( this->isOnline() ? 0 : CMIF_GRAYED ); mi.icolibItem = NULL; m_hMenuServicesRoot = Menu_AddProtoMenuItem(&mi); CreateProtoService(m_szModuleName,"/RefreshBuddyList",&FacebookProto::RefreshBuddyList,this); strcpy(tDest,"/RefreshBuddyList"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE; + mi.flags = CMIF_ROOTHANDLE; mi.pszName = LPGEN("Refresh Buddy List"); mi.pszPopupName = LPGEN("Services"); mi.icolibItem = NULL; @@ -224,7 +222,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) CreateProtoService(m_szModuleName,"/CheckFriendRequests",&FacebookProto::CheckFriendRequests,this); strcpy(tDest,"/CheckFriendRequests"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE; + mi.flags = CMIF_ROOTHANDLE; mi.pszName = LPGEN("Check Friends Requests"); mi.icolibItem = NULL; mi.hParentMenu = m_hMenuServicesRoot; @@ -232,7 +230,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam) CreateProtoService(m_szModuleName,"/CheckNewsfeeds",&FacebookProto::CheckNewsfeeds,this); strcpy(tDest,"/CheckNewsfeeds"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE; + mi.flags = CMIF_ROOTHANDLE; mi.pszName = LPGEN("Check Newsfeeds"); mi.pszPopupName = LPGEN("Services"); mi.icolibItem = NULL; diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 548aaecce0..74ba0ef628 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -237,7 +237,7 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam) return 0; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR; if ( db_get_dw(hContact, gg->m_szModuleName, GG_KEY_UIN, 0) == db_get_b(NULL, gg->m_szModuleName, GG_KEY_UIN, 0) || db_get_b(hContact, gg->m_szModuleName, "ChatRoom", 0) || db_get_b(hContact, "CList", "NotOnList", 0)) @@ -269,7 +269,7 @@ void GGPROTO::block_init() createObjService(service, &GGPROTO::blockuser); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_TCHAR; mi.position = -500050000; mi.icolibItem = iconList[8].hIcolib; mi.ptszName = LPGENT("&Block"); @@ -299,13 +299,13 @@ void GGPROTO::menus_init() mi.ptszName = m_tszUserName; mi.position = 500090000; mi.hParentMenu = HGENMENU_ROOT; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; mi.icolibItem = iconList[0].hIcolib; hGCRoot = hCLRoot = hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi); } else { mi.hParentMenu = hRoot; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE | CMIF_TCHAR; + mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR; mi.ptszName = LPGENT("Conference"); mi.position = 200001; diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index ff8e0bfccd..1f19e0c25c 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -65,7 +65,7 @@ void GGPROTO::gc_menus_init(HGENMENU hRoot) char service[64]; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE | CMIF_TCHAR; + mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR; mi.hParentMenu = hRoot; // Conferencing diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index da9104004b..52e915c845 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -74,7 +74,7 @@ int GGPROTO::img_init() // Send image contact menu item CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_TCHAR; mi.position = -2000010000; mi.icolibItem = iconList[11].hIcolib; mi.ptszName = LPGENT("&Image"); diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 0cbded18f8..abaa9799f6 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -621,7 +621,7 @@ void GGPROTO::import_init(HGENMENU hRoot) createObjService(service, &GGPROTO::import_server); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE | CMIF_TCHAR; + mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR; mi.hParentMenu = hRoot; mi.position = 2000500001; mi.icolibItem = iconList[1].hIcolib; diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 0da199062d..8b78eb73dc 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -125,7 +125,6 @@ void gg_links_instancemenu_init() hInstanceMenu = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&mnu); tmi.cbSize = sizeof(tmi); - tmi.flags = CMIF_ICONFROMICOLIB; tmi.pszName = "Cancel"; tmi.position = 9999999; tmi.hIcolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 764c4113d9..04836b80d4 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -430,7 +430,7 @@ void GGPROTO::sessions_menus_init(HGENMENU hRoot) createObjService(service, &GGPROTO::sessions_view); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE | CMIF_TCHAR; + mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR; mi.hParentMenu = hRoot; mi.position = (hMenuRoot) ? 2050000001 : 200003; mi.icolibItem = iconList[16].hIcolib; diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 31706f1858..8135f9fa36 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -38,7 +38,7 @@ void CIrcProto::InitMainMenus(void) mi.ptszName = m_tszUserName; mi.position = -1999901010; mi.hParentMenu = HGENMENU_ROOT; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; mi.icolibItem = GetIconHandle(IDI_MAIN); hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi); } @@ -48,7 +48,7 @@ void CIrcProto::InitMainMenus(void) hMenuRoot = NULL; } - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_CHILDPOPUP; mi.pszName = LPGEN("&Quick connect"); mi.icolibItem = GetIconHandle(IDI_QUICK); strcpy( d, IRC_QUICKCONNECT ); @@ -145,7 +145,6 @@ void InitContactMenus(void) CLISTMENUITEM mi = { sizeof(mi) }; mi.pszService = temp; - mi.flags = CMIF_ICONFROMICOLIB; mi.pszName = LPGEN("Channel &settings"); mi.icolibItem = GetIconHandle(IDI_MANAGER); diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index a62b1da5f7..b5ced1e725 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -115,7 +115,6 @@ void g_MenuInit(void) CLISTMENUITEM mi = { sizeof(mi) }; mi.pszService = str; - mi.flags = CMIF_ICONFROMICOLIB; // "Request authorization" strcpy(pszDest, MS_REQ_AUTH); CreateServiceFunction(str, IcqMenuHandleRequestAuth ); diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index b8b7a2d056..4453ab2884 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -873,7 +873,7 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) if (!bXStatusMenuBuilt) CreateProtoServiceParam(srvFce+len, &CIcqProto::menuXStatus, i); - mi.flags = (i ? CMIF_ICONFROMICOLIB : 0) | (bXStatus == i?CMIF_CHECKED:0); + mi.flags = (bXStatus == i ? CMIF_CHECKED : 0); mi.icolibItem = i ? hXStatusIcons[i-1] : NULL; mi.pszName = i ? (char*)nameXStatus[i-1] : (char *)LPGEN("None"); mi.pszService = srvFce; diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index c0348c53a3..2d7bbe11e9 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -193,7 +193,6 @@ void g_MenuInit(void) hChooserMenu = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&mnu); TMO_MenuItem tmi = { sizeof(tmi) }; - tmi.flags = CMIF_ICONFROMICOLIB; tmi.pszName = "Cancel"; tmi.position = 9999999; tmi.hIcolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); @@ -206,7 +205,6 @@ void g_MenuInit(void) // "Request authorization" mi.pszName = LPGEN("Request authorization"); - mi.flags = CMIF_ICONFROMICOLIB; mi.position = -2000001000; mi.icolibItem = g_GetIconHandle(IDI_REQUEST); mi.pszService = "Jabber/ReqAuth"; @@ -294,10 +292,7 @@ void g_MenuInit(void) g_hMenuDirectPresence[0] = Menu_AddContactMenuItem(&mi); mi.flags |= CMIF_ROOTHANDLE; - mi.flags &= ~CMIF_ICONFROMICOLIB; - - for (int i = 0; i < SIZEOF(PresenceModeArray); i++) - { + for (int i = 0; i < SIZEOF(PresenceModeArray); i++) { char buf[] = "Jabber/DirectPresenceX"; buf[SIZEOF(buf)-2] = '0' + i; mi.pszService = buf; @@ -310,7 +305,6 @@ void g_MenuInit(void) } mi.flags &= ~CMIF_ROOTHANDLE; - mi.flags |= CMIF_ICONFROMICOLIB; // Resource selector mi.pszService = "Jabber/ResourceSelectorDummySvc"; @@ -477,10 +471,10 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) else Menu_ShowItem(m_phMenuResourceItems[i], FALSE); } - mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | ((item->resourceMode == RSMODE_LASTSEEN) ? CMIF_CHECKED : 0); + mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP | ((item->resourceMode == RSMODE_LASTSEEN) ? CMIF_CHECKED : 0); Menu_ModifyItem(g_hMenuResourcesActive, &mi); - mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | ((item->resourceMode == RSMODE_SERVER) ? CMIF_CHECKED : 0); + mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP | ((item->resourceMode == RSMODE_SERVER) ? CMIF_CHECKED : 0); Menu_ModifyItem(g_hMenuResourcesServer, &mi); m_nMenuResourceItems = nMenuResourceItemsNew; @@ -676,7 +670,7 @@ void CJabberProto::MenuInit() mi.ptszName = m_tszUserName; mi.position = -1999901006; mi.hParentMenu = HGENMENU_ROOT; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; mi.icolibItem = m_hProtoIcon; hJabberRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi); } @@ -689,7 +683,7 @@ void CJabberProto::MenuInit() // "Bookmarks..." JCreateService("/Bookmarks", &CJabberProto::OnMenuHandleBookmarks); strcpy(tDest, "/Bookmarks"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_CHILDPOPUP; mi.hParentMenu = hJabberRoot; mi.pszName = LPGEN("Bookmarks"); mi.position = 200001; @@ -714,7 +708,7 @@ void CJabberProto::MenuInit() // "Service Discovery..." JCreateService("/ServiceDiscovery", &CJabberProto::OnMenuHandleServiceDiscovery); strcpy(tDest, "/ServiceDiscovery"); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE; + mi.flags = CMIF_ROOTHANDLE; mi.pszName = LPGEN("Service Discovery"); mi.position = 2000050001; mi.icolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY); @@ -801,7 +795,7 @@ void CJabberProto::MenuInit() mi.pszService = srvFce; mi.pszName = szName; mi.position = 2000040000; - mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_CHILDPOPUP; mi.hParentMenu = m_hMenuPriorityRoot; mir_snprintf(srvFce, sizeof(srvFce), "%s/menuSetPriority/0", m_szModuleName); diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 04289ee5d8..e0c5f041f2 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2242,7 +2242,7 @@ void CJabberProto::BuildPrivacyMenu() mi.position = 200005; mi.pszContactOwner = m_szModuleName; mi.icolibItem = GetIconHandle(IDI_AGENTS); - mi.flags = CMIF_ROOTPOPUP | CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | CMIF_HIDDEN; + mi.flags = CMIF_ROOTPOPUP | CMIF_CHILDPOPUP | CMIF_HIDDEN; mi.pszName = LPGEN("Privacy Lists"); mi.hParentMenu = MO_GetProtoRootMenu(m_szModuleName); m_hPrivacyMenuRoot = Menu_AddProtoMenuItem(&mi); @@ -2252,7 +2252,7 @@ void CJabberProto::BuildPrivacyMenu() mir_snprintf(srvFce, SIZEOF(srvFce), "%s/PrivacyLists", m_szModuleName); mi.pszService = srvFce; mi.position = 3000040000; - mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR; mi.icolibItem = GetIconHandle(IDI_PRIVACY_LISTS); mi.ptszName = LPGENT("List Editor..."); mi.hParentMenu = m_hPrivacyMenuRoot; @@ -2274,7 +2274,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 2000040000; - mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR; mi.hParentMenu = m_hPrivacyMenuRoot; mi.pszService = srvFce; diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 306527b920..05f4dc05d1 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -480,7 +480,7 @@ void CPepGuiService::RebuildMenu() mi.hParentMenu = hJabberRoot; mi.pszService = szService; mi.position = 200010; - mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIF_HIDDEN | CMIF_ROOTHANDLE; + mi.flags = CMIF_TCHAR | CMIF_HIDDEN | CMIF_ROOTHANDLE; mi.icolibItem = m_hIcolibItem; mi.ptszName = m_szText ? m_szText : _T(""); m_hMenuItem = Menu_AddProtoMenuItem(&mi); @@ -506,7 +506,7 @@ void CPepGuiService::UpdateMenuItem(HANDLE hIcolibIcon, TCHAR *text) if ( !m_hMenuItem) return; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIM_ICON | CMIM_NAME; + mi.flags = CMIF_TCHAR | CMIM_ICON | CMIM_NAME; mi.icolibItem = m_hIcolibItem; mi.ptszName = m_szText ? m_szText : _T(""); Menu_ModifyItem(m_hMenuItem, &mi); diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp index 2165803c22..f82ba302c7 100644 --- a/protocols/MRA/src/MraIcons.cpp +++ b/protocols/MRA/src/MraIcons.cpp @@ -177,12 +177,12 @@ void CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, HICON hMain hRootMenu = Menu_AddProtoMenuItem(&mi); } mi.hParentMenu = hRootMenu; - mi.flags = CMIF_UNICODE | CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_UNICODE | CMIF_CHILDPOPUP; } else { fnAddFunc = Menu_AddContactMenuItem; mi.ptszPopupName = m_tszUserName; - mi.flags = CMIF_UNICODE | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_UNICODE; } mi.popupPosition = lPopupPosition; diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4c5ebe50c0..600331cff5 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -659,7 +659,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM wParam, LPARAM lParam) mi.position = 2000060000; mi.popupPosition = 500085000; mi.ptszPopupName = szItem; - mi.flags = (CMIF_UNICODE|CMIF_ICONFROMICOLIB); + mi.flags = CMIF_UNICODE; mi.pszService = szServiceFunction; mi.pszContactOwner = m_szModuleName; diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 24038dfad1..a42aa7016e 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -292,7 +292,7 @@ void CMsnProto::MsnInitMainMenu(void) if (hRoot == NULL) { mi.popupPosition = 500085000; mi.hParentMenu = HGENMENU_ROOT; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; mi.icolibItem = GetIconHandle(IDI_MSN); mi.ptszName = m_tszUserName; hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi); @@ -302,7 +302,7 @@ void CMsnProto::MsnInitMainMenu(void) mainMenuRoot = NULL; } - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_CHILDPOPUP; mi.hParentMenu = hRoot; mi.pszService = servicefunction; @@ -427,7 +427,6 @@ void MSN_InitContactMenu(void) char* tDest = servicefunction + strlen(servicefunction); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB; mi.pszService = servicefunction; strcpy(tDest, MSN_BLOCK); @@ -446,7 +445,7 @@ void MSN_InitContactMenu(void) strcpy(tDest, MSN_NETMEETING); hNetMeeting = CreateServiceFunction(servicefunction, MsnMenuSendNetMeeting); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_NOTOFFLINE; + mi.flags = CMIF_NOTOFFLINE; mi.position = -500050002; mi.icolibItem = GetIconHandle(IDI_NETMEETING); mi.pszName = LPGEN("&Start Netmeeting"); @@ -455,7 +454,7 @@ void MSN_InitContactMenu(void) strcpy(tDest, "/SendHotmail"); hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail); mi.position = -2000010005; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_HIDDEN; + mi.flags = CMIF_HIDDEN; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SENDEMAIL); mi.pszName = LPGEN("Open &Hotmail Inbox"); hOpenInboxMenuItem = Menu_AddContactMenuItem(&mi); diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index de5c844120..34e03d3071 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -303,11 +303,11 @@ static void initMenuItems(TlenProtocol *proto) mi.ptszName = proto->m_tszUserName; mi.position = -1999901009; mi.pszPopupName = (char *)-1; - mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; mi.icolibItem = GetIconHandle(IDI_TLEN); proto->hMenuRoot = Menu_AddMainMenuItem(&mi); - mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB; + mi.flags = CMIF_CHILDPOPUP; //mi.pszPopupName = (char *)proto->hMenuRoot; mi.hParentMenu = (HGENMENU)proto->hMenuRoot; @@ -347,7 +347,6 @@ static void initMenuItems(TlenProtocol *proto) // "Send picture" sprintf(text, "%s/SendPicture", proto->m_szModuleName); CreateServiceFunction_Ex(text, proto, TlenContactMenuHandleSendPicture); - mi.flags = CMIF_ICONFROMICOLIB; mi.pszName = LPGEN("Send picture"); mi.position = -2000019030; mi.icolibItem = GetIconHandle(IDI_IMAGE); diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index e1af8a6f83..71d200b0cf 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -297,7 +297,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM,LPARAM) mi.pszService = text; mi.hParentMenu = hRoot; - mi.flags = CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE|CMIF_TCHAR; + mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR; mi.position = 1001; HANDLE m_hMenuRoot = Menu_AddStatusMenuItem(&mi); diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 7c55bfaa98..b3f886722a 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -85,7 +85,7 @@ void InitContactMenus() g_hMenuEvts[0] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU,PrebuildContactMenu); CLISTMENUITEM mi = {sizeof(mi)}; - mi.flags = CMIF_NOTOFFLINE | CMIF_ICONFROMICOLIB | CMIF_TCHAR; + mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR; mi.position=-2000006000; mi.icolibItem = GetIconHandle("reply"); diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 1ad0249b06..c375f29330 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -385,7 +385,7 @@ void CYahooProto::MenuMainInit( void ) if ( hRoot == NULL) { mi.position = 500015000; mi.hParentMenu = HGENMENU_ROOT; - mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; mi.icolibItem = GetIconHandle( IDI_YAHOO ); mi.ptszName = m_tszUserName; hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi); @@ -396,7 +396,7 @@ void CYahooProto::MenuMainInit( void ) mainMenuRoot = NULL; } - mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP; + mi.flags = CMIF_CHILDPOPUP; mi.hParentMenu = hRoot; // Show custom status menu @@ -480,7 +480,6 @@ void CYahooProto::MenuContactInit( void ) char* tDest = servicefunction + lstrlenA( servicefunction ); CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIF_ICONFROMICOLIB; mi.pszService = servicefunction; mi.pszContactOwner = m_szModuleName; 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..."); -- cgit v1.2.3