From eeb7f248a5228964f416610bef81397e424adc52 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Mar 2019 15:15:05 +0300 Subject: =?UTF-8?q?=D0=BD=D0=B5=20=D0=BF=D1=80=D0=B8=D0=B3=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BB=D0=BE=D1=81=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_app/src/IcoLib.h | 3 --- src/mir_app/src/icolib.cpp | 17 ----------------- src/mir_app/src/skin2opts.cpp | 3 --- 3 files changed, 23 deletions(-) diff --git a/src/mir_app/src/IcoLib.h b/src/mir_app/src/IcoLib.h index 7b4ea76779..a1637d4f03 100644 --- a/src/mir_app/src/IcoLib.h +++ b/src/mir_app/src/IcoLib.h @@ -111,9 +111,6 @@ 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; diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp index bda29a14d8..e8605688c4 100644 --- a/src/mir_app/src/icolib.cpp +++ b/src/mir_app/src/icolib.cpp @@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static BOOL bModuleInitialized = FALSE; static volatile LONG iStaticCount = 1; -static HIMAGELIST himlSmall, hImlBig; HANDLE hIconsChangedEvent; HICON hIconBlank = nullptr; @@ -65,18 +64,6 @@ LIST 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) { @@ -796,8 +783,6 @@ int LoadIcoLibModule(void) hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED); - CreateImageLists(); - HookEvent(ME_OPT_INITIALISE, SkinOptionsInit); return 0; } @@ -809,8 +794,6 @@ void UnloadIcoLibModule(void) DestroyHookableEvent(hIconsChangedEvent); - DestroyImageLists(); - for (auto &p : iconList) delete p; iconList.destroy(); diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp index 24fe66819d..03aec37087 100644 --- a/src/mir_app/src/skin2opts.cpp +++ b/src/mir_app/src/skin2opts.cpp @@ -485,9 +485,6 @@ class CIcoLibOptsDlg : public CDlgBase { UpdateIconsPreview(); - DestroyImageLists(); - CreateImageLists(); - iconEventActive = 1; // Disable icon destroying - performance boost NotifyEventHooks(hIconsChangedEvent, 0, 0); iconEventActive = 0; -- cgit v1.2.3