[Pkg-owncloud-commits] [owncloud-client] 157/484: Add slot to handle clicks on folder names.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:33 UTC 2015
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 46558d79a59c1f1ce034a447f65d05ef09378b85
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Sep 1 15:37:01 2015 +0200
Add slot to handle clicks on folder names.
---
src/gui/accountsettings.cpp | 22 +++++++++++++++++++---
src/gui/accountsettings.h | 1 +
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 7a4a0f3..363072a 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -88,6 +88,8 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
connect(ui->_folderList, SIGNAL(expanded(QModelIndex)) , this, SLOT(refreshSelectiveSyncStatus()));
connect(ui->_folderList, SIGNAL(collapsed(QModelIndex)) , this, SLOT(refreshSelectiveSyncStatus()));
+ connect(ui->selectiveSyncNotification, SIGNAL(linkActivated(QString)),
+ this, SLOT(slotLinkActivated(QString)));
connect(_model, SIGNAL(suggestExpand(QModelIndex)), ui->_folderList, SLOT(expand(QModelIndex)));
connect(_model, SIGNAL(dirtyChanged()), this, SLOT(refreshSelectiveSyncStatus()));
refreshSelectiveSyncStatus();
@@ -510,6 +512,12 @@ void AccountSettings::slotAccountStateChanged(int state)
}
}
+void AccountSettings::slotLinkActivated(const QString& link)
+{
+ qDebug() << "xxxx " << link;
+}
+
+
AccountSettings::~AccountSettings()
{
delete ui;
@@ -542,9 +550,17 @@ void AccountSettings::refreshSelectiveSyncStatus()
ui->selectiveSyncNotification->setText(QString());
} else {
ui->selectiveSyncNotification->setVisible(true);
- ui->selectiveSyncNotification->setText(
- tr("There are new folders that were not synchronized because they are too big: %1")
- .arg(undecidedFolder.join(tr(", "))));
+ QString msg = tr("There are new folders that were not synchronized because they are too big: ");
+
+ int cnt = 0;
+ foreach(auto& folder, undecidedFolder) {
+ if( cnt++ ) {
+ msg += QLatin1String(", ");
+ }
+ QString p = QString::fromLatin1("<a href=\"%1\">%1</a>").arg(folder);
+ msg += p;
+ }
+ ui->selectiveSyncNotification->setText(msg);
shouldBeVisible = true;
}
diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h
index 20b0da2..4d8ad31 100644
--- a/src/gui/accountsettings.h
+++ b/src/gui/accountsettings.h
@@ -82,6 +82,7 @@ protected slots:
void slotCustomContextMenuRequested(const QPoint&);
void slotFolderListClicked( const QModelIndex& indx );
void doExpand();
+ void slotLinkActivated(const QString &link);
private:
void showConnectionLabel(const QString& message,
--
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