summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/skype_accounts.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp19
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h10
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp32
4 files changed, 58 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_accounts.cpp b/protocols/SkypeWeb/src/skype_accounts.cpp
index 7396bbc867..16eefcad3a 100644
--- a/protocols/SkypeWeb/src/skype_accounts.cpp
+++ b/protocols/SkypeWeb/src/skype_accounts.cpp
@@ -52,7 +52,7 @@ int CSkypeProto::OnAccountLoaded(WPARAM, LPARAM)
HookProtoEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnPreCreateMessage);
HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CSkypeProto::OnDbEventRead);
-
+ InitPopups();
InitGroupChatModule();
return 0;
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 8cc60a5e28..f9b5ecfb52 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -302,4 +302,23 @@ int CSkypeProto::OnPreShutdown(WPARAM, LPARAM)
requestQueue->Stop();
return 0;
+}
+
+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 = 60;
+ //ppc.PluginWindowProc = PopupDlgProcCall;
+ m_hPopupClassCall = Popup_RegisterClass(&ppc);*/
} \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index 9fcb5c1f21..9c9ac6df8a 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -71,6 +71,9 @@ public:
static void InitMenus();
static void UninitMenus();
+ //popups
+ void InitPopups();
+
// languages
static void InitLanguages();
@@ -96,6 +99,9 @@ private:
static INT_PTR CALLBACK PasswordEditorProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ HANDLE
+ m_hPopupClassCall;
+
// accounts
static LIST<CSkypeProto> Accounts;
@@ -284,8 +290,8 @@ private:
int SkypeToMirandaStatus(const char *status);
char *MirandaToSkypeStatus(int status);
- static void ShowNotification(const TCHAR *message, int flags = 0, MCONTACT hContact = NULL);
- static void ShowNotification(const TCHAR *caption, const TCHAR *message, int flags = 0, MCONTACT hContact = NULL, int type = 0);
+ void ShowNotification(const TCHAR *message, int flags = 0, MCONTACT hContact = NULL);
+ void ShowNotification(const TCHAR *caption, const TCHAR *message, int flags = 0, MCONTACT hContact = NULL, int type = 0);
static bool IsFileExists(std::tstring path);
static LRESULT CALLBACK PopupDlgProcCall(HWND hPopup, UINT uMsg, WPARAM wParam, LPARAM lParam);
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 81ccde08d5..0b35bf7803 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -458,7 +458,7 @@ void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, i
if (Miranda_Terminated())
return;
- if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
+ if (ServiceExists(MS_POPUP_ADDPOPUPT))
{
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
@@ -475,8 +475,36 @@ void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, i
if (!PUAddPopupT(&ppd))
return;
}
+ /*
+ if (ServiceExists(MS_POPUP_ADDPOPUPT))
+ {
+ if (type == SKYPE_DB_EVENT_TYPE_INCOMING_CALL)
+ {
+ char className[256];
+
+ POPUPDATACLASS ppd = { 0 };
+ ppd.ptszTitle = caption;
+ ppd.ptszText = message;
+ ppd.hContact = hContact;
+ ppd.pszClassName = className;
+ mir_snprintf(className, SIZEOF(className), "%s_%s", m_szModuleName, "Call");
+ CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
+ return;
+ }
+ else
+ {
+ POPUPDATAT ppd = { 0 };
+ ppd.lchContact = hContact;
+ _tcsncpy(ppd.lptzContactName, caption, MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
+ ppd.lchIcon = Skin_GetIcon("Skype_main");
+ PUAddPopupT(&ppd);
+ return;
+ }
+ }*/
+
- //MessageBox(NULL, message, caption, MB_OK | flags);
+ MessageBox(NULL, message, caption, MB_OK | flags);
}
LRESULT CSkypeProto::PopupDlgProcCall(HWND hPopup, UINT uMsg, WPARAM wParam, LPARAM lParam)