diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-31 22:31:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-31 22:31:57 +0300 |
commit | 19990d96d809a726de184724d94e0699536f6429 (patch) | |
tree | b545314b05c86718cc347f97f14a7acd78542248 /plugins/Msg_Export/src/main.cpp | |
parent | 0b0a2259bf4580f60296087a08fd2b0bf4d05313 (diff) |
icon leak fixes
Diffstat (limited to 'plugins/Msg_Export/src/main.cpp')
-rwxr-xr-x | plugins/Msg_Export/src/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 5337cb88e0..2273804ae6 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -22,6 +22,11 @@ CMPlugin g_plugin; MWindowList hInternalWindowList = nullptr;
+IconItem iconList[] =
+{
+ { "Main icon", "main", IDI_EXPORT_MESSAGE },
+};
+
/////////////////////////////////////////////////////
// Remember to update the Version in the resource !!!
/////////////////////////////////////////////////////
@@ -108,7 +113,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) if (!g_bReplaceHistory) {
CMenuItem mi(&g_plugin);
SET_UID(mi, 0x701c543, 0xd078, 0x41dd, 0x95, 0xe3, 0x96, 0x49, 0x8a, 0x72, 0xc7, 0x50);
- mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
+ mi.hIcolibItem = iconList[0].hIcolib;
mi.position = 1000090100;
mi.name.a = LPGEN("Open E&xported History");
mi.pszService = MS_SHOW_EXPORT_HISTORY;
@@ -134,6 +139,8 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) int CMPlugin::Load()
{
+ registerIcon(MODULENAME, iconList, MODULENAME);
+
HookEvent(ME_DB_EVENT_ADDED, nExportEvent);
HookEvent(ME_DB_EVENT_EDITED, nExportEvent);
HookEvent(ME_DB_CONTACT_DELETED, nContactDeleted);
|