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

List:       kde-commits
Subject:    kdenonbeta/kopete/libkopete
From:       Jason Keirstead <jason () keirstead ! org>
Date:       2003-01-31 23:48:21
[Download RAW message or body]

CVS commit by brunes: 

Fix bug where moving a contact from a MC to another, which results in original MC having no
children. Now original MC is deleted after move if it has no children.


  M +2 -1      kopetecontact.cpp   1.77
  M +5 -1      kopetemetacontact.cpp   1.109


--- kdenonbeta/kopete/libkopete/kopetecontact.cpp  #1.76:1.77
@@ -316,5 +316,4 @@ void KopeteContact::setMetaContact( Kope
 {
         KopeteMetaContact *old = m_metaContact;
-        m_metaContact->removeContact( this );
         m->addContact( this );
 
@@ -328,4 +327,6 @@ void KopeteContact::setMetaContact( Kope
         m_metaContact = m;
 
+        old->removeContact( this );
+        
         // Reconnect signals to the new meta contact
         disconnect( old, SIGNAL( aboutToSave( KopeteMetaContact * ) ),

--- kdenonbeta/kopete/libkopete/kopetemetacontact.cpp  #1.108:1.109
@@ -195,4 +195,8 @@ void KopeteMetaContact::removeContact(Ko
                 emit contactRemoved(c);
         }
+        
+        if( m_contacts.count() == 0 )
+                KopeteContactList::contactList()->removeMetaContact( this );
+        else
         updateOnlineStatus();
 }


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

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