From f7ebad081fecfe49cbe70948c87d937074461825 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 10 Jun 2013 11:50:19 +0000 Subject: Skype: fixed behavior on disconnect git-svn-id: http://svn.miranda-ng.org/main/trunk@4908 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_account.cpp | 7 ++++--- protocols/Skype/src/skype_utils.cpp | 24 ++++++++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'protocols') diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp index b070a7d1af..c60941ee9d 100644 --- a/protocols/Skype/src/skype_account.cpp +++ b/protocols/Skype/src/skype_account.cpp @@ -349,12 +349,13 @@ void CSkypeProto::OnAccountChanged(int prop) this->UpdateProfile(this->account.fetch()); break; - case CAccount::P_AVAILABILITY: + case Account::P_AVAILABILITY: { Contact::AVAILABILITY status; this->account->GetPropAvailability(status); - if (status == CContact::CONNECTING && this->IsOnline()) - this->SetStatus(ID_STATUS_OFFLINE); + int mir_status = this->SkypeToMirandaStatus(status); + if (mir_status != this->m_iStatus) + this->SetStatus(mir_status); } break; } diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index b1829d058c..4c908788d6 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -462,31 +462,35 @@ int CSkypeProto::SkypeToMirandaStatus(CContact::AVAILABILITY availability) switch (availability) { - case CContact::ONLINE: - case CContact::SKYPE_ME: + case Contact::ONLINE: + case Contact::SKYPE_ME: status = ID_STATUS_ONLINE; break; - case CContact::ONLINE_FROM_MOBILE: - case CContact::SKYPE_ME_FROM_MOBILE: + case Contact::ONLINE_FROM_MOBILE: + case Contact::SKYPE_ME_FROM_MOBILE: status = ID_STATUS_ONTHEPHONE; break; - case CContact::AWAY: - case CContact::AWAY_FROM_MOBILE: + case Contact::AWAY: + case Contact::AWAY_FROM_MOBILE: status = ID_STATUS_AWAY; break; - case CContact::DO_NOT_DISTURB: - case CContact::DO_NOT_DISTURB_FROM_MOBILE: + case Contact::DO_NOT_DISTURB: + case Contact::DO_NOT_DISTURB_FROM_MOBILE: status = ID_STATUS_DND; break; - case CContact::SKYPEOUT: + case Contact::INVISIBLE: + status = ID_STATUS_INVISIBLE; + break; + + case Contact::SKYPEOUT: status = ID_STATUS_ONTHEPHONE; break; - case CContact::CONNECTING: + case Contact::CONNECTING: status = ID_STATUS_CONNECTING; break; } -- cgit v1.2.3