SVN commit 1170480 by lvsouza: System tray tooltip: sort accounts by online status to make it easier to read their status when user has several accounts. M +6 -0 kopetewindow.cpp --- trunk/KDE/kdenetwork/kopete/kopete/kopetewindow.cpp #1170479:1170480 @@ -1037,6 +1037,11 @@ i->setPixmap ( pm ); } +bool compareOnlineStatus(const Kopete::Account *a, const Kopete::Account *b) +{ + return (a->myself()->onlineStatus().status() > b->myself()->onlineStatus().status()); +} + void KopeteWindow::makeTrayToolTip() { //FIXME: maybe use identities here? @@ -1045,6 +1050,7 @@ { QString tt = QLatin1String ( "" ); QList accountList = Kopete::AccountManager::self()->accounts(); + qSort(accountList.begin(), accountList.end(), compareOnlineStatus); foreach ( Kopete::Account *a, accountList ) { Kopete::Contact *self = a->myself();