[Pkg-owncloud-commits] [owncloud-client] 07/89: Set proper enable state of blacklist button after the dialog was opened.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:28 UTC 2013


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 859f77644052781186b94087aba54ec487168aa4
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed Dec 4 11:32:46 2013 +0100

    Set proper enable state of blacklist button after the dialog was opened.
    
    Also set proper tooltips.
---
 src/mirall/protocolwidget.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mirall/protocolwidget.cpp b/src/mirall/protocolwidget.cpp
index c7c882e..9be055e 100644
--- a/src/mirall/protocolwidget.cpp
+++ b/src/mirall/protocolwidget.cpp
@@ -59,7 +59,6 @@ ProtocolWidget::ProtocolWidget(QWidget *parent) :
     connect(this, SIGNAL(guiLog(QString,QString)), Logger::instance(), SIGNAL(guiLog(QString,QString)));
 
     _clearBlacklistBtn = _ui->_dialogButtonBox->addButton(tr("Retry Sync"), QDialogButtonBox::ActionRole);
-    _clearBlacklistBtn->setToolTip( tr("Some files are ignored because of previous errors.\n Try to sync these again.") );
     _clearBlacklistBtn->setEnabled(false);
     connect(_clearBlacklistBtn, SIGNAL(clicked()), SLOT(slotClearBlacklist()));
 
@@ -95,6 +94,8 @@ void ProtocolWidget::setupList()
   }
   _ui->_treeWidget->addTopLevelItems(items);
 
+  computeResyncButtonEnabled();
+
 }
 
 ProtocolWidget::~ProtocolWidget()
@@ -271,7 +272,14 @@ void ProtocolWidget::computeResyncButtonEnabled()
     foreach( Folder *f, folders ) {
         cnt += f->blackListEntryCount();
     }
+
+    QString t = tr("Currently no files are ignored because of previous errors.");
+    if(cnt > 0) {
+        t = tr("%1 files are ignored because of previous errors.\n Try to sync these again.").arg(cnt);
+    }
+
     _clearBlacklistBtn->setEnabled(cnt > 0);
+    _clearBlacklistBtn->setToolTip(t);
 
 }
 

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