[Pkg-owncloud-commits] [owncloud-client] 84/171: SettingsDialog: show "Account" for the tab name for branded client
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Feb 17 09:36:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to annotated tag upstream/2.1.1+dfsg
in repository owncloud-client.
commit bb6a50be022075715cd0b8a583906f79faa08c0e
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Jan 7 17:58:23 2016 +0100
SettingsDialog: show "Account" for the tab name for branded client
https://github.com/owncloud/enterprise/issues/863
---
src/gui/settingsdialog.cpp | 11 ++++++++---
src/gui/settingsdialogmac.cpp | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp
index 5c5304a..abe9c92 100644
--- a/src/gui/settingsdialog.cpp
+++ b/src/gui/settingsdialog.cpp
@@ -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);
diff --git a/src/gui/settingsdialogmac.cpp b/src/gui/settingsdialogmac.cpp
index 997c1f9..a73d56f 100644
--- a/src/gui/settingsdialogmac.cpp
+++ b/src/gui/settingsdialogmac.cpp
@@ -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);
--
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