summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_events.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index 44f9141e08..b9e92515f0 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -37,7 +37,7 @@ INT_PTR CSkypeProto::GetCallEventText(WPARAM, LPARAM lParam)
return nRetVal;
}
-INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam) // it not work , ????
+INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam)
{
DBEVENTINFO* dbei = (DBEVENTINFO*)lParam;
HICON icon = NULL;
@@ -49,6 +49,11 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam) // it not work ,
icon = Skin_GetIconByHandle(GetIconHandle("inc_call"));
break;
}
+ case SKYPE_DB_EVENT_TYPE_ACTION:
+ {
+ icon = LoadSkinnedIcon(SKINICON_INFORMATION);
+ break;
+ }
default:
{
icon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
@@ -65,6 +70,7 @@ void CSkypeProto::InitDBEvents()
DBEVENTTYPEDESCR dbEventType = { sizeof(dbEventType) };
dbEventType.module = m_szModuleName;
dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW;
+ dbEventType.iconService = MODULE"/GetEventIcon";
dbEventType.eventType = SKYPE_DB_EVENT_TYPE_ACTION;
dbEventType.descr = Translate("Action");
@@ -72,8 +78,36 @@ void CSkypeProto::InitDBEvents()
dbEventType.eventType = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
dbEventType.descr = Translate("Incoming call");
- dbEventType.iconService = MODULE"/GetEventIcon";
dbEventType.textService = MODULE"/GetCallText";
dbEventType.flags |= DETF_NONOTIFY;
CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+}
+
+void CSkypeProto::InitPopups()
+{
+ TCHAR desc[256];
+ char name[256];
+ POPUPCLASS ppc = { sizeof(ppc) };
+ ppc.flags = PCF_TCHAR;
+
+ mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Calls"));
+ mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Call");
+ ppc.ptszDescription = desc;
+ ppc.pszName = name;
+ ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("inc_call"));
+ ppc.colorBack = RGB(255, 255, 255);
+ ppc.colorText = RGB(0, 0, 0);
+ ppc.iSeconds = 30;
+ ppc.PluginWindowProc = PopupDlgProcCall;
+ m_hPopupClassCall = Popup_RegisterClass(&ppc);
+
+ mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Notifications"));
+ mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Notification");
+ ppc.ptszDescription = desc;
+ ppc.pszName = name;
+ ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("notify"));
+ ppc.colorBack = RGB(255, 255, 255);
+ ppc.colorText = RGB(0, 0, 0);
+ ppc.iSeconds = 5;
+ m_hPopupClassNotify = Popup_RegisterClass(&ppc);
} \ No newline at end of file