SettingsDialog: show "Account" for the tab name for branded client

https://github.com/owncloud/enterprise/issues/863
This commit is contained in:
Olivier Goffart 2016-01-07 17:58:23 +01:00
parent e7e918dafe
commit bb6a50be02
2 changed files with 9 additions and 4 deletions

View file

@ -190,10 +190,15 @@ void SettingsDialog::showActivityPage()
void SettingsDialog::accountAdded(AccountState *s)
{
auto height = _toolBar->sizeHint().height();
bool brandingSingleAccount = !Theme::instance()->multiAccount();
auto accountAction = createColorAwareAction(QLatin1String(":/client/resources/account.png"),
s->account()->displayName());
accountAction->setToolTip(s->account()->displayName());
accountAction->setIconText(s->shortDisplayNameForSettings(height * buttonSizeRatio));
brandingSingleAccount ? tr("Account") : s->account()->displayName());
if (!brandingSingleAccount) {
accountAction->setToolTip(s->account()->displayName());
accountAction->setIconText(s->shortDisplayNameForSettings(height * buttonSizeRatio));
}
_toolBar->insertAction(_toolBar->actions().at(0), accountAction);
auto accountSettings = new AccountSettings(s, this);
_ui->stack->insertWidget(0 , accountSettings);

View file

@ -117,7 +117,7 @@ void SettingsDialogMac::accountAdded(AccountState *s)
QIcon accountIcon = MacStandardIcon::icon(MacStandardIcon::UserAccounts);
auto accountSettings = new AccountSettings(s, this);
QString displayName = s->shortDisplayNameForSettings();
QString displayName = Theme::instance()->multiAccount() ? s->shortDisplayNameForSettings() : tr("Account");
insertPreferencesPanel(0, accountIcon, displayName, accountSettings);