diff options
-rw-r--r-- | protocols/Skype/src/skype.h | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.h | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_utils.cpp | 22 |
4 files changed, 26 insertions, 2 deletions
diff --git a/protocols/Skype/src/skype.h b/protocols/Skype/src/skype.h index fd398a053f..0c23053a16 100644 --- a/protocols/Skype/src/skype.h +++ b/protocols/Skype/src/skype.h @@ -24,7 +24,7 @@ //#include <m_message.h>
#include <m_netlib.h>
#include <m_options.h>
-//#include <m_popup.h>
+#include <m_popup.h>
#include <m_protocols.h>
#include <m_protomod.h>
#include <m_protosvc.h>
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 086c197c2c..589ad9fcf0 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -715,7 +715,7 @@ void __cdecl CSkypeProto::SearchContactBySidAsync(void* arg) HANDLE hContact = this->GetContactBySid(sid);
if (hContact)
{
- //ShowPopup(is, _T("Contact already in your contact list"), ALLOW_MSGBOX, NULL);
+ this->ShowNotification(sid, _T("Contact already in your contact list"), 0);
this->SendBroadcast(ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)sid, 0);
return;
}
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 669ec40b09..a7c488d8d9 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -162,6 +162,8 @@ protected: int SkypeToMirandaLoginError(CAccount::LOGOUTREASON logoutReason);
+ void ShowNotification(const wchar_t *sid, const wchar_t *message, int flags = 0);
+
// instances
static LIST<CSkypeProto> instanceList;
static int CompareProtos(const CSkypeProto *p1, const CSkypeProto *p2);
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index 99463853c3..f24f347965 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -155,4 +155,26 @@ int CSkypeProto::SkypeToMirandaLoginError(CAccount::LOGOUTREASON logoutReason) }
return loginError;
+}
+
+void CSkypeProto::ShowNotification(const wchar_t *sid, const wchar_t *message, int flags)
+{
+ if (::Miranda_Terminated()) return;
+
+ if (!::ServiceExists(MS_POPUP_ADDPOPUPCLASS))
+ {
+ MessageBoxW(
+ NULL,
+ message,
+ TranslateT("Skype Protocol"),
+ MB_OK);
+ }
+ else
+ {
+ POPUPDATACLASS ppd = { sizeof(ppd) };
+ ppd.ptszTitle = sid;
+ ppd.ptszText = message;
+
+ ::CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
+ }
}
\ No newline at end of file |