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

List:       kde-commits
Subject:    groupwise_in_anger: kdenetwork/kopete/protocols/groupwise
From:       Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date:       2004-09-07 22:22:10
Message-ID: 20040907222210.E673E1CC2 () office ! kde ! org
[Download RAW message or body]

CVS commit by wstephens: 

Allow us to invite contacts to a chat window that was opened but where no messages \
had been sent - queue the invite while the createconf is carried out.


  M +30 -14    gwmessagemanager.cpp   1.1.2.19
  M +4 -2      gwmessagemanager.h   1.1.2.14


--- kdenetwork/kopete/protocols/groupwise/gwmessagemanager.cpp  #1.1.2.18:1.1.2.19
@@ -174,5 +174,5 @@ void GroupWiseMessageManager::receiveGui
                 emit conferenceCreated();
                 // TODO: send invitations if we're not inviting in the conf \
                create...
-                dequeMessages();
+                dequeueMessagesAndInvites();
         }
 }
@@ -261,5 +261,5 @@ void GroupWiseMessageManager::slotGotNot
 }
 
-void GroupWiseMessageManager::dequeMessages()
+void GroupWiseMessageManager::dequeueMessagesAndInvites()
 {
         kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
@@ -271,4 +271,12 @@ void GroupWiseMessageManager::dequeMessa
         }
         m_pendingOutgoingMessages.clear();
+        QPtrListIterator< KopeteContact > it( m_pendingInvites );
+        KopeteContact * contact;
+        while ( ( contact = it.current() ) )
+        {
+                ++it;
+                slotInviteContact( contact );
+        }
+        m_pendingInvites.clear();
 }
 
@@ -303,4 +311,11 @@ void GroupWiseMessageManager::slotAction
 void GroupWiseMessageManager::slotInviteContact( KopeteContact * contact )
 {
+        if ( m_guid.isEmpty() )
+        {
+                m_pendingInvites.append( contact );
+                createConference();
+        }
+        else
+        {
         QWidget * w = view(false) ? dynamic_cast<KMainWindow*>( \
view(false)->mainWidget()->topLevelWidget() ) : 0L;  
@@ -316,4 +331,5 @@ void GroupWiseMessageManager::slotInvite
                 static_cast< GroupWiseAccount * >(account())->sendInvitation( \
m_guid, gwc->dn(), inviteMessage );  }
+        }
 }
 

--- kdenetwork/kopete/protocols/groupwise/gwmessagemanager.h  #1.1.2.13:1.1.2.14
@@ -95,7 +95,7 @@ protected:
         void GroupWiseMessageManager::createConference();
         /** 
-         * Sends any messages that were queued while waiting for the conference to \
be created +         * Sends any messages and invitations that were queued while \
                waiting for the conference to be created
          */
-        void dequeMessages();
+        void dequeueMessagesAndInvites();
 protected slots:
         /** 
@@ -143,4 +143,5 @@ private:
         
         QValueList< KopeteMessage > m_pendingOutgoingMessages; // messages queued \
while we wait for the server to tell us the conference is created. +        \
KopeteContactPtrList m_pendingInvites; // people we wanted to invite to the \
conference, queued while waiting for the conference to be created.  KActionMenu \
*m_actionInvite;  QPtrList<KAction> m_inviteActions;
@@ -150,4 +151,5 @@ private:
         // search widget used for inviting contacts
         GroupWiseSearch * m_search;
+        // contacts who have been invited to join but have not yet joined the chat
         KopeteContactPtrList m_invitees;
         // track the number of members actually in the chat


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

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