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

List:       kde-commits
Subject:    kdenetwork/kopete
From:       Matthias Granberry <matthias.granberry () gmail ! com>
Date:       2005-04-11 11:33:01
Message-ID: 20050411113301.5455A633 () office ! kde ! org
[Download RAW message or body]

CVS commit by granberry: 

Moved emission of idleStateChanged signal from GroupWiseContact::setOnlineStatus to \
Contact::setIdleTime to fix graying idle contacts in contact list


  M +6 -1      libkopete/kopetecontact.cpp   1.235
  M +1 -10     protocols/groupwise/gwcontact.cpp   1.16


--- kdenetwork/kopete/libkopete/kopetecontact.cpp  #1.234:1.235
@@ -545,10 +545,15 @@ unsigned long int Contact::idleTime() co
 void Contact::setIdleTime( unsigned long int t )
 {
+        bool idleChanged = false;
+        if(d->idleTime != t)
+                idleChanged = true;
         d->idleTime=t;
         if(t > 0)
                 d->idleTimer.start();
-        //FIXME: if t == 0, idleTime() will now return garbage
+//FIXME: if t == 0, idleTime() will now return garbage
 //      else
 //              d->idleTimer.stop();
+        if(idleChanged)
+                emit idleStateChanged(this);
 }
 

--- kdenetwork/kopete/protocols/groupwise/gwcontact.cpp  #1.15:1.16
@@ -231,15 +231,8 @@ void GroupWiseContact::receivePrivacyCha
 void GroupWiseContact::setOnlineStatus( const Kopete::OnlineStatus& status )
 {
-        bool idleChanged = false;
         if ( status == protocol()->groupwiseAwayIdle && status != onlineStatus() )
-        {
-                idleChanged = true;
                 setIdleTime( 1 );
-        }
         else if ( onlineStatus() == protocol()->groupwiseAwayIdle && status != \
                onlineStatus() )
-        {
-                idleChanged = true;
                 setIdleTime( 0 );
-        }
 
         if ( account()->isContactBlocked( m_dn ) && status.internalStatus() < 15 )
@@ -281,6 +274,4 @@ void GroupWiseContact::setOnlineStatus( 
                         Kopete::Contact::setOnlineStatus(status);
         }
-        if ( idleChanged )
-                emit idleStateChanged( this );
 }
 


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

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