summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-13 20:22:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-13 20:22:59 +0300
commit680873487c4a7987012606119a744e5ca725ad30 (patch)
tree8e5fbc68a253c3ec44287754c9295670f1ee44c3 /plugins/Scriver
parent6c4136504c660bf3359e6641362672c4b9502be5 (diff)
merge with trunk
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat_main.cpp3
-rw-r--r--plugins/Scriver/src/chat_window.cpp10
-rw-r--r--plugins/Scriver/src/globals.cpp145
-rw-r--r--plugins/Scriver/src/globals.h1
-rw-r--r--plugins/Scriver/src/msgdialog.cpp8
-rw-r--r--plugins/Scriver/src/msglog.cpp6
-rw-r--r--plugins/Scriver/src/msgs.cpp6
7 files changed, 81 insertions, 98 deletions
diff --git a/plugins/Scriver/src/chat_main.cpp b/plugins/Scriver/src/chat_main.cpp
index 9bd5f5b4f2..6fdf6ac8bc 100644
--- a/plugins/Scriver/src/chat_main.cpp
+++ b/plugins/Scriver/src/chat_main.cpp
@@ -88,8 +88,7 @@ static MODULEINFO* MM_CreateModule()
static void OnCreateModule(MODULEINFO *mi)
{
HIMAGELIST hList = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 0);
-
- int overlayIcon = ImageList_AddIcon(hList, GetCachedIcon("chat_overlay"));
+ int overlayIcon = g_plugin.addImgListIcon(hList, IDI_OVERLAY);
ImageList_SetOverlayImage(hList, overlayIcon, 1);
int index = ImageList_AddIcon(hList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp
index d3b8863594..9b31e2e3bc 100644
--- a/plugins/Scriver/src/chat_window.cpp
+++ b/plugins/Scriver/src/chat_window.cpp
@@ -346,7 +346,7 @@ void CChatRoomDlg::onClick_ShowList(CCtrlButton *pButton)
return;
m_bNicklistEnabled = !m_bNicklistEnabled;
- pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bNicklistEnabled ? "chat_nicklist" : "chat_nicklist2"));
+ pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST : IDI_NICKLIST2));
ScrollToBottom();
Resize();
}
@@ -357,7 +357,7 @@ void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton)
return;
m_bFilterEnabled = !m_bFilterEnabled;
- pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bFilterEnabled ? "chat_filter" : "chat_filter2"));
+ pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER : IDI_FILTER2));
if (m_bFilterEnabled && db_get_b(0, CHAT_MODULE, "RightClickFilter", 0) == 0)
ShowFilterMenu();
else
@@ -450,8 +450,8 @@ void CChatRoomDlg::UpdateNickList()
void CChatRoomDlg::UpdateOptions()
{
- m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bNicklistEnabled ? "chat_nicklist" : "chat_nicklist2"));
- m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bFilterEnabled ? "chat_filter" : "chat_filter2"));
+ m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST : IDI_NICKLIST2));
+ m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER : IDI_FILTER2));
m_btnBold.Enable(m_si->pMI->bBold);
m_btnItalic.Enable(m_si->pMI->bItalics);
@@ -523,7 +523,7 @@ void CChatRoomDlg::UpdateTitle()
TitleBarData tbd = {};
tbd.hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? m_si->pMI->hOnlineIcon : m_si->pMI->hOfflineIcon;
tbd.hIconBig = (m_si->wStatus == ID_STATUS_ONLINE) ? m_si->pMI->hOnlineIconBig : m_si->pMI->hOfflineIconBig;
- tbd.hIconNot = (m_si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? GetCachedIcon("chat_overlay") : nullptr;
+ tbd.hIconNot = (m_si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? g_plugin.getIcon(IDI_OVERLAY) : nullptr;
int nUsers = m_si->getUserList().getCount();
wchar_t szTemp[512];
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 6a06f414d7..0e4ba89823 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -25,86 +25,86 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
GlobalMessageData g_dat;
-static const char *buttonIcons[] =
+static int buttonIcons[] =
{
- "scriver_CLOSEX", "scriver_QUOTE", "scriver_ADD", nullptr,
- "scriver_USERDETAILS", "scriver_HISTORY", "scriver_SEND"
+ IDI_CLOSEX, IDI_QUOTE, IDI_ADDCONTACT, 0,
+ IDI_USERDETAILS, IDI_HISTORY, IDI_SEND
};
-static const char *chatButtonIcons[] =
+static int chatButtonIcons[] =
{
- "scriver_CLOSEX", "chat_bold", "chat_italics", "chat_underline",
- "chat_fgcol", "chat_bkgcol", "chat_history", "chat_filter",
- "chat_settings", "chat_nicklist", "scriver_SEND"
+ IDI_CLOSEX, IDI_BBOLD, IDI_BITALICS, IDI_BUNDERLINE,
+ IDI_COLOR, IDI_BKGCOLOR, IDI_HISTORY, IDI_FILTER,
+ IDI_TOPICBUT, IDI_NICKLIST, IDI_SEND
};
static IconItem iconList1[] =
{
- { LPGEN("Add contact"), "scriver_ADD", IDI_ADDCONTACT }, // 1
- { LPGEN("User's details"), "scriver_USERDETAILS", IDI_USERDETAILS }, // 2
- { LPGEN("User's history"), "scriver_HISTORY", IDI_HISTORY }, // 3
- { LPGEN("Send message"), "scriver_SEND", IDI_SEND }, // 4
- { LPGEN("Smiley button"), "scriver_SMILEY", IDI_SMILEY }, // 5
- { LPGEN("User is typing"), "scriver_TYPING", IDI_TYPING }, // 6
- { LPGEN("Typing notification off"), "scriver_TYPINGOFF", IDI_TYPINGOFF }, // 7
- { LPGEN("Sending"), "scriver_DELIVERING", IDI_TIMESTAMP }, // 8
- { LPGEN("Quote button"), "scriver_QUOTE", IDI_QUOTE }, // 9
- { LPGEN("Close button"), "scriver_CLOSEX", IDI_CLOSEX }, // 10
- { LPGEN("Icon overlay"), "scriver_OVERLAY", IDI_OVERLAY }, // 11
- { LPGEN("Incoming message (10x10)"),"scriver_INCOMING", IDI_INCOMING, 10}, // 12
- { LPGEN("Outgoing message (10x10)"),"scriver_OUTGOING", IDI_OUTGOING, 10}, // 13
- { LPGEN("Notice (10x10)"), "scriver_NOTICE", IDI_NOTICE, 10}, // 14
+ { LPGEN("Add contact"), "ADD", IDI_ADDCONTACT }, // 1
+ { LPGEN("User's details"), "USERDETAILS", IDI_USERDETAILS }, // 2
+ { LPGEN("User's history"), "HISTORY", IDI_HISTORY }, // 3
+ { LPGEN("Send message"), "SEND", IDI_SEND }, // 4
+ { LPGEN("Smiley button"), "SMILEY", IDI_SMILEY }, // 5
+ { LPGEN("User is typing"), "TYPING", IDI_TYPING }, // 6
+ { LPGEN("Typing notification off"), "TYPINGOFF", IDI_TYPINGOFF }, // 7
+ { LPGEN("Sending"), "DELIVERING", IDI_TIMESTAMP }, // 8
+ { LPGEN("Quote button"), "QUOTE", IDI_QUOTE }, // 9
+ { LPGEN("Close button"), "CLOSEX", IDI_CLOSEX }, // 10
+ { LPGEN("Icon overlay"), "OVERLAY", IDI_OVERLAY }, // 11
+ { LPGEN("Incoming message (10x10)"),"INCOMING", IDI_INCOMING, 10}, // 12
+ { LPGEN("Outgoing message (10x10)"),"OUTGOING", IDI_OUTGOING, 10}, // 13
+ { LPGEN("Notice (10x10)"), "NOTICE", IDI_NOTICE, 10}, // 14
};
static IconItem iconList2[] =
{
- { LPGEN("Window Icon"), "chat_window", IDI_CHANMGR }, // 1
- { LPGEN("Text color"), "chat_fgcol", IDI_COLOR }, // 2
- { LPGEN("Background color") , "chat_bkgcol", IDI_BKGCOLOR }, // 3
- { LPGEN("Bold"), "chat_bold", IDI_BBOLD }, // 4
- { LPGEN("Italics"), "chat_italics", IDI_BITALICS }, // 5
- { LPGEN("Underlined"), "chat_underline", IDI_BUNDERLINE }, // 6
- { LPGEN("Smiley button"), "chat_smiley", IDI_SMILEY }, // 7
- { LPGEN("Room history"), "chat_history", IDI_HISTORY }, // 8
- { LPGEN("Room settings"), "chat_settings", IDI_TOPICBUT }, // 9
- { LPGEN("Event filter disabled"), "chat_filter", IDI_FILTER }, // 10
- { LPGEN("Event filter enabled"), "chat_filter2", IDI_FILTER2 }, // 11
- { LPGEN("Hide nick list"), "chat_nicklist", IDI_NICKLIST }, // 12
- { LPGEN("Show nick list"), "chat_nicklist2", IDI_NICKLIST2 }, // 13
- { LPGEN("Icon overlay"), "chat_overlay", IDI_OVERLAY }, // 14
- { LPGEN("Status 1 (10x10)"), "chat_status0", IDI_STATUS0, 10}, // 15
- { LPGEN("Status 2 (10x10)"), "chat_status1", IDI_STATUS1, 10}, // 16
- { LPGEN("Status 3 (10x10)"), "chat_status2", IDI_STATUS2, 10}, // 17
- { LPGEN("Status 4 (10x10)"), "chat_status3", IDI_STATUS3, 10}, // 18
- { LPGEN("Status 5 (10x10)"), "chat_status4", IDI_STATUS4, 10}, // 19
- { LPGEN("Status 6 (10x10)"), "chat_status5", IDI_STATUS5, 10}, // 20
+ { LPGEN("Window Icon"), "window", IDI_CHANMGR }, // 1
+ { LPGEN("Text color"), "fgcol", IDI_COLOR }, // 2
+ { LPGEN("Background color") , "bkgcol", IDI_BKGCOLOR }, // 3
+ { LPGEN("Bold"), "bold", IDI_BBOLD }, // 4
+ { LPGEN("Italics"), "italics", IDI_BITALICS }, // 5
+ { LPGEN("Underlined"), "underline", IDI_BUNDERLINE }, // 6
+ { LPGEN("Smiley button"), "smiley", IDI_SMILEY }, // 7
+ { LPGEN("Room history"), "history", IDI_HISTORY }, // 8
+ { LPGEN("Room settings"), "settings", IDI_TOPICBUT }, // 9
+ { LPGEN("Event filter disabled"), "filter", IDI_FILTER }, // 10
+ { LPGEN("Event filter enabled"), "filter2", IDI_FILTER2 }, // 11
+ { LPGEN("Hide nick list"), "nicklist", IDI_NICKLIST }, // 12
+ { LPGEN("Show nick list"), "nicklist2", IDI_NICKLIST2 }, // 13
+ { LPGEN("Icon overlay"), "overlay", IDI_OVERLAY }, // 14
+ { LPGEN("Status 1 (10x10)"), "status0", IDI_STATUS0, 10}, // 15
+ { LPGEN("Status 2 (10x10)"), "status1", IDI_STATUS1, 10}, // 16
+ { LPGEN("Status 3 (10x10)"), "status2", IDI_STATUS2, 10}, // 17
+ { LPGEN("Status 4 (10x10)"), "status3", IDI_STATUS3, 10}, // 18
+ { LPGEN("Status 5 (10x10)"), "status4", IDI_STATUS4, 10}, // 19
+ { LPGEN("Status 6 (10x10)"), "status5", IDI_STATUS5, 10}, // 20
};
static IconItem iconList3[] =
{
- { LPGEN("Message in (10x10)"), "chat_log_message_in", IDI_INCOMING, 10}, // 1
- { LPGEN("Message out (10x10)"), "chat_log_message_out", IDI_OUTGOING, 10}, // 2
- { LPGEN("Action (10x10)"), "chat_log_action", IDI_ACTION, 10}, // 3
- { LPGEN("Add Status (10x10)"), "chat_log_addstatus", IDI_ADDSTATUS,10}, // 4
- { LPGEN("Remove status (10x10)"), "chat_log_removestatus", IDI_REMSTATUS,10}, // 5
- { LPGEN("Join (10x10)"), "chat_log_join", IDI_JOIN, 10}, // 6
- { LPGEN("Leave (10x10)"), "chat_log_part", IDI_PART, 10}, // 7
- { LPGEN("Quit (10x10)"), "chat_log_quit", IDI_QUIT, 10}, // 8
- { LPGEN("Kick (10x10)"), "chat_log_kick", IDI_KICK, 10}, // 9
- { LPGEN("Nickchange (10x10)"), "chat_log_nick", IDI_NICK, 10}, // 10
- { LPGEN("Notice (10x10)"), "chat_log_notice", IDI_CHAT_NOTICE, 10}, // 11
- { LPGEN("Topic (10x10)"), "chat_log_topic", IDI_TOPIC, 10}, // 12
- { LPGEN("Highlight (10x10)"), "chat_log_highlight", IDI_NOTICE, 10}, // 13
- { LPGEN("Information (10x10)"), "chat_log_info", IDI_INFO, 10}, // 14
+ { LPGEN("Message in (10x10)"), "log_message_in", IDI_INCOMING, 10}, // 1
+ { LPGEN("Message out (10x10)"), "log_message_out", IDI_OUTGOING, 10}, // 2
+ { LPGEN("Action (10x10)"), "log_action", IDI_ACTION, 10}, // 3
+ { LPGEN("Add Status (10x10)"), "log_addstatus", IDI_ADDSTATUS,10}, // 4
+ { LPGEN("Remove status (10x10)"), "log_removestatus", IDI_REMSTATUS,10}, // 5
+ { LPGEN("Join (10x10)"), "log_join", IDI_JOIN, 10}, // 6
+ { LPGEN("Leave (10x10)"), "log_part", IDI_PART, 10}, // 7
+ { LPGEN("Quit (10x10)"), "log_quit", IDI_QUIT, 10}, // 8
+ { LPGEN("Kick (10x10)"), "log_kick", IDI_KICK, 10}, // 9
+ { LPGEN("Nickchange (10x10)"), "log_nick", IDI_NICK, 10}, // 10
+ { LPGEN("Notice (10x10)"), "log_notice", IDI_CHAT_NOTICE, 10}, // 11
+ { LPGEN("Topic (10x10)"), "log_topic", IDI_TOPIC, 10}, // 12
+ { LPGEN("Highlight (10x10)"), "log_highlight", IDI_NOTICE, 10}, // 13
+ { LPGEN("Information (10x10)"), "log_info", IDI_INFO, 10}, // 14
};
void RegisterIcons(void)
{
HookEvent(ME_SKIN_ICONSCHANGED, IconsChanged);
- g_plugin.registerIcon(LPGEN("Single Messaging"), iconList1);
- g_plugin.registerIcon(LPGEN("Group chats"), iconList2);
- g_plugin.registerIcon(LPGEN("Single Messaging"), iconList3);
+ g_plugin.registerIcon(LPGEN("Single Messaging"), iconList1, "scriver");
+ g_plugin.registerIcon(LPGEN("Group chats"), iconList2, "chat");
+ g_plugin.registerIcon(LPGEN("Single Messaging"), iconList3, "chat");
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -215,23 +215,6 @@ void ReleaseIcons()
IcoLib_ReleaseIcon(g_dat.hIconChatBig);
}
-HICON GetCachedIcon(const char *name)
-{
- for (auto &it : iconList1)
- if (!mir_strcmp(it.szName, name))
- return IcoLib_GetIconByHandle(it.hIcolib);
-
- for (auto &it : iconList2)
- if (!mir_strcmp(it.szName, name))
- return IcoLib_GetIconByHandle(it.hIcolib);
-
- for (auto &it : iconList3)
- if (!mir_strcmp(it.szName, name))
- return IcoLib_GetIconByHandle(it.hIcolib);
-
- return nullptr;
-}
-
void LoadGlobalIcons()
{
g_dat.hMsgIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
@@ -244,18 +227,20 @@ void LoadGlobalIcons()
ImageList_RemoveAll(g_dat.hSearchEngineIconList);
for (auto &it : buttonIcons) {
- if (it == nullptr)
+ if (it == 0)
ImageList_AddIcon_ProtoEx(g_dat.hButtonIconList, nullptr, ID_STATUS_OFFLINE);
else
- ImageList_AddIcon(g_dat.hButtonIconList, GetCachedIcon(it));
+ g_plugin.addImgListIcon(g_dat.hButtonIconList, it);
}
for (auto &it : chatButtonIcons)
- ImageList_AddIcon(g_dat.hChatButtonIconList, GetCachedIcon(it));
+ g_plugin.addImgListIcon(g_dat.hChatButtonIconList, it);
- ImageList_AddIcon(g_dat.hHelperIconList, GetCachedIcon("scriver_OVERLAY"));
- int overlayIcon = ImageList_AddIcon(g_dat.hHelperIconList, GetCachedIcon("scriver_OVERLAY"));
+ g_plugin.addImgListIcon(g_dat.hHelperIconList, IDI_OVERLAY);
+
+ int overlayIcon = g_plugin.addImgListIcon(g_dat.hHelperIconList, IDI_OVERLAY);
ImageList_SetOverlayImage(g_dat.hHelperIconList, overlayIcon, 1);
+
for (int i = IDI_GOOGLE; i < IDI_LASTICON; i++) {
HICON hIcon = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(i), IMAGE_ICON, 0, 0, 0);
ImageList_AddIcon(g_dat.hSearchEngineIconList, hIcon);
diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h
index 7bb80122aa..da1b381213 100644
--- a/plugins/Scriver/src/globals.h
+++ b/plugins/Scriver/src/globals.h
@@ -128,7 +128,6 @@ void ReloadGlobals();
void RegisterIcons();
void ReleaseIcons();
void LoadGlobalIcons();
-HICON GetCachedIcon(const char *name);
void RegisterFontServiceFonts();
int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 91db9a165a..9444c5078b 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -584,7 +584,7 @@ void CSrmmWindow::onChanged_Splitter(CSplitter *pSplitter)
HICON CSrmmWindow::GetTabIcon()
{
if (m_bShowTyping)
- return GetCachedIcon("scriver_TYPING");
+ return g_plugin.getIcon(IDI_TYPING);
if (m_iShowUnread != 0)
return m_hStatusIconOverlay;
@@ -595,7 +595,7 @@ HICON CSrmmWindow::GetTabIcon()
void CSrmmWindow::GetTitlebarIcon(TitleBarData *tbd)
{
if (m_bShowTyping && (g_dat.flags2 & SMF2_SHOWTYPINGWIN))
- tbd->hIconNot = tbd->hIcon = GetCachedIcon("scriver_TYPING");
+ tbd->hIconNot = tbd->hIcon = g_plugin.getIcon(IDI_TYPING);
else if (m_iShowUnread && (GetActiveWindow() != m_hwndParent || GetForegroundWindow() != m_hwndParent)) {
tbd->hIcon = m_hStatusIcon;
tbd->hIconNot = g_dat.hMsgIcon;
@@ -747,12 +747,12 @@ void CSrmmWindow::UpdateStatusBar()
StatusBarData sbd = { 0 };
sbd.iFlags = SBDF_TEXT | SBDF_ICON;
if (m_iMessagesInProgress && (g_dat.flags & SMF_SHOWPROGRESS)) {
- sbd.hIcon = GetCachedIcon("scriver_DELIVERING");
+ sbd.hIcon = g_plugin.getIcon(IDI_TIMESTAMP);
sbd.pszText = szText;
mir_snwprintf(szText, TranslateT("Sending in progress: %d message(s) left..."), m_iMessagesInProgress);
}
else if (m_nTypeSecs) {
- sbd.hIcon = GetCachedIcon("scriver_TYPING");
+ sbd.hIcon = g_plugin.getIcon(IDI_TYPING);
sbd.pszText = szText;
mir_snwprintf(szText, TranslateT("%s is typing a message..."), Clist_GetContactDisplayName(m_hContact));
m_nTypeSecs--;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index bcea9f130e..67de067e91 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -793,17 +793,17 @@ void LoadMsgLogIcons(void)
for (int i = 0; i < _countof(pLogIconBmpBits); i++) {
switch (i) {
case LOGICON_MSG_IN:
- ImageList_AddIcon(g_hImageList, GetCachedIcon("scriver_INCOMING"));
+ g_plugin.addImgListIcon(g_hImageList, IDI_INCOMING);
hIcon = ImageList_GetIcon(g_hImageList, LOGICON_MSG_IN, ILD_NORMAL);
hBrush = hInBkgBrush;
break;
case LOGICON_MSG_OUT:
- ImageList_AddIcon(g_hImageList, GetCachedIcon("scriver_OUTGOING"));
+ g_plugin.addImgListIcon(g_hImageList, IDI_OUTGOING);
hIcon = ImageList_GetIcon(g_hImageList, LOGICON_MSG_OUT, ILD_NORMAL);
hBrush = hOutBkgBrush;
break;
case LOGICON_MSG_NOTICE:
- ImageList_AddIcon(g_hImageList, GetCachedIcon("scriver_NOTICE"));
+ g_plugin.addImgListIcon(g_hImageList, IDI_NOTICE);
hIcon = ImageList_GetIcon(g_hImageList, LOGICON_MSG_NOTICE, ILD_NORMAL);
hBrush = hBkgBrush;
break;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 8355dc8868..5b16986d68 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -205,7 +205,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
cle.hContact = hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
- cle.hIcon = GetCachedIcon("scriver_TYPING");
+ cle.hIcon = g_plugin.getIcon(IDI_TYPING);
cle.pszService = MS_MSG_TYPINGMESSAGE;
cle.szTooltip.w = szTip;
g_clistApi.pfnAddEvent(&cle);
@@ -402,8 +402,8 @@ static void RegisterStatusIcons()
StatusIconData sid = {};
sid.szModule = SRMM_MODULE;
sid.dwId = 1;
- sid.hIcon = GetCachedIcon("scriver_TYPING");
- sid.hIconDisabled = GetCachedIcon("scriver_TYPINGOFF");
+ sid.hIcon = g_plugin.getIcon(IDI_TYPING);
+ sid.hIconDisabled = g_plugin.getIcon(IDI_TYPINGOFF);
sid.flags = MBF_HIDDEN;
Srmm_AddIcon(&sid, &g_plugin);
}