Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-02-06 14:02:42 +0300
committerOlivier Goffart <ogoffart@woboq.com>2015-02-06 14:27:54 +0300
commit0d2fb0754c178208d159be7fb77b491cc6a97fe9 (patch)
treeb09d3077534833934547b0109162d5f33dc65e27 /src/gui/selectivesyncdialog.cpp
parentdbca7469f2ffc42e88a83cae5c0fe8591bf36374 (diff)
Wizard: Fix the advanced setup page when the theme has a defaultServerFolder
Especially the selective sync dialog Task #2788
Diffstat (limited to 'src/gui/selectivesyncdialog.cpp')
-rw-r--r--src/gui/selectivesyncdialog.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/selectivesyncdialog.cpp b/src/gui/selectivesyncdialog.cpp
index 310bc442a..243558a32 100644
--- a/src/gui/selectivesyncdialog.cpp
+++ b/src/gui/selectivesyncdialog.cpp
@@ -53,7 +53,6 @@ QSize SelectiveSyncTreeView::sizeHint() const
return QTreeView::sizeHint().expandedTo(QSize(400, 400));
}
-
void SelectiveSyncTreeView::refreshFolders()
{
LsColJob *job = new LsColJob(_account, _folderPath, this);
@@ -65,6 +64,18 @@ void SelectiveSyncTreeView::refreshFolders()
_loading->move(10,header()->height() + 10);
}
+void SelectiveSyncTreeView::setFolderInfo(const QString& folderPath, const QString& rootName, const QStringList& oldBlackList)
+{
+ _folderPath = folderPath;
+ if (_folderPath.startsWith(QLatin1Char('/'))) {
+ // remove leading '/'
+ _folderPath = folderPath.mid(1);
+ }
+ _rootName = rootName;
+ _oldBlackList = oldBlackList;
+ refreshFolders();
+}
+
static QTreeWidgetItem* findFirstChild(QTreeWidgetItem *parent, const QString& text)
{
for (int i = 0; i < parent->childCount(); ++i) {
@@ -310,14 +321,15 @@ SelectiveSyncDialog::SelectiveSyncDialog(AccountPtr account, Folder* folder, QWi
connect(_folder, SIGNAL(destroyed(QObject*)), this, SLOT(deleteLater()));
}
-SelectiveSyncDialog::SelectiveSyncDialog(AccountPtr account, const QStringList& blacklist, QWidget* parent, Qt::WindowFlags f)
+SelectiveSyncDialog::SelectiveSyncDialog(AccountPtr account, const QString &folder,
+ const QStringList& blacklist, QWidget* parent, Qt::WindowFlags f)
: QDialog(parent, f), _folder(0)
{
init(account,
Theme::instance()->wizardSelectiveSyncDefaultNothing() ?
tr("Choose What to Sync: Select remote subfolders you wish to synchronize.") :
tr("Choose What to Sync: Deselect remote subfolders you do not wish to synchronize."));
- _treeView->setFolderInfo(QString(), QString(), blacklist);
+ _treeView->setFolderInfo(folder, QString(), blacklist);
}
void SelectiveSyncDialog::init(const AccountPtr &account, const QString &labelText)