diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-13 20:22:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-13 20:22:59 +0300 |
commit | 680873487c4a7987012606119a744e5ca725ad30 (patch) | |
tree | 8e5fbc68a253c3ec44287754c9295670f1ee44c3 /protocols/Sametime | |
parent | 6c4136504c660bf3359e6641362672c4b9502be5 (diff) |
merge with trunk
Diffstat (limited to 'protocols/Sametime')
-rw-r--r-- | protocols/Sametime/src/conference.cpp | 4 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime.cpp | 22 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime.h | 4 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_session.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/utils.cpp | 8 |
5 files changed, 7 insertions, 33 deletions
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 19cfa0cc16..dcba8b5dd6 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -455,13 +455,13 @@ void CSametimeProto::InitConferenceMenu() SET_UID(mi, 0x98cf8a8c, 0x75ba, 0x46f2, 0xa3, 0x35, 0x65, 0x46, 0x4a, 0x38, 0x20, 0x7d);
mi.name.w = LPGENW("Leave conference");
mi.pszService = MS_SAMETIME_MENULEAVECHAT;
- mi.hIcolibItem = GetIconHandle(IDI_ICON_LEAVE);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_ICON_LEAVE);
hLeaveChatMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
SET_UID(mi, 0x45501e10, 0x2914, 0x4daa, 0xb4, 0xcf, 0x83, 0x8a, 0x6a, 0x14, 0xd, 0x7);
mi.name.w = LPGENW("Start conference");
mi.pszService = MS_SAMETIME_MENUCREATECHAT;
- mi.hIcolibItem = GetIconHandle(IDI_ICON_INVITE);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_ICON_INVITE);
hCreateChatMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSametimeProto::PrebuildContactMenu);
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index ab7dce7818..189e877a66 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -86,28 +86,6 @@ void SametimeInitIcons(void) g_plugin.registerIcon("Protocols/Sametime", iconList, "SAMETIME");
}
-HANDLE GetIconHandle(int iconId)
-{
- for (int i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == iconId)
- return iconList[i].hIcolib;
- return nullptr;
-}
-
-HICON LoadIconEx(const char* name, bool big)
-{
- char szSettingName[100];
- mir_snprintf(szSettingName, "%s_%s", "SAMETIME", name);
- return IcoLib_GetIcon(szSettingName, big);
-}
-
-void ReleaseIconEx(const char* name, bool big)
-{
- char szSettingName[100];
- mir_snprintf(szSettingName, "%s_%s", "SAMETIME", name);
- IcoLib_Release(szSettingName, big);
-}
-
// Copied from MSN plugin - sent acks need to be from different thread
void __cdecl sttFakeAckInfoSuccessThread(TFakeAckParams* tParam)
{
diff --git a/protocols/Sametime/src/sametime.h b/protocols/Sametime/src/sametime.h index ca84829906..2714779be2 100644 --- a/protocols/Sametime/src/sametime.h +++ b/protocols/Sametime/src/sametime.h @@ -41,10 +41,6 @@ INT_PTR CALLBACK CALLBACK SearchDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam void mwResolve_handler_callback(mwServiceResolve* srvc, guint32 id, guint32 code, GList* results, gpointer data);
void SametimeInitIcons(void);
-HANDLE GetIconHandle(int iconId);
-HICON LoadIconEx(const char* name, bool big);
-void ReleaseIconEx(const char* name, bool big);
-
// services (async thread functions)
struct TFakeAckParams
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 4634782034..79dfa47224 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -567,6 +567,6 @@ void CSametimeProto::InitSessionMenu() mi.position = 2000060000;
mi.name.w = LPGENW("Send announcement...");
mi.pszService = MS_SAMETIME_MENUANNOUNCESESSION;
- mi.hIcolibItem = GetIconHandle(IDI_ICON_ANNOUNCE);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_ICON_ANNOUNCE);
Menu_AddContactMenuItem(&mi, m_szModuleName);
}
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp index 368a9cc093..5644c72342 100644 --- a/protocols/Sametime/src/utils.cpp +++ b/protocols/Sametime/src/utils.cpp @@ -42,8 +42,8 @@ void CSametimeProto::RegisterPopups() mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify");
mir_snwprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Notifications"));
- puc.hIcon = CopyIcon(LoadIconEx("notify", FALSE));
- ReleaseIconEx("notify", FALSE);
+ puc.hIcon = CopyIcon(g_plugin.getIcon(IDI_ICON_NOTIFY));
+ g_plugin.releaseIcon(IDI_ICON_NOTIFY);
puc.iSeconds = 8;
puc.colorBack = GetSysColor(COLOR_BTNFACE);
puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
@@ -51,8 +51,8 @@ void CSametimeProto::RegisterPopups() mir_snprintf(szName, "%s_%s", m_szModuleName, "Error");
mir_snwprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Errors"));
- puc.hIcon = CopyIcon(LoadIconEx("error", FALSE));
- ReleaseIconEx("error", FALSE);
+ puc.hIcon = CopyIcon(g_plugin.getIcon(IDI_ICON_ERROR, FALSE));
+ g_plugin.releaseIcon(IDI_ICON_ERROR);
puc.iSeconds = 10;
puc.colorBack = GetSysColor(COLOR_BTNFACE);
puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
|