diff options
-rw-r--r-- | protocols/SkypeWeb/res/resource.rc | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/resource.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_events.cpp | 13 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_icons.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 14 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 22 |
6 files changed, 45 insertions, 14 deletions
diff --git a/protocols/SkypeWeb/res/resource.rc b/protocols/SkypeWeb/res/resource.rc index a111e51824..ec5222a4a8 100644 --- a/protocols/SkypeWeb/res/resource.rc +++ b/protocols/SkypeWeb/res/resource.rc @@ -33,6 +33,8 @@ IDI_BLOCKUSER ICON "Icons\\user_block.ico" IDI_UNBLOCKUSER ICON "Icons\\user_unblock.ico"
IDI_CALL ICON "Icons\\call.ico"
IDI_NOTIFY ICON "Icons\\notify.ico"
+IDI_ACTION_ME ICON "Icons\\me.ico"
+IDI_ERRORICON ICON "Icons\\error.ico"
#endif // Нейтральный (по умолчанию) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/SkypeWeb/src/resource.h b/protocols/SkypeWeb/src/resource.h index 53db7f58e7..0e6ade4cb5 100644 --- a/protocols/SkypeWeb/src/resource.h +++ b/protocols/SkypeWeb/src/resource.h @@ -18,6 +18,8 @@ #define IDI_UNBLOCKUSER 119
#define IDI_CALL 120
#define IDI_NOTIFY 121
+#define IDI_ERRORICON 122
+#define IDI_ACTION_ME 123
#define IDC_AUTOSYNC 1028
#define IDC_LOCALTIME 1029
#define IDC_CLIST 1030
@@ -29,7 +31,7 @@ //
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 122
+#define _APS_NEXT_RESOURCE_VALUE 124
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1034
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index 0388a08433..6ca36100cb 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -43,6 +43,7 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam) switch (dbei->eventType)
{
+ case SKYPE_DB_EVENT_TYPE_CALL_INFO:
case SKYPE_DB_EVENT_TYPE_INCOMING_CALL:
{
icon = Skin_GetIconByHandle(GetIconHandle("inc_call"));
@@ -50,7 +51,7 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam) }
case SKYPE_DB_EVENT_TYPE_ACTION:
{
- icon = LoadSkinnedIcon(SKINICON_INFORMATION);
+ icon = Skin_GetIconByHandle(GetIconHandle("me_action"));
break;
}
default:
@@ -113,4 +114,14 @@ void CSkypeProto::InitPopups() ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = 5;
m_hPopupClassNotify = Popup_RegisterClass(&ppc);
+
+ mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
+ ppc.ptszDescription = desc;
+ ppc.pszName = name;
+ ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("error"));
+ ppc.colorBack = RGB(255, 255, 255);
+ ppc.colorText = RGB(0, 0, 0);
+ ppc.iSeconds = -1;
+ m_hPopupClassNotify = Popup_RegisterClass(&ppc);
}
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp index 7733f454bb..3da4926862 100644 --- a/protocols/SkypeWeb/src/skype_icons.cpp +++ b/protocols/SkypeWeb/src/skype_icons.cpp @@ -25,7 +25,9 @@ IconInfo CSkypeProto::Icons[] = { LPGENT("Block user icon"), "user_block", IDI_BLOCKUSER },
{ LPGENT("Unblock user icon"), "user_unblock", IDI_UNBLOCKUSER },
{ LPGENT("Incoming call icon"), "inc_call", IDI_CALL },
- { LPGENT("Notification icon"), "notify", IDI_NOTIFY }
+ { LPGENT("Notification icon"), "notify", IDI_NOTIFY },
+ { LPGENT("Error icon"), "error", IDI_ERRORICON },
+ { LPGENT("Action icon"), "me_action", IDI_ACTION_ME }
};
void CSkypeProto::InitIcons()
{
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index ea7a78f741..cf637b462a 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -20,14 +20,14 @@ void CSkypeProto::OnCreateTrouter(const NETLIBHTTPREQUEST *response) {
if (response == NULL || response->pData == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
JSONROOT root(response->pData);
if (root == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
@@ -39,7 +39,7 @@ void CSkypeProto::OnCreateTrouter(const NETLIBHTTPREQUEST *response) if (ccid == NULL || connId == NULL || instance == NULL || socketio == NULL || url == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
@@ -56,7 +56,7 @@ void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response) {
if (response == NULL || response->pData == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
@@ -64,7 +64,7 @@ void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response) if (root == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
@@ -74,7 +74,7 @@ void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response) if (st == NULL || se == NULL || sig == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
@@ -98,7 +98,7 @@ void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response, void *p) {
if (response == NULL || response->pData == NULL)
{
- ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."));
+ ShowNotification(_A2T(m_szModuleName), TranslateT("Failed establish a TRouter connection."), 0, NULL, 1);
return;
}
bool isHealth = (bool)p;
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 6defeed3f5..0024ba63c8 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -449,10 +449,24 @@ void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, i if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
CMStringA className(FORMAT, "%s_", m_szModuleName);
- if (type == SKYPE_DB_EVENT_TYPE_INCOMING_CALL)
- className.Append("Call");
- else
- className.Append("Notification");
+ switch (type)
+ {
+ case 1:
+ {
+ className.Append("Error");
+ break;
+ }
+ case SKYPE_DB_EVENT_TYPE_INCOMING_CALL:
+ {
+ className.Append("Call");
+ break;
+ }
+ default:
+ {
+ className.Append("Notification");
+ break;
+ }
+ }
POPUPDATACLASS ppd = { sizeof(ppd) };
ppd.ptszTitle = caption;
|