Theme: add a method to hide the 'add account' button #3517

This commit is contained in:
Olivier Goffart 2015-08-13 09:38:53 +02:00
parent 28c732af33
commit 6b003f96f5
3 changed files with 13 additions and 0 deletions

View file

@ -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()

View file

@ -201,6 +201,11 @@ bool Theme::singleSyncFolder() const {
return false;
}
bool Theme::singleAccount() const
{
return false;
}
QString Theme::defaultServerFolder() const
{
return QLatin1String("/");

View file

@ -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