summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-06-10 10:42:46 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-06-10 10:42:46 +0000
commitef6701c0f1f29970a54a1a1e0219a1b5bbeb4984 (patch)
tree47936978d0385f84771eae9aed4d6a7a5a02f36d /protocols
parentdf428745363d5b3d22f2a737930ca0e7af8e2221 (diff)
Skype:
- proto goes offline on disconnect - fixed notifications git-svn-id: http://svn.miranda-ng.org/main/trunk@4907 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Skype/src/skype_account.cpp10
-rw-r--r--protocols/Skype/src/skype_instances.cpp15
-rw-r--r--protocols/Skype/src/skype_runtime.cpp2
-rw-r--r--protocols/Skype/src/skype_utils.cpp10
4 files changed, 18 insertions, 19 deletions
diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp
index 3bdc8d023c..b070a7d1af 100644
--- a/protocols/Skype/src/skype_account.cpp
+++ b/protocols/Skype/src/skype_account.cpp
@@ -349,13 +349,13 @@ void CSkypeProto::OnAccountChanged(int prop)
this->UpdateProfile(this->account.fetch());
break;
- /*case CAccount::P_AVAILABILITY:
+ case CAccount::P_AVAILABILITY:
{
- CContact::AVAILABILITY status;
+ Contact::AVAILABILITY status;
this->account->GetPropAvailability(status);
- if (status != CContact::CONNECTING && status >= CContact::ONLINE)
- this->SetStatus(this->SkypeToMirandaStatus(status));
+ if (status == CContact::CONNECTING && this->IsOnline())
+ this->SetStatus(ID_STATUS_OFFLINE);
}
- break;*/
+ break;
}
} \ No newline at end of file
diff --git a/protocols/Skype/src/skype_instances.cpp b/protocols/Skype/src/skype_instances.cpp
index 2875311c3f..bde45547b8 100644
--- a/protocols/Skype/src/skype_instances.cpp
+++ b/protocols/Skype/src/skype_instances.cpp
@@ -9,11 +9,11 @@ int CSkypeProto::CompareProtos(const CSkypeProto *p1, const CSkypeProto *p2)
CSkypeProto* CSkypeProto::InitSkypeProto(const char* protoName, const wchar_t* userName)
{
- if (CSkypeProto::instanceList.getCount() > 0)
+ if (CSkypeProto::instanceList.getCount() > 0)
{
CSkypeProto::ShowNotification(
::TranslateT("SkypeKit will only permit you to login to one account at a time.\nAdding multiple instances of SkypeKit is prohibited in the licence agreement and standard distribution terms."),
- MB_ICONWARNING);
+ MB_ICONERROR);
return NULL;
}
@@ -23,30 +23,27 @@ CSkypeProto* CSkypeProto::InitSkypeProto(const char* protoName, const wchar_t* u
if ( !ppro->StartSkypeRuntime((TCHAR *)profilename))
{
- CSkypeProto::ShowNotification(::TranslateT("Did not unpack SkypeKit.exe."));
+ CSkypeProto::ShowNotification(::TranslateT("Did not unpack SkypeKit.exe."), MB_ICONERROR);
return NULL;
}
char *keyPair = ppro->LoadKeyPair();
if ( !keyPair)
{
- CSkypeProto::ShowNotification(::TranslateT("Initialization key corrupted or not valid."));
- ppro->StopSkypeRuntime();
+ CSkypeProto::ShowNotification(::TranslateT("Initialization key corrupted or not valid."), MB_ICONERROR);
return NULL;
}
TransportInterface::Status status = ppro->init(keyPair, "127.0.0.1", ppro->skypeKitPort, 0, 1);
if (status != TransportInterface::OK)
{
- CSkypeProto::ShowNotification(::TranslateT("SkypeKit did not initialize."));
- ppro->StopSkypeRuntime();
+ CSkypeProto::ShowNotification(::TranslateT("SkypeKit did not initialize."), MB_ICONERROR);
return NULL;
}
if ( !ppro->start())
{
- ::MessageBox(NULL, TranslateT("SkypeKit did not start."), _T(MODULE), MB_OK | MB_ICONERROR);
- ppro->StopSkypeRuntime();
+ CSkypeProto::ShowNotification(TranslateT("SkypeKit did not start."), MB_ICONERROR);
return NULL;
}
diff --git a/protocols/Skype/src/skype_runtime.cpp b/protocols/Skype/src/skype_runtime.cpp
index a0ead3e663..b5ebbfef0c 100644
--- a/protocols/Skype/src/skype_runtime.cpp
+++ b/protocols/Skype/src/skype_runtime.cpp
@@ -160,4 +160,4 @@ void CSkypeProto::StopSkypeRuntime()
::CloseHandle(this->skypeKitProcessInfo.hThread);
::CloseHandle(this->skypeKitProcessInfo.hProcess);
-} \ No newline at end of file
+}
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index fbb5fb5f02..b1829d058c 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -368,9 +368,7 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag
{
if (::Miranda_Terminated()) return;
- if ( !::ServiceExists(MS_POPUP_ADDPOPUPT) || !::db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
- ::MessageBoxW(NULL, message, caption, MB_OK | flags);
- else
+ if ( ::ServiceExists(MS_POPUP_ADDPOPUPT) && ::db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
{
POPUPDATAW ppd = {0};
ppd.lchContact = hContact;
@@ -381,8 +379,12 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag
::wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
ppd.lchIcon = ::Skin_GetIcon("Skype_main");
- PUAddPopupW(&ppd);
+ if ( !PUAddPopupW(&ppd))
+ return;
+
}
+
+ ::MessageBoxW(NULL, message, caption, MB_OK | flags);
}
void CSkypeProto::ShowNotification(const wchar_t *message, int flags, HANDLE hContact)