[Pkg-owncloud-commits] [owncloud-client] 159/211: SocketAPI: show an ignored icon for paused folders

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:40 UTC 2014


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 d31ccacf575b5671e2b799701dcc73856b41d389
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Oct 22 12:17:44 2014 +0200

    SocketAPI: show an ignored icon for paused folders
---
 src/mirall/socketapi.cpp | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index 85ed123..f9cfc34 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -515,22 +515,28 @@ SyncFileStatus SocketApi::fileStatus(Folder *folder, const QString& systemFileNa
         }
         if (fileName == "") {
             // sync folder itself
-            if (folder->syncResult().status() == SyncResult::Undefined
-                    || folder->syncResult().status() == SyncResult::NotYetStarted
-                    || folder->syncResult().status() == SyncResult::SyncPrepare
-                    || folder->syncResult().status() == SyncResult::SyncRunning
-                    || folder->syncResult().status() == SyncResult::Paused) {
+            switch (folder->syncResult().status()) {
+            case SyncResult::Undefined:
+            case SyncResult::NotYetStarted:
+            case SyncResult::SyncPrepare:
+            case SyncResult::SyncRunning:
                 status.set(SyncFileStatus::STATUS_EVAL);
                 return status;
-            } else if (folder->syncResult().status() == SyncResult::Success
-                       || folder->syncResult().status() == SyncResult::Problem) {
+
+            case SyncResult::Success:
+            case SyncResult::Problem:
                 status.set(SyncFileStatus::STATUS_SYNC);
                 return status;
-            }  else if (folder->syncResult().status() == SyncResult::Error
-                        || folder->syncResult().status() == SyncResult::SetupError
-                        || folder->syncResult().status() == SyncResult::SyncAbortRequested) {
+
+            case SyncResult::Error:
+            case SyncResult::SetupError:
+            case SyncResult::SyncAbortRequested:
                 status.set(SyncFileStatus::STATUS_ERROR);
                 return status;
+
+            case SyncResult::Paused:
+                status.set(SyncFileStatus::STATUS_IGNORE);
+                return status;
             }
         }
         SyncJournalFileRecord rec = dbFileRecord_capi(folder, unixFileName );

-- 
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