[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/kopete/protocols/msn
From:       Olivier Goffart <ogoffart () tiscalinet ! be>
Date:       2004-02-01 9:09:55
Message-ID: 20040201090955.ECEF79840 () office ! kde ! org
[Download RAW message or body]

CVS commit by ogoffart: 

Fix the KDE 3.2 showstopper Rob mentioned in the mailing list.

The fact is that when the user ask to create a new socket to start a chat, kopete wanted to \
create a KMM, which itself create another new socket.

Ok to backport to 3_2_BRANCH ? what should i do ?

CCMAIL: kopete-devel@kde.org


  M +13 -3     msnaccount.cpp   1.62


--- kdenetwork/kopete/protocols/msn/msnaccount.cpp  #1.61:1.62
@@ -960,5 +960,15 @@ void MSNAccount::slotCreateChat( const Q
         if ( c && myself() )
         {
-                static_cast<MSNMessageManager *>( c->manager( true ) )->createChat( handle, \
address, auth, ID ); +                // we can't use simply c->manager(true) here to get the \
manager, because this will re-open +                // another chat session, and then, close \
this new one. We have to re-create the manager manualy. +                MSNMessageManager \
*manager = dynamic_cast<MSNMessageManager*>( c->manager( false ) ); +                \
if(!manager) +                {
+                        KopeteContactPtrList chatmembers;
+                        chatmembers.append(c);
+                        manager = new MSNMessageManager( protocol(), myself(), chatmembers  );
+                }
+        
+                manager->createChat( handle, address, auth, ID );
 
                 KGlobal::config()->setGroup( "MSN" );
@@ -968,6 +978,6 @@ void MSNAccount::slotCreateChat( const Q
                         // this temporary message should open the window if they not exist
                         QString body = i18n( "%1 has started a chat with you" ).arg( \
                c->displayName() );
-                        KopeteMessage tmpMsg = KopeteMessage( c, c->manager()->members(), \
                body, KopeteMessage::Internal, KopeteMessage::PlainText );
-                        c->manager()->appendMessage( tmpMsg );
+                        KopeteMessage tmpMsg = KopeteMessage( c, manager->members(), body, \
KopeteMessage::Internal, KopeteMessage::PlainText ); +                        \
manager->appendMessage( tmpMsg );  }
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic