[Pkg-owncloud-commits] [owncloud-client] 53/120: Theme: add a method to hide the 'add account' button #3517
Sandro Knauß
hefee-guest at moszumanska.debian.org
Mon Aug 24 00:02:44 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 6b003f96f5e3064c78e653dc9586eeb609b7053c
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Aug 13 09:38:53 2015 +0200
Theme: add a method to hide the 'add account' button #3517
---
src/gui/generalsettings.cpp | 4 ++++
src/libsync/theme.cpp | 5 +++++
src/libsync/theme.h | 4 ++++
3 files changed, 13 insertions(+)
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index 919a67b..55be618 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -76,6 +76,10 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
connect(_ui->ignoredFilesButton, SIGNAL(clicked()), SLOT(slotIgnoreFilesEditor()));
connect(_ui->addAccountButton, SIGNAL(clicked()), SLOT(slotOpenAccountWizard()));
+
+ if (Theme::instance()->singleAccount()) {
+ _ui->addAccountButton->setVisible(false);
+ }
}
GeneralSettings::~GeneralSettings()
diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp
index 3aafeaa..737b304 100644
--- a/src/libsync/theme.cpp
+++ b/src/libsync/theme.cpp
@@ -201,6 +201,11 @@ bool Theme::singleSyncFolder() const {
return false;
}
+bool Theme::singleAccount() const
+{
+ return false;
+}
+
QString Theme::defaultServerFolder() const
{
return QLatin1String("/");
diff --git a/src/libsync/theme.h b/src/libsync/theme.h
index 2d34c31..3836c73 100644
--- a/src/libsync/theme.h
+++ b/src/libsync/theme.h
@@ -111,6 +111,10 @@ public:
* Characteristics: bool if more than one sync folder is allowed
*/
virtual bool singleSyncFolder() const;
+ /**
+ * When true, there can only be one account.
+ */
+ virtual bool singleAccount() const;
/**
* URL to help file
--
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