[Pkg-owncloud-commits] [owncloud-client] 166/211: Selective Sync widget: add a "Loading..." label

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:41 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 77401505763f8eb33af953e33bb18f5323a1b376
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Oct 22 13:48:05 2014 +0200

    Selective Sync widget:  add a "Loading..." label
    
    Task #2088
---
 src/mirall/selectivesyncdialog.cpp | 5 +++++
 src/mirall/selectivesyncdialog.h   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/src/mirall/selectivesyncdialog.cpp b/src/mirall/selectivesyncdialog.cpp
index 23ecff9..23565cd 100644
--- a/src/mirall/selectivesyncdialog.cpp
+++ b/src/mirall/selectivesyncdialog.cpp
@@ -33,6 +33,7 @@ namespace Mirall {
 SelectiveSyncTreeView::SelectiveSyncTreeView(Account *account, QWidget* parent)
     : QTreeWidget(parent), _inserting(false), _account(account)
 {
+    _loading = new QLabel(tr("Loading ..."), this);
     connect(this, SIGNAL(itemExpanded(QTreeWidgetItem*)), this, SLOT(slotItemExpanded(QTreeWidgetItem*)));
     connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotItemChanged(QTreeWidgetItem*,int)));
     header()->hide();
@@ -47,6 +48,8 @@ void SelectiveSyncTreeView::refreshFolders()
             this, SLOT(slotUpdateDirectories(QStringList)));
     job->start();
     clear();
+    _loading->show();
+    _loading->move(10,10);
 }
 
 static QTreeWidgetItem* findFirstChild(QTreeWidgetItem *parent, const QString& text)
@@ -104,6 +107,8 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
     QScopedValueRollback<bool> isInserting(_inserting);
     _inserting = true;
 
+    _loading->hide();
+
     QTreeWidgetItem *root = topLevelItem(0);
     if (!root) {
         root = new QTreeWidgetItem(this);
diff --git a/src/mirall/selectivesyncdialog.h b/src/mirall/selectivesyncdialog.h
index 635421b..3bd5c09 100644
--- a/src/mirall/selectivesyncdialog.h
+++ b/src/mirall/selectivesyncdialog.h
@@ -18,6 +18,7 @@
 
 class QTreeWidgetItem;
 class QTreeWidget;
+class QLabel;
 namespace Mirall {
 
 class Account;
@@ -48,6 +49,7 @@ private:
     QStringList _oldBlackList;
     bool _inserting; // set to true when we are inserting new items on the list
     Account *_account;
+    QLabel *_loading;
 };
 
 class SelectiveSyncDialog : public QDialog {

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