diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-06-21 07:50:13 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-06-21 07:50:13 +0000 |
commit | 39599842d91d490fe82ae8f97ea17e91859b2556 (patch) | |
tree | c0117f4b0719ad7062ea18700b847815e51f7a95 /protocols/Skype/src/skype_proto.cpp | |
parent | b54895860556bc5573d5579f7d02787f8be87ace (diff) |
fixed contacts status change popups when you goes offline
git-svn-id: http://svn.miranda-ng.org/main/trunk@5074 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 68f55adb90..b82cc174aa 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -437,21 +437,21 @@ int __cdecl CSkypeProto::SetApparentMode(HANDLE hContact, int mode) { return 0; int CSkypeProto::SetStatus(int new_status)
{
- switch (new_status)
+ switch (new_status)
{
- case ID_STATUS_OCCUPIED:
- new_status = ID_STATUS_DND;
+ case ID_STATUS_OCCUPIED:
+ new_status = ID_STATUS_DND;
break;
- case ID_STATUS_FREECHAT:
- new_status = ID_STATUS_ONLINE;
+ case ID_STATUS_FREECHAT:
+ new_status = ID_STATUS_ONLINE;
break;
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
- case ID_STATUS_NA:
- new_status = ID_STATUS_AWAY;
+ case ID_STATUS_ONTHEPHONE:
+ case ID_STATUS_OUTTOLUNCH:
+ case ID_STATUS_NA:
+ new_status = ID_STATUS_AWAY;
break;
}
-
+
if (new_status == this->m_iDesiredStatus)
return 0;
@@ -462,23 +462,35 @@ int CSkypeProto::SetStatus(int new_status) {
this->LogOut();
this->m_iStatus = this->m_iDesiredStatus = ID_STATUS_OFFLINE;
+
+ this->SendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+
+ if ( !::Miranda_Terminated())
+ {
+ this->SetAllContactStatus(ID_STATUS_OFFLINE);
+ this->CloseAllChatSessions();
+ }
+
+ return 0;
}
else
{
if (old_status == ID_STATUS_OFFLINE && !this->IsOnline())
{
this->m_iStatus = ID_STATUS_CONNECTING;
- if ( !this->LogIn())
+ if ( !this->LogIn())
return 0;
}
else
{
- if ( this->account->IsOnline()) {
+ if ( this->account->IsOnline())
+ {
SetServerStatus(new_status);
return 0;
}
-
- SendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+
+ this->SendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ return 0;
}
}
|