[Pkg-owncloud-commits] [owncloud-client] 96/498: Systray menu: consider multiple account to choose the status
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit d7fa03cf2e65267b965536b3a24654a109566b12
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed May 13 13:10:14 2015 +0200
Systray menu: consider multiple account to choose the status
---
src/gui/owncloudgui.cpp | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index 806e29d..087d829 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -214,12 +214,10 @@ void ownCloudGui::setConnectionErrors( bool /*connected*/, const QStringList& fa
void ownCloudGui::slotComputeOverallSyncStatus()
{
-#warning FIXME: overall status needs to look at all accounts
- if (AccountState *a = AccountManager::instance()->accounts().value(0).data()) {
- if (a->isSignedOut()) {
- _tray->setIcon(Theme::instance()->folderOfflineIcon(true));
- _tray->setToolTip(tr("Please sign in"));
- return;
+ bool allSignedOut = true;
+ foreach (auto a, AccountManager::instance()->accounts()) {
+ if (!a->isSignedOut()) {
+ allSignedOut = false;
}
if (!a->isConnectedOrTemporarilyUnavailable()) {
_tray->setIcon(Theme::instance()->folderOfflineIcon(true));
@@ -227,6 +225,13 @@ void ownCloudGui::slotComputeOverallSyncStatus()
return;
}
}
+
+ if (allSignedOut) {
+ _tray->setIcon(Theme::instance()->folderOfflineIcon(true));
+ _tray->setToolTip(tr("Please sign in"));
+ return;
+ }
+
// display the info of the least successful sync (eg. not just display the result of the latest sync
QString trayMessage;
FolderMan *folderMan = FolderMan::instance();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list