[Pkg-owncloud-commits] [owncloud-client] 361/484: Activity View: Update only if visible and when becoming visible #4083
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:38:05 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 f2d8143511a4a86bf7bc6f1e5f7159128ef6a5b1
Author: Markus Goetz <markus at woboq.com>
Date: Wed Nov 18 15:25:29 2015 +0100
Activity View: Update only if visible and when becoming visible #4083
---
src/gui/activitywidget.cpp | 13 ++++++++++++-
src/gui/activitywidget.h | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp
index 34a7b79..91af0aa 100644
--- a/src/gui/activitywidget.cpp
+++ b/src/gui/activitywidget.cpp
@@ -418,12 +418,23 @@ void ActivitySettings::slotRemoveAccount( AccountState *ptr )
void ActivitySettings::slotRefresh( AccountState* ptr )
{
- if( ptr && ptr->isConnected() ) {
+ if( ptr && ptr->isConnected() && isVisible()) {
_progressIndicator->startAnimation();
_activityWidget->slotRefresh(ptr);
}
}
+bool ActivitySettings::event(QEvent* e)
+{
+ if (e->type() == QEvent::Show) {
+ AccountManager *am = AccountManager::instance();
+ foreach (AccountStatePtr a, am->accounts()) {
+ slotRefresh(a.data());
+ }
+ }
+ return QWidget::event(e);
+}
+
ActivitySettings::~ActivitySettings()
{
diff --git a/src/gui/activitywidget.h b/src/gui/activitywidget.h
index 8fcae67..6b51f09 100644
--- a/src/gui/activitywidget.h
+++ b/src/gui/activitywidget.h
@@ -182,6 +182,8 @@ signals:
void guiLog(const QString&, const QString&);
private:
+ bool event(QEvent* e) Q_DECL_OVERRIDE;
+
QTabWidget *_tab;
ActivityWidget *_activityWidget;
ProtocolWidget *_protocolWidget;
--
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