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/SkypeWeb | |
parent | 6c4136504c660bf3359e6641362672c4b9502be5 (diff) |
merge with trunk
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_events.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_icons.cpp | 16 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_menus.cpp | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_popups.cpp | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 2 |
6 files changed, 10 insertions, 30 deletions
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index f5124b96da..60e51ce522 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -130,11 +130,11 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM flags, LPARAM pEvent) switch (dbei->eventType) {
case SKYPE_DB_EVENT_TYPE_CALL_INFO:
case SKYPE_DB_EVENT_TYPE_INCOMING_CALL:
- icon = GetIcon(IDI_CALL);
+ icon = g_plugin.getIcon(IDI_CALL);
break;
case SKYPE_DB_EVENT_TYPE_ACTION:
- icon = GetIcon(IDI_ACTION_ME);
+ icon = g_plugin.getIcon(IDI_ACTION_ME);
break;
case SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO:
diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp index 31024801f0..dcbeec6f64 100644 --- a/protocols/SkypeWeb/src/skype_icons.cpp +++ b/protocols/SkypeWeb/src/skype_icons.cpp @@ -34,19 +34,3 @@ void CSkypeProto::InitIcons() {
g_plugin.registerIcon(LPGEN("Protocols") "/" MODULE, iconList, MODULE);
}
-
-HICON CSkypeProto::GetIcon(int iconId)
-{
- for (auto &it : iconList)
- if (it.defIconID == iconId)
- return IcoLib_GetIconByHandle(it.hIcolib);
- return nullptr;
-}
-
-HANDLE CSkypeProto::GetIconHandle(int iconId)
-{
- for (auto &it : iconList)
- if (it.defIconID == iconId)
- return it.hIcolib;
- return nullptr;
-}
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index 9f9a3975bc..04ad6194d4 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -64,7 +64,7 @@ void CSkypeProto::InitMenus() mi.pszService = MODULE"/GetHistory";
mi.name.w = LPGENW("Get server history");
mi.position = CMI_POSITION + CMI_GETSERVERHISTORY;
- mi.hIcolibItem = GetIconHandle(IDI_SYNCHISTORY);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_SYNCHISTORY);
SET_UID(mi, 0xc9a64e98, 0x9257, 0x4b52, 0x98, 0xdd, 0x7f, 0x56, 0xb3, 0x90, 0xe3, 0xde);
ContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::GetContactHistory>);
@@ -72,7 +72,7 @@ void CSkypeProto::InitMenus() mi.pszService = MODULE"/BlockContact";
mi.name.w = LPGENW("Block contact");
mi.position = CMI_POSITION + CMI_BLOCK;
- mi.hIcolibItem = GetIconHandle(IDI_BLOCKUSER);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_BLOCKUSER);
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
ContactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::BlockContact>);
@@ -80,7 +80,7 @@ void CSkypeProto::InitMenus() mi.pszService = MODULE"/UnblockContact";
mi.name.w = LPGENW("Unblock contact");
mi.position = CMI_POSITION + CMI_UNBLOCK;
- mi.hIcolibItem = GetIconHandle(IDI_UNBLOCKUSER);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_UNBLOCKUSER);
SET_UID(mi, 0x88542f43, 0x7448, 0x48d0, 0x81, 0xa3, 0x26, 0x0, 0x4f, 0x37, 0xee, 0xe0);
ContactMenuItems[CMI_UNBLOCK] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::UnblockContact>);
@@ -95,6 +95,6 @@ void CSkypeProto::OnBuildProtoMenu() CreateProtoService(mi.pszService, &CSkypeProto::SvcCreateChat);
mi.name.a = LPGEN("Create new chat");
mi.position = SMI_POSITION + SMI_CREATECHAT;
- mi.hIcolibItem = GetIconHandle(IDI_CONFERENCE);
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_CONFERENCE);
Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp index f279a936b5..e147cd3936 100644 --- a/protocols/SkypeWeb/src/skype_popups.cpp +++ b/protocols/SkypeWeb/src/skype_popups.cpp @@ -12,7 +12,7 @@ void CSkypeProto::InitPopups() mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Notifications"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
- ppc.hIcon = GetIcon(IDI_NOTIFY);
+ ppc.hIcon = g_plugin.getIcon(IDI_NOTIFY);
ppc.colorBack = RGB(255, 255, 255);
ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = 5;
@@ -20,7 +20,7 @@ void CSkypeProto::InitPopups() mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
- ppc.hIcon = GetIcon(IDI_ERRORICON);
+ ppc.hIcon = g_plugin.getIcon(IDI_ERRORICON);
ppc.colorBack = RGB(255, 255, 255);
ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = -1;
@@ -28,7 +28,7 @@ void CSkypeProto::InitPopups() mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Calls"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Call");
- ppc.hIcon = GetIcon(IDI_CALL);
+ ppc.hIcon = g_plugin.getIcon(IDI_CALL);
ppc.colorBack = RGB(255, 255, 255);
ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = 30;
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 7a15904c76..1414d38855 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -195,10 +195,6 @@ private: requestQueue->Send(request, SkypeHttpResponse, delegate);
}
- // icons
- static HICON GetIcon(int iconId);
- static HANDLE GetIconHandle(int iconId);
-
// menus
static HGENMENU ContactMenuItems[CMI_MAX];
int OnPrebuildContactMenu(WPARAM hContact, LPARAM);
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index b88dbe1c5d..1207beec23 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -194,7 +194,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &) cle.hContact = hContact;
cle.hDbEvent = hEvent;
cle.lParam = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
- cle.hIcon = GetIcon(IDI_CALL);
+ cle.hIcon = g_plugin.getIcon(IDI_CALL);
CMStringA service(FORMAT, "%s/IncomingCallCLE", GetContactProto(hContact));
cle.pszService = service.GetBuffer();
|