From 2ddbdeb165efc0c41866f1fba084fb365474e63c Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 11 May 2021 01:48:21 +0300
Subject: [PATCH] SL-15168 Reset title of guidebook when opening

---
 indra/newview/llfloaterhowto.cpp                      | 6 ++++++
 indra/newview/llurlfloaterdispatchhandler.cpp         | 4 ++--
 indra/newview/skins/default/xui/en/floater_how_to.xml | 9 +++++++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp
index ef400608078..6e913b08eab 100644
--- a/indra/newview/llfloaterhowto.cpp
+++ b/indra/newview/llfloaterhowto.cpp
@@ -51,6 +51,12 @@ BOOL LLFloaterHowTo::postBuild()
 
 void LLFloaterHowTo::onOpen(const LLSD& key)
 {
+    // LLFloaterHowTo is intended to be opened as a location specific guidebook
+    // with custom titles, reset the title, LLUrlFloaterDispatchHandler will
+    // set needed one later
+    // todo: make title into general parameter for LLFloaterWebContent
+    setTitle(getString("default_tittle"));
+
     LLFloaterWebContent::Params p(key);
     if (!p.url.isProvided() || p.url.getValue().empty())
     {
diff --git a/indra/newview/llurlfloaterdispatchhandler.cpp b/indra/newview/llurlfloaterdispatchhandler.cpp
index f03caf43b81..519f81b72d8 100644
--- a/indra/newview/llurlfloaterdispatchhandler.cpp
+++ b/indra/newview/llurlfloaterdispatchhandler.cpp
@@ -52,8 +52,8 @@ const std::string KEY_URI("floater_url");
 const std::string KEY_PARAMS("floater_params");
 
 // Supported floaters, for now it's exact matching, later it might get extended
-const std::string FLOATER_GUIDEBOOK("secondlife://guidebook"); // translates to "how_to"
-const std::string FLOATER_WEB_CONTENT("secondlife://browser"); // translates to "web_content"
+const std::string FLOATER_GUIDEBOOK("secondlife:///guidebook"); // translates to "how_to"
+const std::string FLOATER_WEB_CONTENT("secondlife:///browser"); // translates to "web_content"
 
 // Web content universal arguments
 const std::string KEY_TRUSTED_CONTENT("trusted_content");
diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml
index acfa6a51525..95690219b8c 100644
--- a/indra/newview/skins/default/xui/en/floater_how_to.xml
+++ b/indra/newview/skins/default/xui/en/floater_how_to.xml
@@ -3,7 +3,7 @@
   legacy_header_height="18"
   can_resize="false"
   can_minimize="false"
-  can_close="false" 
+  can_close="false"
   height="525"
   layout="topleft"
   name="floater_how_to"
@@ -14,4 +14,9 @@
   width="310"
   rel_x="-0.469309"
   rel_y="-0.011166"
-  filename="floater_web_content.xml"/>
\ No newline at end of file
+  filename="floater_web_content.xml">
+  <floater.string
+    name="default_tittle">
+WELCOME ISLAND GUIDEBOOK
+  </floater.string>
+</floater>
\ No newline at end of file
-- 
GitLab