mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 14:05:58 +03:00
parent
4f367faf4d
commit
7740150576
2 changed files with 7 additions and 0 deletions
|
@ -33,6 +33,7 @@ namespace Mirall {
|
||||||
SelectiveSyncTreeView::SelectiveSyncTreeView(Account *account, QWidget* parent)
|
SelectiveSyncTreeView::SelectiveSyncTreeView(Account *account, QWidget* parent)
|
||||||
: QTreeWidget(parent), _inserting(false), _account(account)
|
: QTreeWidget(parent), _inserting(false), _account(account)
|
||||||
{
|
{
|
||||||
|
_loading = new QLabel(tr("Loading ..."), this);
|
||||||
connect(this, SIGNAL(itemExpanded(QTreeWidgetItem*)), this, SLOT(slotItemExpanded(QTreeWidgetItem*)));
|
connect(this, SIGNAL(itemExpanded(QTreeWidgetItem*)), this, SLOT(slotItemExpanded(QTreeWidgetItem*)));
|
||||||
connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotItemChanged(QTreeWidgetItem*,int)));
|
connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotItemChanged(QTreeWidgetItem*,int)));
|
||||||
header()->hide();
|
header()->hide();
|
||||||
|
@ -47,6 +48,8 @@ void SelectiveSyncTreeView::refreshFolders()
|
||||||
this, SLOT(slotUpdateDirectories(QStringList)));
|
this, SLOT(slotUpdateDirectories(QStringList)));
|
||||||
job->start();
|
job->start();
|
||||||
clear();
|
clear();
|
||||||
|
_loading->show();
|
||||||
|
_loading->move(10,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QTreeWidgetItem* findFirstChild(QTreeWidgetItem *parent, const QString& text)
|
static QTreeWidgetItem* findFirstChild(QTreeWidgetItem *parent, const QString& text)
|
||||||
|
@ -104,6 +107,8 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
|
||||||
QScopedValueRollback<bool> isInserting(_inserting);
|
QScopedValueRollback<bool> isInserting(_inserting);
|
||||||
_inserting = true;
|
_inserting = true;
|
||||||
|
|
||||||
|
_loading->hide();
|
||||||
|
|
||||||
QTreeWidgetItem *root = topLevelItem(0);
|
QTreeWidgetItem *root = topLevelItem(0);
|
||||||
if (!root) {
|
if (!root) {
|
||||||
root = new QTreeWidgetItem(this);
|
root = new QTreeWidgetItem(this);
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
class QTreeWidgetItem;
|
class QTreeWidgetItem;
|
||||||
class QTreeWidget;
|
class QTreeWidget;
|
||||||
|
class QLabel;
|
||||||
namespace Mirall {
|
namespace Mirall {
|
||||||
|
|
||||||
class Account;
|
class Account;
|
||||||
|
@ -48,6 +49,7 @@ private:
|
||||||
QStringList _oldBlackList;
|
QStringList _oldBlackList;
|
||||||
bool _inserting; // set to true when we are inserting new items on the list
|
bool _inserting; // set to true when we are inserting new items on the list
|
||||||
Account *_account;
|
Account *_account;
|
||||||
|
QLabel *_loading;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SelectiveSyncDialog : public QDialog {
|
class SelectiveSyncDialog : public QDialog {
|
||||||
|
|
Loading…
Reference in a new issue