[Pkg-owncloud-commits] [owncloud-client] 09/27: Account Settings: Hide the add folder button when Theme::singleSyncFolder is set

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Aug 28 09:43:43 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 92fc902e0c9feeb6f83e867cac866f99ee84a124
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Aug 19 17:59:39 2015 +0200

    Account Settings: Hide the add folder button when Theme::singleSyncFolder is set
---
 src/gui/folderstatusmodel.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index cf4b493..5435d61 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -286,7 +286,11 @@ int FolderStatusModel::columnCount(const QModelIndex&) const
 int FolderStatusModel::rowCount(const QModelIndex& parent) const
 {
     if (!parent.isValid()) {
-        return _folders.count() + 1;
+        if( Theme::instance()->singleSyncFolder() &&  _folders.count() != 0) {
+            // "Add folder" button not visible in the singleSyncFolder configuration.
+            return _folders.count();
+        }
+        return _folders.count() + 1; // +1 for the "add folder" button
     }
     auto info = infoForIndex(parent);
     if (!info)

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