[Pkg-owncloud-commits] [owncloud-client] 94/120: Settings dialog: Move more common hostname prefixes in toolbar

Sandro Knauß hefee-guest at moszumanska.debian.org
Mon Aug 24 00:02:51 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 6c57d71ca40121a014b9de727c1c84d14cbc0f32
Author: Markus Goetz <markus at woboq.com>
Date:   Mon Aug 17 12:38:04 2015 +0200

    Settings dialog: Move more common hostname prefixes in toolbar
    
    For #3577
---
 src/gui/accountstate.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index e7006f3..9256693 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -259,9 +259,14 @@ QString AccountState::shortDisplayNameForSettings() const
         userWithoutMailHost = userWithoutMailHost.left(userWithoutMailHost.lastIndexOf('@'));
     }
     QString hostWithoutTld = account()->url().host();
-    if (hostWithoutTld.contains('.')) {
+    if (hostWithoutTld.contains('.') && !hostWithoutTld.at(0).isDigit()) {
         hostWithoutTld = hostWithoutTld.left(hostWithoutTld.lastIndexOf('.'));
         hostWithoutTld = hostWithoutTld.replace(QLatin1String("www."), QLatin1String(""));
+        hostWithoutTld = hostWithoutTld.replace(QLatin1String("cloud."), QLatin1String(""));
+        hostWithoutTld = hostWithoutTld.replace(QLatin1String("sync."), QLatin1String(""));
+        hostWithoutTld = hostWithoutTld.replace(QLatin1String("drive."), QLatin1String(""));
+        hostWithoutTld = hostWithoutTld.replace(QLatin1String("share."), QLatin1String(""));
+        hostWithoutTld = hostWithoutTld.replace(QLatin1String("web."), QLatin1String(""));
     }
 
     return userWithoutMailHost + QLatin1String("\n") + hostWithoutTld;

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