Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schuster <michael@schuster.ms>2020-09-17 04:38:35 +0300
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>2020-09-23 10:21:35 +0300
commitce71ffe9f9c78a84a2698c18ff16923ba4230f96 (patch)
tree6c480352c501285865172524bb7c8743bb05b11e /src/gui/wizard
parent122493eeeb1c1c122294f8d26eac08771a29fe1e (diff)
Allow server URL to be pre-defined without enforcing it to be used unmodified
APPLICATION_SERVER_URL can be either empty or be specified. This commit adds the new CMake option APPLICATION_SERVER_URL_ENFORCE to decide whether to enforce the URL's unmodified use (like before, default: ON) or to allow modification by the user (new). By default APPLICATION_SERVER_URL_ENFORCE is set to ON, to no break with the previous implementation's expectations. If APPLICATION_SERVER_URL is empty, APPLICATION_SERVER_URL_ENFORCE will be ignored by the Account Wizard. The previous behaviour confused me a bit with branded builds. When the URL was (usually) specified but not forced, it was simply discarded, forcing the user to manually supply it. Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'src/gui/wizard')
-rw-r--r--src/gui/wizard/owncloudsetuppage.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp
index 71f1c19c9..1bc76fdef 100644
--- a/src/gui/wizard/owncloudsetuppage.cpp
+++ b/src/gui/wizard/owncloudsetuppage.cpp
@@ -51,7 +51,7 @@ OwncloudSetupPage::OwncloudSetupPage(QWidget *parent)
if (theme->overrideServerUrl().isEmpty()) {
_ui.leUrl->setPostfix(theme->wizardUrlPostfix());
_ui.leUrl->setPlaceholderText(theme->wizardUrlHint());
- } else {
+ } else if (Theme::instance()->forceOverrideServerUrl()) {
_ui.leUrl->setEnabled(false);
}
@@ -213,6 +213,10 @@ void OwncloudSetupPage::initializePage()
// immediately.
if (Theme::instance()->overrideServerUrl().isEmpty()) {
_ui.leUrl->setFocus();
+ } else if (!Theme::instance()->forceOverrideServerUrl()) {
+ if (nextButton) {
+ nextButton->setFocus();
+ }
} else {
setCommitPage(true);
// Hack: setCommitPage() changes caption, but after an error this page could still be visible