SL-15363 how_to on older viewers is forced to persist

Older how_to floater is not set to persist in between sessions and gets stuck, ranamed new how_to into guidebook to avoid the issue
master
Andrey Kleshchev 2021-06-09 19:46:23 +03:00
parent 5b730160f6
commit 79f8c024c3
5 changed files with 10 additions and 10 deletions

View File

@ -89,9 +89,9 @@
label_ref="Command_HowTo_Label"
tooltip_ref="Command_HowTo_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="how_to"
execute_parameters="guidebook"
is_running_function="Floater.IsOpen"
is_running_parameters="how_to"
is_running_parameters="guidebook"
/>
<command name="inventory"
available_in_toybox="true"

View File

@ -75,7 +75,7 @@ void LLFloaterHowTo::onOpen(const LLSD& key)
LLFloaterHowTo* LLFloaterHowTo::getInstance()
{
return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("how_to");
return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("guidebook");
}
BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask)

View File

@ -50,8 +50,8 @@ const std::string KEY_URL("floater_url");
const std::string KEY_PARAMS("floater_params");
// Supported floaters
const std::string FLOATER_GUIDEBOOK("guidebook"); // alias for how_to
const std::string FLOATER_HOW_TO("how_to");
const std::string FLOATER_GUIDEBOOK("guidebook");
const std::string FLOATER_HOW_TO("how_to"); // alias for guidebook
const std::string FLOATER_WEB_CONTENT("web_content");
// All arguments are palceholders! Server side will need to add validation first.
@ -163,17 +163,17 @@ bool LLUrlFloaterDispatchHandler::operator()(const LLDispatcher *, const std::st
// only one instance of guidebook can exist at a time, so if this command arrives,
// we need to close previous guidebook then reopen it.
LLFloater* instance = LLFloaterReg::findInstance("how_to");
LLFloater* instance = LLFloaterReg::findInstance("guidebook");
if (instance)
{
instance->closeHostedFloater();
}
LLFloaterReg::toggleInstanceOrBringToFront("how_to", params);
LLFloaterReg::toggleInstanceOrBringToFront("guidebook", params);
if (command_params.isMap())
{
LLFloater* instance = LLFloaterReg::findInstance("how_to");
LLFloater* instance = LLFloaterReg::findInstance("guidebook");
if (command_params.has(KEY_CAN_CLOSE))
{
instance->setCanClose(command_params[KEY_CAN_CLOSE].asBoolean());

View File

@ -363,7 +363,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>);
LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>);
LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>);

View File

@ -7739,7 +7739,7 @@ class LLToggleHowTo : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
LLFloaterReg::toggleInstanceOrBringToFront("how_to");
LLFloaterReg::toggleInstanceOrBringToFront("guidebook");
return true;
}
};