[Pkg-owncloud-commits] [owncloud-client] 299/498: Account Settings: hide the [add folder] button when syncing the entire owncloud #3438

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:00 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 6030b4416d5851a4d9ff3fc508415edaa6881e05
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Jul 13 16:28:21 2015 +0200

    Account Settings: hide the [add folder] button when syncing the entire owncloud #3438
---
 src/gui/folderstatusmodel.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index bbe75b0..71aaf2c 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -244,6 +244,11 @@ int FolderStatusModel::columnCount(const QModelIndex&) const
 int FolderStatusModel::rowCount(const QModelIndex& parent) const
 {
     if (!parent.isValid()) {
+        if (_folders.count() == 1 && _folders.at(0)._folder->remotePath() == QLatin1String("/")) {
+            // special case when syncing the entire owncloud: hide the add folder button (#3438)
+            return 1;
+        }
+
         return _folders.count() + 1;
     }
 

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