From 68d9f580b716d6ba9103663f3fc1637f41e162fc Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 21 Oct 2012 08:18:19 +0000 Subject: fixed notification showing git-svn-id: http://svn.miranda-ng.org/main/trunk@2010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype.h | 2 ++ protocols/Skype/src/skype_contacts.cpp | 2 +- protocols/Skype/src/skype_utils.cpp | 17 +++++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'protocols/Skype') 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 +#include + #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 -- cgit v1.2.3