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

List:       kde-commits
Subject:    kdenetwork/kopete/protocols/yahoo
From:       Matt Rogers <matt.rogers () kdemail ! net>
Date:       2004-05-01 2:33:10
Message-ID: 20040501023310.F214F9A75 () office ! kde ! org
[Download RAW message or body]

CVS commit by mattr: 

Create groups on the server when contacts are moved into them. Takes care
of beastie 79563.

CCMAIL: 79563-done@bugs.kde.org


  M +22 -0     yahoocontact.cpp   1.70
  M +2 -0      yahoocontact.h   1.42


--- kdenetwork/kopete/protocols/yahoo/yahoocontact.h  #1.41:1.42
@@ -63,4 +63,6 @@ public slots:
         void syncToServer();
 
+        void syncGroups();
+
 private slots:
         void slotMessageManagerDestroyed();

--- kdenetwork/kopete/protocols/yahoo/yahoocontact.cpp  #1.69:1.70
@@ -81,4 +81,26 @@ void YahooContact::syncToServer()
 }
 
+void YahooContact::syncGroups()
+{
+        if ( !m_account->isConnected() )
+                return;
+
+        if ( !m_account->isOnServer( contactId() ) )
+        {
+                //TODO: Share this code with the above function
+                kdDebug(14180) << k_funcinfo << "Contact isn't on the server. Adding..." << endl;
+                KopeteGroupList groupList = metaContact()->groups();
+                for ( KopeteGroup *g = groupList.first(); g; g = groupList.next() )
+                        m_account->yahooSession()->addBuddy(m_userId, g->displayName() );
+        }
+        else
+        {
+                QString newGroup = metaContact()->groups().first()->displayName();
+                m_account->yahooSession()->changeBuddyGroup( contactId(), m_groupName, newGroup );
+                m_groupName = newGroup;
+        }
+}
+
+
 bool YahooContact::isOnline() const
 {


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

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