summaryrefslogtreecommitdiff
path: root/indra/llui/llfloaterreg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloaterreg.cpp')
-rw-r--r--indra/llui/llfloaterreg.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 989ce12d09..fd5a370bc3 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -248,7 +248,7 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str
// Visibility Management
//static
-LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
+LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus)
{
if( sBlockShowFloaters
// see EXT-7090
@@ -259,7 +259,7 @@ LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key,
{
instance->openFloater(key);
if (focus)
- instance->setFocus(TRUE);
+ instance->setFocus(true);
}
return instance;
}
@@ -281,15 +281,15 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key)
bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key)
{
LLFloater* instance = findInstance(name, key);
- if (LLFloater::isShown(instance))
+ if (instance && instance->isShown())
{
instance->closeHostedFloater();
return false;
}
- else
- {
- return showInstance(name, key, TRUE) ? true : false;
- }
+
+ instance = showInstance(name, key, true);
+
+ return instance != nullptr;
}
//static
@@ -310,7 +310,7 @@ void LLFloaterReg::showInitialVisibleInstances()
std::string controlname = getVisibilityControlName(name);
if (LLFloater::getControlGroup()->controlExists(controlname))
{
- BOOL isvis = LLFloater::getControlGroup()->getBOOL(controlname);
+ bool isvis = LLFloater::getControlGroup()->getBOOL(controlname);
if (isvis)
{
showInstance(name, LLSD()); // keyed floaters shouldn't set save_vis to true
@@ -332,7 +332,7 @@ void LLFloaterReg::hideVisibleInstances(const std::set<std::string>& exceptions)
for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
{
LLFloater* floater = *iter;
- floater->pushVisible(FALSE);
+ floater->pushVisible(false);
}
}
}
@@ -409,7 +409,7 @@ std::string LLFloaterReg::getBaseControlName(const std::string& name)
std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
{
std::string controlname = getVisibilityControlName(name);
- LLFloater::getControlGroup()->declareBOOL(controlname, FALSE,
+ LLFloater::getControlGroup()->declareBOOL(controlname, false,
llformat("Window Visibility for %s", name.c_str()),
LLControlVariable::PERSIST_NONDFT);
return controlname;
@@ -419,7 +419,7 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
std::string LLFloaterReg::declareDockStateControl(const std::string& name)
{
std::string controlname = getDockStateControlName(name);
- LLFloater::getControlGroup()->declareBOOL(controlname, TRUE,
+ LLFloater::getControlGroup()->declareBOOL(controlname, true,
llformat("Window Docking state for %s", name.c_str()),
LLControlVariable::PERSIST_NONDFT);
return controlname;
@@ -492,7 +492,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
{
if (host->isMinimized() || !host->isShown() || !host->isFrontmost())
{
- host->setMinimized(FALSE);
+ host->setMinimized(false);
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
}
@@ -500,7 +500,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
{
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
- instance->setFocus(TRUE);
+ instance->setFocus(true);
}
else
{
@@ -511,7 +511,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
{
if (instance->isMinimized())
{
- instance->setMinimized(FALSE);
+ instance->setMinimized(false);
instance->setVisibleAndFrontmost(true, key);
}
else if (!instance->isShown())
@@ -552,7 +552,7 @@ void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& ke
{
if (host->isMinimized() || !host->isShown() || !host->isFrontmost())
{
- host->setMinimized(FALSE);
+ host->setMinimized(false);
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
}
@@ -560,14 +560,14 @@ void LLFloaterReg::showInstanceOrBringToFront(const LLSD& sdname, const LLSD& ke
{
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
- instance->setFocus(TRUE);
+ instance->setFocus(true);
}
}
else
{
if (instance->isMinimized())
{
- instance->setMinimized(FALSE);
+ instance->setMinimized(false);
instance->setVisibleAndFrontmost(true, key);
}
else if (!instance->isShown())