summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-26 21:52:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-26 21:52:00 +0300
commitd84b7beba3fd5148033b57b75c8299a2672377be (patch)
tree50b1a3ac0052aa58b7e7fd1250cf4152723d164a
parent6ae4da7c29bf777cf96b651af1a9a429d20c7b9e (diff)
ME_SKIN2_ICONSCHANGED is totally obsoleted, thus removed
-rw-r--r--include/delphi/m_icolib.inc2
-rw-r--r--include/delphi/m_skin.inc8
-rw-r--r--include/m_icolib.h2
-rw-r--r--include/m_skin.h7
-rw-r--r--plugins/Actman/ua/i_opt_dlg.inc2
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp2
-rw-r--r--plugins/Alarms/src/icons.cpp2
-rw-r--r--plugins/AutoShutdown/src/frame.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp3
-rw-r--r--plugins/ChangeKeyboardLayout/src/main.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_tbbutton.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp2
-rw-r--r--plugins/FileAsMessage/src/main.cpp2
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp2
-rw-r--r--plugins/FloatingContacts/src/stdafx.h1
-rw-r--r--plugins/HistoryPlusPlus/historypp.dpr2
-rw-r--r--plugins/HistoryStats/src/iconlib.cpp2
-rwxr-xr-xplugins/New_GPG/src/icons.cpp2
-rw-r--r--plugins/NoHistory/src/icons.cpp2
-rw-r--r--plugins/Ping/src/ping.cpp2
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/QuickSearch/quicksearch.dpr2
-rw-r--r--plugins/QuickSearch/sr_optdialog.pas2
-rw-r--r--plugins/Scriver/src/globals.cpp2
-rw-r--r--plugins/SecureIM/src/loadicons.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TopToolBar/src/toolbar.cpp2
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp4
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp2
-rw-r--r--plugins/Variables/src/variables.cpp2
-rw-r--r--plugins/Watrack/kolframe/kolframe.pas2
-rw-r--r--plugins/Watrack/popup/popups.pas2
-rw-r--r--plugins/Watrack/watrack.dpr2
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rw-r--r--protocols/Steam/src/main.cpp2
-rw-r--r--src/core/stdmsg/src/globals.cpp2
-rw-r--r--src/mir_app/src/IcoLib.h5
-rw-r--r--src/mir_app/src/chat_svc.cpp4
-rw-r--r--src/mir_app/src/icolib.cpp21
-rw-r--r--src/mir_app/src/menu_utils.cpp2
-rw-r--r--src/mir_app/src/skin2opts.cpp4
46 files changed, 67 insertions, 64 deletions
diff --git a/include/delphi/m_icolib.inc b/include/delphi/m_icolib.inc
index 57e68e57ef..a804c3c643 100644
--- a/include/delphi/m_icolib.inc
+++ b/include/delphi/m_icolib.inc
@@ -101,6 +101,6 @@ function IcoLib_IsManaged(icon:HICON) : THandle; stdcall;
Icons change notification
}
const
- ME_SKIN2_ICONSCHANGED:PAnsiChar = 'Skin2/IconsChanged';
+ ME_SKIN_ICONSCHANGED:PAnsiChar = 'Skin/IconsChanged';
{$ENDIF}
diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc
index 0aa6d537e9..b1cf7e3acc 100644
--- a/include/delphi/m_skin.inc
+++ b/include/delphi/m_skin.inc
@@ -123,12 +123,4 @@ const
}
MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
- {
- wParam : 0
- lParam : 0
- Affect : Sent when the icons DLL has been changed in the options dialog
- and everyone should remake their image lists.
- }
- ME_SKIN_ICONSCHANGED:PAnsiChar = 'Skin/IconsChanged';
-
{$ENDIF}
diff --git a/include/m_icolib.h b/include/m_icolib.h
index 497f018ae5..b63fc4abf0 100644
--- a/include/m_icolib.h
+++ b/include/m_icolib.h
@@ -113,7 +113,7 @@ MIR_APP_DLL(void) Window_FreeIcon_IcoLib(HWND hWnd);
///////////////////////////////////////////////////////////////////////////////
// Icons' change notification event
-#define ME_SKIN2_ICONSCHANGED "Skin2/IconsChanged"
+#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged"
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_skin.h b/include/m_skin.h
index 33ab4e6e49..33f110e017 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -137,13 +137,6 @@ EXTERN_C MIR_APP_DLL(int) Skin_PlaySoundFile(const wchar_t *pwszFileName);
EXTERN_C MIR_APP_DLL(void) KillModuleSounds(HPLUGIN);
/////////////////////////////////////////////////////////////////////////////////////////
-// sent when the icons DLL has been changed in the options dialog, and everyone
-// should re-make their image lists
-// wParam = lParam = 0
-
-#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// wParam: 0 when playing sound (1 when sound is being previewed)
// lParam: (wchar_t*) pszSoundFile
// Affect: This hook is fired when the sound module needs to play a sound
diff --git a/plugins/Actman/ua/i_opt_dlg.inc b/plugins/Actman/ua/i_opt_dlg.inc
index 99b12d44dc..76f9021dfc 100644
--- a/plugins/Actman/ua/i_opt_dlg.inc
+++ b/plugins/Actman/ua/i_opt_dlg.inc
@@ -548,7 +548,7 @@ begin
ShowAction(Dialog,-1);
settings:=Dialog;
- hIC:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ hIC:=HookEvent(ME_SKIN_ICONSCHANGED,@IconChanged);
end;
WM_COMMAND: begin
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index fb7288c366..7e771bacc3 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -158,7 +158,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
TranslateDialogDefault(hdlg);
Window_SetIcon_IcoLib(hdlg, IcoLib_GetIconHandle(ICON_ADD));
- HookEventMessage(ME_SKIN2_ICONSCHANGED, hdlg, DM_ADDCONTACT_CHANGEICONS);
+ HookEventMessage(ME_SKIN_ICONSCHANGED, hdlg, DM_ADDCONTACT_CHANGEICONS);
HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
{
wchar_t *szGroup;
diff --git a/plugins/Alarms/src/icons.cpp b/plugins/Alarms/src/icons.cpp
index f85b12a5f1..a35223442d 100644
--- a/plugins/Alarms/src/icons.cpp
+++ b/plugins/Alarms/src/icons.cpp
@@ -31,5 +31,5 @@ void InitIcons()
hIconMenuShowHide = IcoLib_GetIcon("alarms_menu_showhide");
ReloadIcons(0, 0);
- HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
+ HookEvent(ME_SKIN_ICONSCHANGED, ReloadIcons);
}
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp
index ad77a5223b..ccae0afbd2 100644
--- a/plugins/AutoShutdown/src/frame.cpp
+++ b/plugins/AutoShutdown/src/frame.cpp
@@ -166,7 +166,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP
/* init layout */
dat->hHookColorsChanged = HookEventMessage(ME_COLOUR_RELOAD, hwndFrame, M_REFRESH_COLORS);
dat->hHookFontsChanged = HookEventMessage(ME_FONT_RELOAD, hwndFrame, M_REFRESH_FONTS);
- dat->hHookIconsChanged = HookEventMessage(ME_SKIN2_ICONSCHANGED, hwndFrame, M_REFRESH_ICONS);
+ dat->hHookIconsChanged = HookEventMessage(ME_SKIN_ICONSCHANGED, hwndFrame, M_REFRESH_ICONS);
SendMessage(hwndFrame, M_REFRESH_COLORS, 0, 0);
SendMessage(hwndFrame, M_REFRESH_FONTS, 0, 0);
SendMessage(hwndFrame, M_REFRESH_ICONS, 0, 0);
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index 99632fc836..9d5e39be70 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -321,7 +321,7 @@ int CMPlugin::Load()
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
HookEvent(ME_OPT_INITIALISE, OptInit);
- HookEvent(ME_SKIN2_ICONSCHANGED, IcoLibIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, IcoLibIconsChanged);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PreBuildContactMenu);
CreateServiceFunction(MS_AVATARHISTORY_ENABLED, IsEnabled);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 2f4226e18a..48649fcc95 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -665,8 +665,7 @@ int CMPlugin::Load()
g_plugin.registerIcon("BuddyExpectator", iconList);
- HookEvent(ME_SKIN2_ICONSCHANGED, onIconsChanged);
-
+ HookEvent(ME_SKIN_ICONSCHANGED, onIconsChanged);
onIconsChanged(0, 0);
hExtraIcon = ExtraIcon_RegisterIcolib("buddy_exp", LPGEN("Buddy Expectator"), "enabled_icon");
diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp
index 51b09a88a8..473f714b74 100644
--- a/plugins/ChangeKeyboardLayout/src/main.cpp
+++ b/plugins/ChangeKeyboardLayout/src/main.cpp
@@ -56,7 +56,7 @@ int CMPlugin::Load()
// IcoLib support
g_plugin.registerIcon(MODULENAME, iconList);
- HookEvent(ME_SKIN2_ICONSCHANGED, OnIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnIconsChanged);
OnIconsChanged(0, 0);
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index ef4e3da383..1c23c44009 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1598,7 +1598,7 @@ static int clcHookModulesLoaded(WPARAM, LPARAM)
clcHookIconsChanged(0, 0);
- HookEvent(ME_SKIN2_ICONSCHANGED, clcHookIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, clcHookIconsChanged);
// Register smiley category
if (ServiceExists(MS_SMILEYADD_REGISTERCATEGORY)) {
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 20d4d4ad94..cf57338e49 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -249,7 +249,7 @@ HRESULT CLUI::CreateCluiFrames()
CreateUIFrames();
HookEvent(ME_SYSTEM_MODULESLOADED, CLUI::OnEvent_ModulesLoaded);
- HookEvent(ME_SKIN2_ICONSCHANGED, CLUI_IconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, CLUI_IconsChanged);
HookEvent(ME_FONT_RELOAD, CLUI::OnEvent_FontReload);
return S_OK;
}
diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp
index 93745e6aa2..a49d754049 100644
--- a/plugins/Clist_modern/src/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/src/modern_tbbutton.cpp
@@ -495,7 +495,7 @@ int Buttons_OnSkinModeSettingsChanged(WPARAM, LPARAM)
HRESULT ToolbarButtonLoadModule()
{
hButtonWindowList = WindowList_Create();
- HookEvent(ME_SKIN2_ICONSCHANGED, OnIconLibIconChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnIconLibIconChanged);
HookEvent(ME_BACKGROUNDCONFIG_CHANGED, Buttons_OnSkinModeSettingsChanged);
return S_OK;
}
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index b82004bbc3..c524c64a9a 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -297,7 +297,7 @@ void CLN_LoadAllIcons(BOOL mode)
{
if (mode) {
InitIcoLib();
- HookEvent(ME_SKIN2_ICONSCHANGED, IcoLibChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, IcoLibChanged);
}
CacheClientIcons();
}
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index cf52d9ecb2..867239a6af 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -172,7 +172,7 @@ void InitExtraImg(void)
CreateServiceFunction(MS_FLAGS_DETECTCONTACTORIGINCOUNTRY, ServiceDetectContactOriginCountry);
HookEvent(ME_SYSTEM_MODULESLOADED, ExtraImgModulesLoaded);
- HookEvent(ME_SKIN2_ICONSCHANGED, StatusIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, StatusIconsChanged);
HookEvent(ME_OPT_INITIALISE, OnOptionsInit);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ExtraImgSettingChanged);
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 2cebbb4a99..a0b7a37e05 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -169,7 +169,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
for (int indx = 0; indx < _countof(hIcons); indx++)
hIcons[indx] = IcoLib_GetIconByHandle(iconList[indx].hIcolib);
- hHookSkinIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, OnSkinIconsChanged);
+ hHookSkinIconsChanged = HookEvent(ME_SKIN_ICONSCHANGED, OnSkinIconsChanged);
CMenuItem mi(&g_plugin);
SET_UID(mi, 0xe4a98d2a, 0xa54a, 0x4db1, 0x8d, 0x29, 0xd, 0x5c, 0xf1, 0x10, 0x69, 0x35);
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 8ab34436fe..c0ac0410c9 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -878,7 +878,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
g_LPCodePage = Langpack_GetDefaultCodePage();
//Hook necessary events
- HookEvent(ME_SKIN2_ICONSCHANGED, OnIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnIconsChanged);
HookEvent(ME_MSG_WINDOWEVENT, OnSrmmWindowEvent);
HookEvent(ME_MC_DEFAULTTCHANGED, OnExtraImageApply);
diff --git a/plugins/FloatingContacts/src/stdafx.h b/plugins/FloatingContacts/src/stdafx.h
index 3270519abe..743d49362c 100644
--- a/plugins/FloatingContacts/src/stdafx.h
+++ b/plugins/FloatingContacts/src/stdafx.h
@@ -18,6 +18,7 @@
#include <m_database.h>
#include <m_message.h>
#include <m_options.h>
+#include <m_icolib.h>
#include <m_clistint.h>
#include <m_hotkeys.h>
#include <m_imgsrvc.h>
diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr
index 605f320c9c..a9843a5d2a 100644
--- a/plugins/HistoryPlusPlus/historypp.dpr
+++ b/plugins/HistoryPlusPlus/historypp.dpr
@@ -280,7 +280,7 @@ begin
HookPreshutdown := HookEvent(ME_SYSTEM_PRESHUTDOWN,OnPreshutdown);
if SmileyAddEnabled then HookSmAddChanged := HookEvent(ME_SMILEYADD_OPTIONSCHANGED,OnSmAddSettingsChanged);
- HookIcon2Changed := HookEvent(ME_SKIN2_ICONSCHANGED,OnIcon2Changed);
+ HookIcon2Changed := HookEvent(ME_SKIN_ICONSCHANGED,OnIcon2Changed);
HookFSChanged := HookEvent(ME_FONT_RELOAD,OnFSChanged);
HookMetaDefaultChanged := HookEvent(ME_MC_DEFAULTTCHANGED,OnMetaDefaultChanged);
diff --git a/plugins/HistoryStats/src/iconlib.cpp b/plugins/HistoryStats/src/iconlib.cpp
index e8241df759..4e2ff979d2 100644
--- a/plugins/HistoryStats/src/iconlib.cpp
+++ b/plugins/HistoryStats/src/iconlib.cpp
@@ -91,7 +91,7 @@ void IconLib::init()
}
}
- m_hHookSkin2IconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, handleCallbacks);
+ m_hHookSkin2IconsChanged = HookEvent(ME_SKIN_ICONSCHANGED, handleCallbacks);
}
if (!m_bIcoLibAvailable) {
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp
index 6b3268e732..cae56f8302 100755
--- a/plugins/New_GPG/src/icons.cpp
+++ b/plugins/New_GPG/src/icons.cpp
@@ -29,7 +29,7 @@ void InitIconLib()
HANDLE IconLibHookIconsChanged(MIRANDAHOOK hook)
{
- return HookEvent(ME_SKIN2_ICONSCHANGED, hook);
+ return HookEvent(ME_SKIN_ICONSCHANGED, hook);
}
void setClistIcon(MCONTACT hContact)
diff --git a/plugins/NoHistory/src/icons.cpp b/plugins/NoHistory/src/icons.cpp
index 0fb6176f81..b24cadf3c2 100644
--- a/plugins/NoHistory/src/icons.cpp
+++ b/plugins/NoHistory/src/icons.cpp
@@ -23,5 +23,5 @@ void InitIcons()
ReloadIcons(0, 0);
- HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
+ HookEvent(ME_SKIN_ICONSCHANGED, ReloadIcons);
}
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp
index af99d9c4a9..7ae9fadf9b 100644
--- a/plugins/Ping/src/ping.cpp
+++ b/plugins/Ping/src/ping.cpp
@@ -134,7 +134,7 @@ int CMPlugin::Load()
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, PingOptInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
- HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
+ HookEvent(ME_SKIN_ICONSCHANGED, ReloadIcons);
g_plugin.registerIcon(LPGEN("Ping"), iconList);
return 0;
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index a97c4a41b6..22c36072c0 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -383,7 +383,7 @@ int CMPlugin::Load()
// load icons / create hook
InitIcons();
- HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, IconsChanged);
// add menu items
InitMenuItems();
diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr
index 59f0c1ddcc..d04f0f980d 100644
--- a/plugins/QuickSearch/quicksearch.dpr
+++ b/plugins/QuickSearch/quicksearch.dpr
@@ -107,7 +107,7 @@ begin
Skin_AddIcon(@sid);
DestroyIcon(sid.hDefaultIcon);
- HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED,@IconChanged);
end;
function OnOptInitialise(wParam:WPARAM;lParam:LPARAM):int;cdecl;
diff --git a/plugins/QuickSearch/sr_optdialog.pas b/plugins/QuickSearch/sr_optdialog.pas
index b5ee06be06..1d7e0fb38d 100644
--- a/plugins/QuickSearch/sr_optdialog.pas
+++ b/plugins/QuickSearch/sr_optdialog.pas
@@ -760,7 +760,7 @@ begin
update_list(listhwnd);
- hook:=HookEventParam(ME_SKIN2_ICONSCHANGED,@IconChanged,Dialog);
+ hook:=HookEventParam(ME_SKIN_ICONSCHANGED,@IconChanged,Dialog);
result:=1;
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 29c9e7b0b0..6a06f414d7 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -100,7 +100,7 @@ static IconItem iconList3[] =
void RegisterIcons(void)
{
- HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, IconsChanged);
g_plugin.registerIcon(LPGEN("Single Messaging"), iconList1);
g_plugin.registerIcon(LPGEN("Group chats"), iconList2);
diff --git a/plugins/SecureIM/src/loadicons.cpp b/plugins/SecureIM/src/loadicons.cpp
index 5140dc7754..6ae33f233d 100644
--- a/plugins/SecureIM/src/loadicons.cpp
+++ b/plugins/SecureIM/src/loadicons.cpp
@@ -116,5 +116,5 @@ void InitIcons(void)
g_hPOP[icons[i].idx] = hIcon;
}
- HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
+ HookEvent(ME_SKIN_ICONSCHANGED, ReloadIcons);
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index 8a50c8f9d7..4ae688bf8c 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -930,7 +930,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
SendDlgItemMessage(hwndDlg, IDC_EDIT1, EM_LIMITTEXT, 1024, 0);
HookEventMessage(ME_SYSTEM_PRESHUTDOWN, hwndDlg, DM_SIMPAWAY_SHUTDOWN);
- HookEventMessage(ME_SKIN2_ICONSCHANGED, hwndDlg, DM_SIMPAWAY_CHANGEICONS);
+ HookEventMessage(ME_SKIN_ICONSCHANGED, hwndDlg, DM_SIMPAWAY_CHANGEICONS);
copy_init_data->num_def_msgs = g_plugin.getWord("DefMsgCount", 0);
copy_init_data->max_hist_msgs = g_plugin.getByte("MaxHist", 10);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 052fd72127..e3eb078e24 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -227,7 +227,7 @@ void CGlobals::hookSystemEvents()
{
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SKIN_ICONSCHANGED, ::IconsChanged);
- HookEvent(ME_SKIN2_ICONSCHANGED, ::IcoLibIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, ::IcoLibIconsChanged);
HookEvent(ME_PROTO_CONTACTISTYPING, CMimAPI::TypingMessage);
HookEvent(ME_PROTO_ACK, CMimAPI::ProtoAck);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreshutdownSendRecv);
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp
index 24873ae5ce..2b536faf2d 100644
--- a/plugins/TopToolBar/src/toolbar.cpp
+++ b/plugins/TopToolBar/src/toolbar.cpp
@@ -645,7 +645,7 @@ int LoadToolbarModule()
HookEvent(ME_SYSTEM_MODULEUNLOAD, OnPluginUnload);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoad);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
- HookEvent(ME_SKIN2_ICONSCHANGED, OnIconChange);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnIconChange);
HookEvent(ME_OPT_INITIALISE, TTBOptInit);
hTTBModuleLoaded = CreateHookableEvent(ME_TTB_MODULELOADED);
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index 82b90cc0da..3f439e7f92 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -143,7 +143,7 @@ static int OnMsgWndEvent(WPARAM, LPARAM lParam)
return 0;
}
-// hookProc ME_SKIN2_ICONSCHANGED
+// hookProc ME_SKIN_ICONSCHANGED
static int OnStatusIconsChanged(WPARAM, LPARAM)
{
UpdateStatusIcons();
@@ -202,7 +202,7 @@ void SvcFlagsLoadModule()
g_bUseUnknownFlag = db_get_b(0, MODNAMEFLAGS, "UseUnknownFlag", SETTING_USEUNKNOWNFLAG_DEFAULT) != 0;
g_bShowStatusIconFlag = db_get_b(0, MODNAMEFLAGS, "ShowStatusIconFlag", SETTING_SHOWSTATUSICONFLAG_DEFAULT) != 0;
- HookEvent(ME_SKIN2_ICONSCHANGED, OnStatusIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnStatusIconsChanged);
// get local langID for descIcon (try to use user local Flag as icon)
DWORD langid = 0;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 60f544b937..4356f92b7b 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -584,7 +584,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
pPs->hContact = pPsh->_hContact;
pPs->hProtoAckEvent = HookEventMessage(ME_PROTO_ACK, hDlg, HM_PROTOACK);
pPs->hSettingChanged = HookEventMessage(ME_DB_CONTACT_SETTINGCHANGED, hDlg, HM_SETTING_CHANGED);
- pPs->hIconsChanged = HookEventMessage(ME_SKIN2_ICONSCHANGED, hDlg, HM_RELOADICONS);
+ pPs->hIconsChanged = HookEventMessage(ME_SKIN_ICONSCHANGED, hDlg, HM_RELOADICONS);
ShowWindow(GetDlgItem(hDlg, IDC_PAGETITLEBG), IsAeroMode());
ShowWindow(GetDlgItem(hDlg, IDC_PAGETITLEBG2), !IsAeroMode());
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index ddad427cd9..96b8fe2449 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -398,7 +398,7 @@ int LoadVarModule()
g_plugin.registerIcon(LPGEN("Variables"), iconList);
- hIconsChangedHook = HookEvent(ME_SKIN2_ICONSCHANGED, iconsChanged);
+ hIconsChangedHook = HookEvent(ME_SKIN_ICONSCHANGED, iconsChanged);
CreateServiceFunction(MS_VARS_GETSKINITEM, getSkinItemService);
hOptionsHook = HookEvent(ME_OPT_INITIALISE, OptionsInit);
diff --git a/plugins/Watrack/kolframe/kolframe.pas b/plugins/Watrack/kolframe/kolframe.pas
index e3255c8f8c..9b4378dffd 100644
--- a/plugins/Watrack/kolframe/kolframe.pas
+++ b/plugins/Watrack/kolframe/kolframe.pas
@@ -276,7 +276,7 @@ begin
result:=ord(CreateFrame(0));
if result<>0 then
- sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ sic:=HookEvent(ME_SKIN_ICONSCHANGED,@IconChanged);
end;
procedure DeInitProc(aSetDisable:boolean);
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas
index 4bf7f5adc0..8fe5366a03 100644
--- a/plugins/Watrack/popup/popups.pas
+++ b/plugins/Watrack/popup/popups.pas
@@ -405,7 +405,7 @@ begin
sid.szDescription.a:='Music Info';
Skin_AddIcon(@sid);
DestroyIcon(sid.hDefaultIcon);
- HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED,@IconChanged);
FillChar(mi,SizeOf(mi),0);
SET_UID(@mi, '225458FC-C423-4B20-A798-2DB423506F80');
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr
index 93af84731b..b12c5cdb4b 100644
--- a/plugins/Watrack/watrack.dpr
+++ b/plugins/Watrack/watrack.dpr
@@ -497,7 +497,7 @@ begin
//!! OleInitialize(nil);
if RegisterIcons then
- HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED,@IconChanged);
CreateMenus;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 1cf32c5b5a..6196fc0f13 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -181,7 +181,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) :
HookProtoEvent(ME_LANGPACK_CHANGED, &CJabberProto::OnLangChanged);
HookProtoEvent(ME_OPT_INITIALISE, &CJabberProto::OnOptionsInit);
- HookProtoEvent(ME_SKIN2_ICONSCHANGED, &CJabberProto::OnReloadIcons);
+ HookProtoEvent(ME_SKIN_ICONSCHANGED, &CJabberProto::OnReloadIcons);
HookProtoEvent(ME_DB_CONTACT_SETTINGCHANGED, &CJabberProto::OnDbSettingChanged);
m_iqManager.FillPermanentHandlers();
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp
index 223b422ca0..9daabf1e60 100644
--- a/protocols/Steam/src/main.cpp
+++ b/protocols/Steam/src/main.cpp
@@ -38,7 +38,7 @@ int CMPlugin::Load()
mir_snprintf(iconName, "%s_%s", MODULE, "gaming");
// extra statuses
- HookEvent(ME_SKIN2_ICONSCHANGED, OnReloadIcons);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnReloadIcons);
hExtraXStatus = ExtraIcon_RegisterIcolib("steam_game", LPGEN("Steam game"), iconName);
CSteamProto::InitMenus();
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index b73545338e..d4561e6007 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -160,7 +160,7 @@ void InitGlobals()
HookEvent(ME_DB_EVENT_ADDED, dbaddedevent);
HookEvent(ME_DB_EVENT_EDITED, dbaddedevent);
HookEvent(ME_PROTO_ACK, ackevent);
- HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, IconsChanged);
HookEvent(ME_AV_AVATARCHANGED, AvatarChanged);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
HookEvent(ME_MC_DEFAULTTCHANGED, OnMetaChanged);
diff --git a/src/mir_app/src/IcoLib.h b/src/mir_app/src/IcoLib.h
index 202e99fb96..7b4ea76779 100644
--- a/src/mir_app/src/IcoLib.h
+++ b/src/mir_app/src/IcoLib.h
@@ -111,6 +111,9 @@ IconSourceItem* GetIconSourceItem(const wchar_t* file, int indx, int cxIcon, int
IcolibItem* IcoLib_FindHIcon(HICON hIcon, bool &big);
IcolibItem* IcoLib_FindIcon(const char* pszIconName);
+void CreateImageLists();
+void DestroyImageLists();
+
int SkinOptionsInit(WPARAM, LPARAM);
extern mir_cs csIconList;
@@ -120,4 +123,4 @@ extern LIST<SectionItem> sectionList;
extern BOOL bNeedRebuild;
extern int iconEventActive;
extern HICON hIconBlank;
-extern HANDLE hIcons2ChangedEvent, hIconsChangedEvent;
+extern HANDLE hIconsChangedEvent;
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 5b98f4fe44..9deb887ec7 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -764,6 +764,7 @@ int LoadChatModule(void)
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
HookEvent(ME_SKIN_ICONSCHANGED, IconsChanged);
+ HookEvent(ME_FONT_RELOAD, FontsChanged);
g_hWindowList = WindowList_Create();
hHookEvent = CreateHookableEvent(ME_GC_HOOK_EVENT);
@@ -773,9 +774,6 @@ int LoadChatModule(void)
g_chatApi.hevPreCreate = CreateHookableEvent(ME_MSG_PRECREATEEVENT);
g_chatApi.hevWinPopup = CreateHookableEvent(ME_MSG_WINDOWPOPUP);
- HookEvent(ME_FONT_RELOAD, FontsChanged);
- HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);
-
g_hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_SRMM));
TranslateMenu(g_hMenu);
diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp
index e40a83f971..bda29a14d8 100644
--- a/src/mir_app/src/icolib.cpp
+++ b/src/mir_app/src/icolib.cpp
@@ -28,7 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static BOOL bModuleInitialized = FALSE;
static volatile LONG iStaticCount = 1;
-HANDLE hIcons2ChangedEvent, hIconsChangedEvent;
+static HIMAGELIST himlSmall, hImlBig;
+HANDLE hIconsChangedEvent;
HICON hIconBlank = nullptr;
@@ -64,6 +65,18 @@ LIST<IcolibItem> iconList(20, sttCompareIcons);
/////////////////////////////////////////////////////////////////////////////////////////
// Utility functions
+void CreateImageLists()
+{
+ himlSmall = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 50, 50);
+ hImlBig = ImageList_Create(g_iIconX, g_iIconY, ILC_COLOR32 | ILC_MASK, 50, 50);
+}
+
+void DestroyImageLists()
+{
+ ImageList_Destroy(himlSmall); himlSmall = 0;
+ ImageList_Destroy(hImlBig); hImlBig = 0;
+}
+
void __fastcall SafeDestroyIcon(HICON &hIcon)
{
if (hIcon != nullptr) {
@@ -781,9 +794,10 @@ int LoadIcoLibModule(void)
hIconBlank = LoadIconEx(g_plugin.getInst(), MAKEINTRESOURCE(IDI_BLANK), 0);
- hIcons2ChangedEvent = CreateHookableEvent(ME_SKIN2_ICONSCHANGED);
hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED);
+ CreateImageLists();
+
HookEvent(ME_OPT_INITIALISE, SkinOptionsInit);
return 0;
}
@@ -794,7 +808,8 @@ void UnloadIcoLibModule(void)
return;
DestroyHookableEvent(hIconsChangedEvent);
- DestroyHookableEvent(hIcons2ChangedEvent);
+
+ DestroyImageLists();
for (auto &p : iconList)
delete p;
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp
index 799f417bdf..b2328884d0 100644
--- a/src/mir_app/src/menu_utils.cpp
+++ b/src/mir_app/src/menu_utils.cpp
@@ -1278,7 +1278,6 @@ static VOID CALLBACK PostRegisterIcons(HWND, UINT, UINT_PTR, DWORD)
static int OnModulesLoaded(WPARAM, LPARAM)
{
posttimerid = SetTimer(nullptr, 0, 5, (TIMERPROC)PostRegisterIcons);
- HookEvent(ME_SKIN2_ICONSCHANGED, OnIconLibChanges);
return 0;
}
@@ -1289,6 +1288,7 @@ int InitGenMenu()
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, GenMenuOptInit);
+ HookEvent(ME_SKIN_ICONSCHANGED, OnIconLibChanges);
return 0;
}
diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp
index ea8a54d6a8..24fe66819d 100644
--- a/src/mir_app/src/skin2opts.cpp
+++ b/src/mir_app/src/skin2opts.cpp
@@ -485,9 +485,11 @@ class CIcoLibOptsDlg : public CDlgBase
{
UpdateIconsPreview();
+ DestroyImageLists();
+ CreateImageLists();
+
iconEventActive = 1; // Disable icon destroying - performance boost
NotifyEventHooks(hIconsChangedEvent, 0, 0);
- NotifyEventHooks(hIcons2ChangedEvent, 0, 0);
iconEventActive = 0;
mir_cslock lck(csIconList); // Destroy unused icons