diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | ios/config.h.in | 4 | ||||
-rw-r--r-- | loleaflet/html/loleaflet.html.m4 | 2 | ||||
-rw-r--r-- | loolwsd.xml.in | 1 | ||||
-rw-r--r-- | wsd/FileServer.cpp | 5 | ||||
-rw-r--r-- | wsd/LOOLWSD.cpp | 1 |
6 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 725f137254..a7bd6a57c3 100644 --- a/configure.ac +++ b/configure.ac @@ -601,9 +601,15 @@ AC_SUBST(MAX_DOCUMENTS) ENABLE_WELCOME_MESSAGE=false AS_IF([test "$enable_welcome_message" = "yes"], [ENABLE_WELCOME_MESSAGE="true"]) -AC_DEFINE_UNQUOTED([ENABLE_WELCOME_MESSAGE],["$ENABLE_WELCOME_MESSAGE"],[Should the Release notes message on startup should be enabled be default?]) +AC_DEFINE_UNQUOTED([ENABLE_WELCOME_MESSAGE],["$ENABLE_WELCOME_MESSAGE"],[Should the Release notes message on startup be enabled by default?]) AC_SUBST(ENABLE_WELCOME_MESSAGE) +ENABLE_WELCOME_MESSAGE_BUTTON=false +AS_IF([test "$enable_welcome_message_button" = "yes"], + [ENABLE_WELCOME_MESSAGE_BUTTON="true"]) +AC_DEFINE_UNQUOTED([ENABLE_WELCOME_MESSAGE_BUTTON],["$ENABLE_WELCOME_MESSAGE_BUTTON"],[Should the Release notes message on startup should have a dismiss button instead of an x button to close by default?]) +AC_SUBST(ENABLE_WELCOME_MESSAGE_BUTTON) + VEREIGN_URL= if test "$enable_vereign" = "yes"; then VEREIGN_URL="https://app.vereign.com" diff --git a/ios/config.h.in b/ios/config.h.in index f80b2ae5f4..18ec2613d0 100644 --- a/ios/config.h.in +++ b/ios/config.h.in @@ -23,6 +23,10 @@ */ #define ENABLE_WELCOME_MESSAGE "false" +/* Should the Release notes message on startup have a dismiss button instead of an x button to close by default? + */ +#define ENABLE_WELCOME_MESSAGE_BUTTON "false" + /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 0 diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4 index c8d51f0f04..945449d9f6 100644 --- a/loleaflet/html/loleaflet.html.m4 +++ b/loleaflet/html/loleaflet.html.m4 @@ -235,6 +235,7 @@ m4_ifelse(MOBILEAPP,[true], window.accessHeader = ''; window.loleafletLogging = 'true'; window.enableWelcomeMessage = false; + window.enableWelcomeMessageButton = false; window.outOfFocusTimeoutSecs = 1000000; window.idleTimeoutSecs = 1000000; window.reuseCookies = ''; @@ -248,6 +249,7 @@ m4_ifelse(MOBILEAPP,[true], window.accessHeader = '%ACCESS_HEADER%'; window.loleafletLogging = '%LOLEAFLET_LOGGING%'; window.enableWelcomeMessage = %ENABLE_WELCOME_MSG%; + window.enableWelcomeMessageButton = %ENABLE_WELCOME_MSG_BTN%; window.outOfFocusTimeoutSecs = %OUT_OF_FOCUS_TIMEOUT_SECS%; window.idleTimeoutSecs = %IDLE_TIMEOUT_SECS%; window.reuseCookies = '%REUSE_COOKIES%'; diff --git a/loolwsd.xml.in b/loolwsd.xml.in index d22ec7e983..087ea3bdc6 100644 --- a/loolwsd.xml.in +++ b/loolwsd.xml.in @@ -116,6 +116,7 @@ <welcome> <enable type="bool" desc="Controls whether the welcome screen should be shown to the users on new install and updates." default="@ENABLE_WELCOME_MESSAGE@">@ENABLE_WELCOME_MESSAGE@</enable> + <enable_button type="bool" desc="Controls whether the welcome screen should have an explanatory button instead of an X button to close the dialog." default="@ENABLE_WELCOME_MESSAGE_BUTTON@">@ENABLE_WELCOME_MESSAGE_BUTTON@</enable_button> <path desc="Path to 'welcome-$lang.html' files served on first start or when the version changes. When empty, defaults to the Release notes." type="path" relative="true" default="loleaflet/welcome"></path> </welcome> diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 5a973bc01e..432a09b1c7 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -741,6 +741,11 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco:: enableWelcomeMessage = "true"; Poco::replaceInPlace(preprocess, std::string("%ENABLE_WELCOME_MSG%"), enableWelcomeMessage); + std::string enableWelcomeMessageButton = "false"; + if (config.getBool("welcome.enable_button", false)) + enableWelcomeMessageButton = "true"; + Poco::replaceInPlace(preprocess, std::string("%ENABLE_WELCOME_MSG_BTN%"), enableWelcomeMessageButton); + // Capture cookies so we can optionally reuse them for the storage requests. { NameValueCollection cookies; diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index d54788d494..379e960fe8 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -942,6 +942,7 @@ void LOOLWSD::initialize(Application& self) { "trace.path[@snapshot]", "false" }, { "trace[@enable]", "false" }, { "welcome.enable", ENABLE_WELCOME_MESSAGE }, + { "welcome.enable_button", ENABLE_WELCOME_MESSAGE_BUTTON }, { "welcome.path", "loleaflet/welcome" } }; |