On Po 8. Marec 2010 20:08:00 you wrote: > On Ne 7. Marec 2010 21:33:44 Raphael Kubo da Costa wrote: > > On Sunday 07 March 2010 15:38:14 Pali Rohár wrote: > > > Hello, > > > > > > Kopete doesnt set status message after start or after solid networking > > > reconnect. > > > > > > It is because, setting online status from kopeteapplication or > > > kopeteaccountmanager doesnt contains status message (only empty > > > string). > > > > > > This patch fix this. I try upload this patch file to reviewboard, but > > > reviewboard show me error: No such revision 1100526 so I sending it > > > here. > > > > Looks fine overall, even though I don't know this code. > > _______________________________________________ > > kopete-devel mailing list > > kopete-devel@kde.org > > https://mail.kde.org/mailman/listinfo/kopete-devel > > Hello, > > I see, that status message is not set for account, that comes from > autoaway. It is same as after starting. (only is set global status message > in systray, but for accounts is set empty message). > > I updated my patch, which set status message after autoaway. >
On Ut 9. Marec 2010 04:23:41 Matt Rogers wrote: > On Sunday 07 March 2010 12:38:14 pm Pali Rohár wrote: > > Hello, > > > > Kopete doesnt set status message after start or after solid networking > > reconnect. > > > > It is because, setting online status from kopeteapplication or > > kopeteaccountmanager doesnt contains status message (only empty string). > > > > This patch fix this. I try upload this patch file to reviewboard, but > > reviewboard show me error: No such revision 1100526 so I sending it here. > > braces go on separate lines and you're missing braces around the single > line ifs, but otherwise it looks fine and can be committed. I added missing braces (on separate lines). -- Pali Rohár pali.ro...@gmail.com
Index: protocols/skype/libskype/skype.cpp =================================================================== --- protocols/skype/libskype/skype.cpp (revision 1101206) +++ protocols/skype/libskype/skype.cpp (working copy) @@ -154,7 +154,7 @@ void Skype::setUserProfileRichMoodText(const QString &message) { kDebug(SKYPE_DEBUG_GLOBAL); - queueSkypeMessage(QString("SET PROFILE RICH_MOOD_TEXT %1").arg(message),true); + queueSkypeMessage(QString("SET PROFILE RICH_MOOD_TEXT %1").arg(message), false); } void Skype::setOffline() { Index: protocols/skype/skypeaccount.cpp =================================================================== --- protocols/skype/skypeaccount.cpp (revision 1101206) +++ protocols/skype/skypeaccount.cpp (working copy) @@ -29,6 +29,7 @@ #include <qstring.h> #include <kopetemetacontact.h> #include <kopeteonlinestatus.h> +#include <kopetestatusmanager.h> #include <kopetecontactlist.h> #include <kopetecontact.h> #include <kopetegroup.h> @@ -247,7 +248,7 @@ void SkypeAccount::disconnect() { kDebug(SKYPE_DEBUG_GLOBAL); - setOnlineStatus(d->protocol->Offline, Kopete::StatusMessage()); + setOnlineStatus(d->protocol->Offline, Kopete::StatusManager::self()->globalStatusMessage()); } SkypeContact *SkypeAccount::contact(const QString &id) { @@ -262,9 +263,9 @@ if ((Status != d->protocol->Online) && (Status != d->protocol->Away) && (Status != d->protocol->NotAvailable) && (Status != d->protocol->DoNotDisturb) && (Status != d->protocol->SkypeMe))//some strange online status, taje a default one - setOnlineStatus(d->protocol->Online, Kopete::StatusMessage()); + setOnlineStatus(d->protocol->Online, Kopete::StatusManager::self()->globalStatusMessage()); else - setOnlineStatus(Status, Kopete::StatusMessage());//just change the status + setOnlineStatus(Status, Kopete::StatusManager::self()->globalStatusMessage());//just change the status } Index: kopete/kopeteapplication.cpp =================================================================== --- kopete/kopeteapplication.cpp (revision 1101206) +++ kopete/kopeteapplication.cpp (working copy) @@ -221,17 +221,14 @@ // --noconnect not specified? Kopete::OnlineStatusManager::Category initStatus = Kopete::OnlineStatusManager::self()->initialStatus(); - Kopete::OnlineStatusManager::Category setStatus; + Kopete::OnlineStatusManager::Category setStatus = Kopete::OnlineStatusManager::Offline; if ( args->isSet( "connect" ) && initStatus != Kopete::OnlineStatusManager::Offline && ( Solid::Networking::status() == Solid::Networking::Unknown || Solid::Networking::status() == Solid::Networking::Connected ) ){ - Kopete::AccountManager::self()->setOnlineStatus( initStatus, QString(), Kopete::AccountManager::ConnectIfOffline ); setStatus = initStatus; - } else { - setStatus = Kopete::OnlineStatusManager::Offline; } QList <Kopete::Status::StatusItem *> statusList = Kopete::StatusManager::self()->getRootGroup()->childList(); @@ -249,8 +246,24 @@ } if ( found ) + { + + if ( setStatus != Kopete::OnlineStatusManager::Offline ) + { + Kopete::AccountManager::self()->setOnlineStatus(initStatus, Kopete::StatusMessage(title, message), Kopete::AccountManager::ConnectIfOffline); + } + Kopete::StatusManager::self()->setGlobalStatus(setStatus, Kopete::StatusMessage(title, message)); + } else { + + if ( setStatus != Kopete::OnlineStatusManager::Offline ) + { + Kopete::AccountManager::self()->setOnlineStatus(initStatus, QString(), Kopete::AccountManager::ConnectIfOffline); + } + + } + kDebug(14000)<< "initial status set in config: " << initStatus; QStringList connectArgs = args->getOptionList( "autoconnect" ); Index: libkopete/kopeteaccountmanager.cpp =================================================================== --- libkopete/kopeteaccountmanager.cpp (revision 1101206) +++ libkopete/kopeteaccountmanager.cpp (working copy) @@ -107,7 +107,7 @@ void AccountManager::setOnlineStatus( uint category, const Kopete::StatusMessage &statusMessage, uint flags ) { - kDebug() << "category: " << category; + kDebug() << "category: " << category << "status title: " << statusMessage.title() << "status message: " << statusMessage.message(); OnlineStatusManager::Categories categories = (OnlineStatusManager::Categories)category; const bool onlyChangeConnectedAccounts = isAnyAccountConnected(); @@ -394,8 +394,6 @@ if ( Solid::Networking::status() == Solid::Networking::Unknown || Solid::Networking::status() == Solid::Networking::Connected ){ - Kopete::AccountManager::self()->setOnlineStatus( initStatus, QString(), Kopete::AccountManager::ConnectIfOffline ); - QList <Kopete::Status::StatusItem *> statusList = Kopete::StatusManager::self()->getRootGroup()->childList(); QString message, title; bool found = false; @@ -410,6 +408,8 @@ } } + Kopete::AccountManager::self()->setOnlineStatus(initStatus, Kopete::StatusMessage(title, message), Kopete::AccountManager::ConnectIfOffline); + if ( found ) Kopete::StatusManager::self()->setGlobalStatus(initStatus, Kopete::StatusMessage(title, message)); } Index: libkopete/kopetestatusmanager.cpp =================================================================== --- libkopete/kopetestatusmanager.cpp (revision 1101206) +++ libkopete/kopetestatusmanager.cpp (working copy) @@ -376,7 +376,7 @@ if( (*it)->isConnected() && (*it)->isAway() ) { (*it)->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlineStatus( (*it)->protocol(), - Kopete::OnlineStatusManager::Online ), Kopete::StatusMessage(), Kopete::Account::KeepSpecialFlags ); + Kopete::OnlineStatusManager::Online ), globalStatusMessage(), Kopete::Account::KeepSpecialFlags ); } } d->autoAwayAccounts.clear();
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel