------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=114769         
tommi.rantala cs helsinki fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From tommi.rantala cs helsinki fi  2006-08-05 20:37 
-------
SVN commit 570123 by rantala:

If we get a human readable error message from the stream, show it to the user
in a detailedError msgbox.

Libiris can parse the message from servers that return <stream:error/>.
A notable exception is google talk.

BUG: 114769


 M  +15 -8     jabberaccount.cpp  
 M  +1 -1      jabberaccount.h  
 M  +1 -1      ui/jabberregisteraccount.cpp  


--- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabberaccount.cpp 
#570122:570123
 @ -774,7 +774,7  @
 
 }
 
-void JabberAccount::handleStreamError (int streamError, int streamCondition, 
int connectorCode, const QString &server, Kopete::Account::DisconnectReason 
&errorClass)
+void JabberAccount::handleStreamError (int streamError, int streamCondition, 
int connectorCode, const QString &server, Kopete::Account::DisconnectReason 
&errorClass, QString additionalErrMsg)
 {
        QString errorText;
        QString errorCondition;
 @ -801,7 +801,7  @
                        switch(streamCondition)
                        {
                                case XMPP::Stream::GenericStreamError:
-                                       errorCondition = i18n("Generic stream 
error (sorry, I do not have a more-detailed reason)");
+                                       errorCondition = i18n("Generic stream 
error.");
                                        break;
                                case XMPP::Stream::Conflict:
                                        // FIXME: need a better error message 
here
 @ -1027,12 +1027,19  @
         * API will attempt to reconnect, queueing another
         * error until memory is exhausted.
         */
-       if(!errorText.isEmpty())
-               KMessageBox::error (Kopete::UI::Global::mainWidget (),
-                                               errorText,
-                                               i18n("Connection problem with 
Jabber server %1", server));
+       if(!errorText.isEmpty()) {
+               if (!additionalErrMsg.isEmpty()) {
+                       KMessageBox::detailedError 
(Kopete::UI::Global::mainWidget (),
+                                       errorText,
+                                       additionalErrMsg,
+                                       i18n("Connection problem with Jabber 
server %1", server));
+               } else {
+                       KMessageBox::error (Kopete::UI::Global::mainWidget (),
+                                       errorText,
+                                       i18n("Connection problem with Jabber 
server %1", server));
+               }
+       }
 
-
 }
 
 void JabberAccount::slotCSError ( int error )
 @ -1053,7 +1060,7  @
 
                // display message to user
                if(!m_removing) //when removing the account, connection errors 
are normal.
-                       handleStreamError (error, 
client()->clientStream()->errorCondition (), 
client()->clientConnector()->errorCode (), server (), errorClass);
+                       handleStreamError (error, 
client()->clientStream()->errorCondition (), 
client()->clientConnector()->errorCode (), server (), errorClass, 
client()->clientStream()->errorText());
 
                disconnect ( errorClass );
                
--- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabberaccount.h #570122:570123
 @ -132,7 +132,7  @
        /*
         * Handle stream errors. Displays a dialog and returns.
         */
-       static void handleStreamError (int streamError, int streamCondition, 
int connectorCode, const QString &server, Kopete::Account::DisconnectReason 
&errorClass);
+       static void handleStreamError (int streamError, int streamCondition, 
int connectorCode, const QString &server, Kopete::Account::DisconnectReason 
&errorClass, QString additionalErrMsg);
        
        const QMap<QString, JabberTransport *> &transports()
        { return m_transports; }
--- trunk/KDE/kdenetwork/kopete/protocols/jabber/ui/jabberregisteraccount.cpp 
#570122:570123
 @ -322,7 +322,7  @
        mMainWidget->lblStatusMessage->setText ( i18n ( "Protocol error." ) );
 
        // display message to user
-       JabberAccount::handleStreamError (error, 
jabberClient->clientStream()->errorCondition (), 
jabberClient->clientConnector()->errorCode (), mMainWidget->leServer->text (), 
errorClass);
+       JabberAccount::handleStreamError (error, 
jabberClient->clientStream()->errorCondition (), 
jabberClient->clientConnector()->errorCode (), mMainWidget->leServer->text (), 
errorClass, jabberClient->clientStream()->errorText());
 
        disconnect ();
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to