mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Theme: add a method to hide the 'add account' button #3517
This commit is contained in:
parent
28c732af33
commit
6b003f96f5
3 changed files with 13 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -201,6 +201,11 @@ bool Theme::singleSyncFolder() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Theme::singleAccount() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QString Theme::defaultServerFolder() const
|
||||
{
|
||||
return QLatin1String("/");
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue