[Pkg-owncloud-commits] [owncloud-client] 66/115: Selective sync: the button should only be enabled while connected

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Aug 29 22:04:02 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 7f38ce89085f7e2557eb76d0c6dcc124bd385a81
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Aug 18 15:45:38 2014 +0200

    Selective sync:  the button should only be enabled while connected
---
 src/mirall/accountsettings.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp
index 260d37e..ca2b49b 100644
--- a/src/mirall/accountsettings.cpp
+++ b/src/mirall/accountsettings.cpp
@@ -158,9 +158,10 @@ void AccountSettings::slotFolderActivated( const QModelIndex& indx )
   } else {
       ui->_buttonAdd->setVisible(true);
   }
-  ui->_buttonAdd->setEnabled(_account && _account->state() == Account::Connected);
+  bool isConnected = _account && _account->state() == Account::Connected;
+  ui->_buttonAdd->setEnabled(isConnected);
   ui->_buttonEnable->setEnabled( isValid );
-  ui->_buttonSelectiveSync->setEnabled( isValid );
+  ui->_buttonSelectiveSync->setEnabled(isConnected && isValid);
 
   if ( isValid ) {
     bool folderEnabled = _model->data( indx, FolderStatusDelegate::FolderSyncEnabled).toBool();

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