summaryrefslogtreecommitdiff
path: root/protocols/Skype
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-10-21 08:18:19 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-10-21 08:18:19 +0000
commit68d9f580b716d6ba9103663f3fc1637f41e162fc (patch)
treecf302b78a2ea2a8554cd5bfcadb20711f4b91460 /protocols/Skype
parent0b80d7b748a7ded8b0301f4006ba0612c65a6877 (diff)
fixed notification showing
git-svn-id: http://svn.miranda-ng.org/main/trunk@2010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r--protocols/Skype/src/skype.h2
-rw-r--r--protocols/Skype/src/skype_contacts.cpp2
-rw-r--r--protocols/Skype/src/skype_utils.cpp17
3 files changed, 14 insertions, 7 deletions
diff --git a/protocols/Skype/src/skype.h b/protocols/Skype/src/skype.h
index 564c85dc80..b72661ca26 100644
--- a/protocols/Skype/src/skype.h
+++ b/protocols/Skype/src/skype.h
@@ -42,6 +42,8 @@
//#pragma warning(pop)
#include <win2k.h>
+#include <m_popup2.h>
+
#include "resource.h"
#include "version.h"
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index 6d11ef7b43..29e200236d 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -757,7 +757,7 @@ void __cdecl CSkypeProto::SearchBySidAsync(void* arg)
HANDLE hContact = this->GetContactBySid(sid);
if (hContact)
{
- this->ShowNotification(sid, _T("Contact already in your contact list"), 0);
+ this->ShowNotification(sid, TranslateT("Contact already in your contact list"), 0);
this->SendBroadcast(ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)SKYPE_SEARCH_BYSID, 0);
return;
}
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index f24f347965..db4e5f60ba 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -161,7 +161,7 @@ void CSkypeProto::ShowNotification(const wchar_t *sid, const wchar_t *message, i
{
if (::Miranda_Terminated()) return;
- if (!::ServiceExists(MS_POPUP_ADDPOPUPCLASS))
+ if ( !ServiceExists(MS_POPUP_ADDPOPUPEX) || !DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) )
{
MessageBoxW(
NULL,
@@ -171,10 +171,15 @@ void CSkypeProto::ShowNotification(const wchar_t *sid, const wchar_t *message, i
}
else
{
- POPUPDATACLASS ppd = { sizeof(ppd) };
- ppd.ptszTitle = sid;
- ppd.ptszText = message;
-
- ::CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
+ POPUPDATAT_V2 ppd = {0};
+ ppd.cbSize = sizeof(POPUPDATAT_V2);
+ ppd.lchContact = NULL;
+ lstrcpyn(ppd.lpwzContactName, sid, MAX_CONTACTNAME);
+ lstrcpyn(ppd.lpwzText, message, MAX_SECONDLINE);
+ ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"Skype_main");
+ ppd.colorBack = ppd.colorText = 0;
+ ppd.iSeconds = 0;
+
+ ::CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, 0);
}
} \ No newline at end of file