[Pkg-owncloud-commits] [owncloud-client] 77/89: Respect the override URL properly

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:39 UTC 2013


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 5b2c734fe50c272ca56dfb10b2cd53d73d6b62af
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Thu Dec 12 16:20:01 2013 +0100

    Respect the override URL properly
---
 src/mirall/account.cpp           |  1 +
 src/wizard/owncloudsetuppage.cpp | 15 ++++-----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp
index b452403..3563731 100644
--- a/src/mirall/account.cpp
+++ b/src/mirall/account.cpp
@@ -59,6 +59,7 @@ void AccountManager::setAccount(Account *account)
 
 Account::Account(AbstractSslErrorHandler *sslErrorHandler, QObject *parent)
     : QObject(parent)
+    , _url(Theme::instance()->overrideServerUrl())
     , _sslErrorHandler(sslErrorHandler)
     , _am(0)
     , _credentials(0)
diff --git a/src/wizard/owncloudsetuppage.cpp b/src/wizard/owncloudsetuppage.cpp
index 5afbf33..ea9850e 100644
--- a/src/wizard/owncloudsetuppage.cpp
+++ b/src/wizard/owncloudsetuppage.cpp
@@ -78,14 +78,6 @@ void OwncloudSetupPage::setupCustomization()
 
     variant = theme->customMedia( Theme::oCSetupBottom );
     WizardCommon::setupCustomMedia( variant, _ui.bottomLabel );
-
-    QString fixUrl = theme->overrideServerUrl();
-    if( !fixUrl.isEmpty() ) {
-        _ui.label_2->hide();
-        setServerUrl( fixUrl );
-        _ui.leUrl->setEnabled( false );
-        _ui.leUrl->hide();
-    }
 }
 
 // slot hit from textChanged of the url entry field.
@@ -138,12 +130,13 @@ void OwncloudSetupPage::initializePage()
     if (pushButton)
         pushButton->setDefault(true);
 
-    // URL entry is disabled when url is overriden by theme. In that
-    // case we just check the server type and switch to second page
+    // If url is overriden by theme, it's already set and
+    // we just check the server type and switch to second page
     // immediately.
-    if (_ui.leUrl->isEnabled()) {
+    if (Theme::instance()->overrideServerUrl().isEmpty()) {
         _ui.leUrl->setFocus();
     } else {
+        setEnabled(false);
         validatePage();
     }
 }

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