[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/protocols/msn
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2005-05-01 16:53:47
Message-ID: 20050501165347.54E5F4A6 () office ! kde ! org
[Download RAW message or body]
CVS commit by ogoffart:
Force to close every open chat when we are connected with another client.
Bug: 103939
M +18 -4 msnaccount.cpp 1.121
--- kdenetwork/kopete/protocols/msn/msnaccount.cpp #1.120:1.121
@@ -41,4 +41,5 @@
#include "kopeteuiglobal.h"
#include "kopeteglobal.h"
+#include "kopetemessagemanagerfactory.h"
#include "contactaddednotifydialog.h"
@@ -394,8 +395,4 @@ void MSNAccount::slotNotifySocketStatusC
*/
- setAllContactsStatus( MSNProtocol::protocol()->FLN );
- // FIXME: give correct disconnect reason
- disconnected( Manual );
-
/*
m_allowList.clear();
@@ -429,6 +426,23 @@ void MSNAccount::slotNotifySocketClosed(
m_notifySocket = 0l;
myself()->setOnlineStatus( MSNProtocol::protocol()->FLN );
+ setAllContactsStatus( MSNProtocol::protocol()->FLN );
disconnected(reason);
+
+ if(reason == Kopete::Account::OtherClient)
+ { //close all chat sessions, so new message will arive to the other \
client. +
+ QValueList<Kopete::ChatSession*> sessions = \
Kopete::ChatSessionManager::self()->sessions(); + \
QValueList<Kopete::ChatSession*>::Iterator it; + for \
(it=sessions.begin() ; it != sessions.end() ; it++ ) + {
+ MSNChatSession *msnCS = dynamic_cast<MSNChatSession *>( *it \
); + if ( msnCS && msnCS->account() == this )
+ {
+ msnCS->slotCloseSession();
+ }
+ }
+ }
+
#if 0
else if ( state == 0x10 ) // connection died unexpectedly
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic