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

List:       kde-commits
Subject:    kdenonbeta/kopete/protocols/jabber
From:       Till Gerken <till () tantalo ! net>
Date:       2003-07-19 18:42:57
[Download RAW message or body]

CVS commit by gerken: 

Fixing the damn connection animation once and for all. Silly code.


  M +35 -16    jabberaccount.cpp   1.60


--- kdenonbeta/kopete/protocols/jabber/jabberaccount.cpp  #1.59:1.60
@@ -481,6 +481,8 @@ void JabberAccount::setPresence (const K
 {
 
-        // if we are in the process of connecting, only update our local presence
-        // and don't send anything across the wire
+        /*
+         * If we are in the process of connecting, only update our local presence
+         * and don't send anything across the wire.
+         */
         if(status == protocol()->JabberConnecting)
         {
@@ -491,7 +493,11 @@ void JabberAccount::setPresence (const K
         else
         {
-                // if we are already connected and changing our presence or if we \
                are connecting
-                // and set our initial presence, send new presence packet to the \
                server
-                if (isConnected ())
+                /*
+                 * If we are already connected and changing our presence or if we \
are connecting +                 * and set our initial presence, send new presence \
packet to the server. +                 * Sorry for the ugly if() below but the \
requirement for certain timings to send out presence +                 * packets and \
the silly implementation of KopeteAccount::isOnline() leave no other choice. +        \
*/ +                if (isConnected())
                 {
                         kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Sending new \
presence to the server." << endl; @@ -565,6 +571,9 @@ void \
JabberAccount::slotGoOnline ()  connect ();
         }
-
+        else
+        {
         setPresence (protocol()->JabberOnline, "");
+        }
+
 }
 
@@ -586,6 +595,8 @@ void JabberAccount::slotGoChatty ()
                 connect ();
         }
-
+        else
+        {
         setPresence (protocol()->JabberChatty, "");
+        }
 
 }
@@ -601,6 +612,8 @@ void JabberAccount::slotGoAway ()
                 connect ();
         }
-
+        else
+        {
         setPresence (protocol()->JabberAway, KopeteAway::message());
+        }
 
 }
@@ -616,6 +629,8 @@ void JabberAccount::slotGoXA ()
                 connect ();
         }
-
+        else
+        {
         setPresence (protocol()->JabberXA, KopeteAway::message());
+        }
 
 }
@@ -631,6 +646,8 @@ void JabberAccount::slotGoDND ()
                 connect ();
         }
-
+        else
+        {
         setPresence (protocol()->JabberDND, KopeteAway::message());
+        }
 
 }
@@ -646,6 +663,8 @@ void JabberAccount::slotGoInvisible ()
                 connect ();
         }
-
+        else
+        {
         setPresence (protocol()->JabberInvisible, "");
+        }
 
 }


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

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