From 54b0d7050646da8099e4559ef5fcfba1b57d0957 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 18 Sep 2017 23:09:05 +0300 Subject: TabSRMM: all icons added to icolib (fixes #301) --- plugins/TabSRMM/src/msgs.cpp | 12 ++++++++++++ plugins/TabSRMM/src/typingnotify.cpp | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 2322e9a7aa..411717f89b 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -908,6 +908,18 @@ static int TSAPI SetupIconLibConfig() sid.description.a = LPGEN("Feature enabled (used as overlay)"); sid.iDefaultIndex = -IDI_FEATURE_ENABLED; IcoLib_AddIcon(&sid); + + sid.section.a = LPGEN("Message Sessions") "/" LPGEN("Popups"); + sid.pszName = "tabSRMM_popups_disabled"; + sid.description.a = LPGEN("Enable typing notification"); + sid.iDefaultIndex = -IDI_DISABLED; + IcoLib_AddIcon(&sid); + + sid.pszName = "tabSRMM_popups_enabled"; + sid.description.a = LPGEN("Disable typing notification"); + sid.iDefaultIndex = -IDI_ENABLED; + IcoLib_AddIcon(&sid); + return 1; } diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index f3757364e5..48da8a6311 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -45,9 +45,9 @@ static INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM) if (PluginConfig.g_bPopupAvail) { if (!Disabled) - Menu_ModifyItem(hDisableMenu, LPGENW("Disable &typing notification"), LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED))); + Menu_ModifyItem(hDisableMenu, LPGENW("Disable &typing notification"), IcoLib_GetIcon("tabSRMM_popups_enabled")); else - Menu_ModifyItem(hDisableMenu, LPGENW("Enable &typing notification"), LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED))); + Menu_ModifyItem(hDisableMenu, LPGENW("Enable &typing notification"), IcoLib_GetIcon("tabSRMM_popups_disabled")); } return 0; @@ -535,11 +535,11 @@ int TN_ModuleInit() SET_UID(mi, 0xe18fd2cf, 0xcf90, 0x459e, 0xb6, 0xe6, 0x70, 0xec, 0xad, 0xc6, 0x73, 0xef); if (!Disabled) { mi.name.a = LPGEN("Disable &typing notification"); - mi.hIcolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED)); + mi.hIcolibItem = IcoLib_GetIcon("tabSRMM_popups_enabled"); } else { mi.name.a = LPGEN("Enable &typing notification"); - mi.hIcolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED)); + mi.hIcolibItem = IcoLib_GetIcon("tabSRMM_popups_disabled"); } mi.pszService = "TypingNotify/EnableDisableMenuCommand"; mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0); -- cgit v1.2.3