[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/msn
From: Urs Wolfer <uwolfer () kde ! org>
Date: 2008-07-20 17:32:37
Message-ID: 1216575157.135516.20129.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 835489 by uwolfer:
Show link in error messages to check MSN server availability. Also provide an action \
in MSN account menu for that. FEATURE:108803
M +10 -1 msnaccount.cpp
M +2 -0 msnaccount.h
M +9 -4 msnsocket.cpp
--- trunk/KDE/kdenetwork/kopete/protocols/msn/msnaccount.cpp #835488:835489
@@ -33,6 +33,7 @@
#include <klocale.h>
#include <kicon.h>
#include <kconfiggroup.h>
+#include <krun.h>
#include <QtCore/QFile>
#include <QtCore/QRegExp>
@@ -89,6 +90,9 @@
m_startChatAction = new KAction( KIcon("mail-message-new"), i18n( "&Start Chat..." \
), this ); //, "startChatAction" );
QObject::connect( m_startChatAction, SIGNAL(triggered(bool)), this, \
SLOT(slotStartChat()) ); +
+ m_openStatusAction = new KAction( i18n( "Open MS&N service status site..." ), this \
); + QObject::connect( m_openStatusAction, SIGNAL(triggered(bool)), this, \
SLOT(slotOpenStatus()) );
KConfigGroup *config=configGroup();
@@ -271,6 +275,7 @@
// actionMenu->menu()->insertSeparator();
actionMenu->addAction( m_openInboxAction );
+ actionMenu->addAction( m_openStatusAction );
#if !defined NDEBUG
KActionMenu *debugMenu = new KActionMenu( "Debug", this );
@@ -411,6 +416,10 @@
m_notifySocket->slotOpenInbox();
}
+void MSNAccount::slotOpenStatus()
+{
+ KRun::runUrl( KUrl( QLatin1String( "http://messenger.msn.com/Status.aspx" ) ), \
"text/html", Kopete::UI::Global::mainWidget() ); +}
void MSNAccount::slotNotifySocketClosed()
{
@@ -1302,7 +1311,7 @@
kDebug(14140) << msg;
// Display the error
- KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), msgBoxType, msg, \
caption ); + KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), \
msgBoxType, msg, caption, KMessageBox::AllowLink | KMessageBox::Notify );
}
--- trunk/KDE/kdenetwork/kopete/protocols/msn/msnaccount.h #835488:835489
@@ -137,6 +137,7 @@
void slotStartChat();
void slotOpenInbox();
void slotChangePublicName();
+ void slotOpenStatus();
//#if !defined NDEBUG //(Stupid moc which don't see when he don't need to slot this \
slot) /**
@@ -205,6 +206,7 @@
KAction *m_openInboxAction;
KAction *m_startChatAction;
KAction *m_changeDNAction;
+ KAction *m_openStatusAction;
// status which will be using for connecting
Kopete::OnlineStatus m_connectstatus;
--- trunk/KDE/kdenetwork/kopete/protocols/msn/msnsocket.cpp #835488:835489
@@ -536,6 +536,7 @@
{
kDebug(14140) ;
QString msg;
+ const QString msnServiceStatusUrl = QLatin1String( \
"http://messenger.msn.com/Status.aspx" );
switch ( code )
{
@@ -572,10 +573,12 @@
*/
case 402:
case 403:
- msg = i18n ( "Error accessing contact list. Please try again later." );
+ msg = i18n ( "Error accessing contact list. Please try again later. "
+ "You could also check the <a href=\"%1\">MSN service status site</a> to see if \
this is a known problem.", msnServiceStatusUrl ) ); break;
case 500:
- msg = i18n ( "An internal server error occurred. Please try again later." );
+ msg = i18n ( "An internal server error occurred. Please try again later. "
+ "You could also check the <a href=\"%1\">MSN service status site</a> to see if \
this is a known problem.", msnServiceStatusUrl ) ); break;
case 502:
msg = i18n ( "It is no longer possible to perform this operation. The MSN server \
does not allow it anymore." ); @@ -584,7 +587,8 @@
case 910:
case 912:
case 922:
- msg = i18n ( "The MSN server is busy. Please try again later." );
+ msg = i18n ( "The MSN server is busy. Please try again later. "
+ "You could also check the <a href=\"%1\">MSN service status site</a> to see if \
this is a known problem.", msnServiceStatusUrl ) ); break;
case 601:
case 604:
@@ -593,7 +597,8 @@
case 915:
case 916:
case 917:
- msg = i18n ( "The server is not available at the moment. Please try again later." \
); + msg = i18n ( "The server is not available at the moment. Please try again \
later. " + "You could also check the <a href=\"%1\">MSN service status site</a> to \
see if this is a known problem.", msnServiceStatusUrl ) ); break;
default:
// FIXME: if the error causes a disconnect, it will crash, but we can't disconnect \
every time
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic