[Libreoffice-commits] online.git: configure.ac ios/config.h.in loleaflet/html loolwsd.xml.in wsd/FileServer.cpp wsd/LOOLWSD.cpp
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 20 18:35:29 UTC 2020
configure.ac | 8 +++++++-
ios/config.h.in | 4 ++++
loleaflet/html/loleaflet.html.m4 | 2 ++
loolwsd.xml.in | 1 +
wsd/FileServer.cpp | 5 +++++
wsd/LOOLWSD.cpp | 1 +
6 files changed, 20 insertions(+), 1 deletion(-)
New commits:
commit f507302993b67e251a0d040c5d96770a6b8b6a98
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Mon Apr 20 21:02:57 2020 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Mon Apr 20 20:35:08 2020 +0200
Welcome: Add config for enabling the dismiss button
Change-Id: Ia2fbf066493d91a2b10866e66d11332b5cfc10fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92593
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/configure.ac b/configure.ac
index 725f13725..a7bd6a57c 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 f80b2ae5f..18ec2613d 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 c8d51f0f0..945449d9f 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 d22ec7e98..087ea3bdc 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 5a973bc01..432a09b1c 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 d54788d49..379e960fe 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" }
};
More information about the Libreoffice-commits
mailing list