diff options
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/src/skype_account.cpp | 10 | ||||
-rw-r--r-- | protocols/Skype/src/skype_instances.cpp | 15 | ||||
-rw-r--r-- | protocols/Skype/src/skype_runtime.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_utils.cpp | 10 |
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)
|