summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rwxr-xr-xindra/llui/llfloater.cpp64
1 files changed, 28 insertions, 36 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 6e6bcd6ab5..8efd9ba3d0 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -133,7 +133,7 @@ bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b)
{
if (a.type() != b.type())
{
- //llerrs << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << llendl;
+ //LL_ERRS() << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << LL_ENDL;
return false;
}
else if (a.isUndefined())
@@ -587,7 +587,7 @@ LLControlGroup* LLFloater::getControlGroup()
void LLFloater::setVisible( BOOL visible )
{
- LLPanel::setVisible(visible); // calls handleVisibilityChange()
+ LLPanel::setVisible(visible); // calls onVisibilityChange()
if( visible && mFirstLook )
{
mFirstLook = FALSE;
@@ -630,24 +630,24 @@ void LLFloater::setIsSingleInstance(BOOL is_single_instance)
// virtual
-void LLFloater::handleVisibilityChange ( BOOL new_visibility )
+void LLFloater::onVisibilityChange ( BOOL new_visibility )
{
if (new_visibility)
{
if (getHost())
getHost()->setFloaterFlashing(this, FALSE);
}
- LLPanel::handleVisibilityChange ( new_visibility );
+ LLPanel::onVisibilityChange ( new_visibility );
}
void LLFloater::openFloater(const LLSD& key)
{
- llinfos << "Opening floater " << getName() << " full path: " << getPathname() << llendl;
+ LL_INFOS() << "Opening floater " << getName() << " full path: " << getPathname() << LL_ENDL;
LLViewerEventRecorder::instance().logVisibilityChange( getPathname(), getName(), true,"floater"); // Last param is event subtype or empty string
mKey = key; // in case we need to open ourselves again
-
+
if (getSoundFlags() != SILENT
// don't play open sound for hosted (tabbed) windows
&& !getHost()
@@ -698,7 +698,7 @@ void LLFloater::openFloater(const LLSD& key)
void LLFloater::closeFloater(bool app_quitting)
{
- llinfos << "Closing floater " << getName() << llendl;
+ LL_INFOS() << "Closing floater " << getName() << LL_ENDL;
LLViewerEventRecorder::instance().logVisibilityChange( getPathname(), getName(), false,"floater"); // Last param is event subtype or empty string
if (app_quitting)
{
@@ -796,7 +796,7 @@ void LLFloater::closeFloater(bool app_quitting)
}
else
{
- setVisible(FALSE); // hide before destroying (so handleVisibilityChange() gets called)
+ setVisible(FALSE); // hide before destroying (so onVisibilityChange() gets called)
if (!mReuseInstance)
{
destroy();
@@ -1095,7 +1095,7 @@ BOOL LLFloater::canSnapTo(const LLView* other_view)
{
if (NULL == other_view)
{
- llwarns << "other_view is NULL" << llendl;
+ LL_WARNS() << "other_view is NULL" << LL_ENDL;
return FALSE;
}
@@ -1150,11 +1150,11 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
{
setDocked( false, false);
}
- storeRectControl();
- mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
- LLRect screen_rect = calcScreenRect();
- mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
- }
+ storeRectControl();
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ LLRect screen_rect = calcScreenRect();
+ mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
+ }
// gather all snapped dependents
for(handle_set_iter_t dependent_it = mDependents.begin();
@@ -1549,7 +1549,7 @@ BOOL LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks)
// virtual
BOOL LLFloater::handleMouseUp(S32 x, S32 y, MASK mask)
{
- lldebugs << "LLFloater::handleMouseUp calling LLPanel (really LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << llendl;
+ LL_DEBUGS() << "LLFloater::handleMouseUp calling LLPanel (really LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL;
BOOL handled = LLPanel::handleMouseUp(x,y,mask); // Not implemented in LLPanel so this actually calls LLView
if (handled) {
LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-55,-55,getPathname());
@@ -2924,13 +2924,6 @@ void LLFloaterView::syncFloaterTabOrder()
}
}
}
-
- // sync draw order to tab order
- for ( child_list_const_reverse_iter_t child_it = getChildList()->rbegin(); child_it != getChildList()->rend(); ++child_it)
- {
- LLFloater* floaterp = (LLFloater*)*child_it;
- moveChildToFrontOfTabGroup(floaterp);
- }
}
LLFloater* LLFloaterView::getParentFloater(LLView* viewp) const
@@ -3133,8 +3126,8 @@ boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t::
return mCloseSignal.connect(cb);
}
-LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build");
-static LLFastTimer::DeclareTimer FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference");
+LLTrace::BlockTimerStatHandle POST_BUILD("Floater Post Build");
+static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference");
bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node)
{
@@ -3158,16 +3151,16 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
parser.readXUI(node, output_params, LLUICtrlFactory::getInstance()->getCurFileName());
setupParamsForExport(output_params, parent);
output_node->setName(node->getName()->mString);
- parser.writeXUI(output_node, output_params, &default_params);
+ parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &default_params);
return TRUE;
}
LLUICtrlFactory::instance().pushFileName(xml_filename);
- LLFastTimer _(FTM_EXTERNAL_FLOATER_LOAD);
+ LL_RECORD_BLOCK_TIME(FTM_EXTERNAL_FLOATER_LOAD);
if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml))
{
- llwarns << "Couldn't parse panel from: " << xml_filename << llendl;
+ LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL;
return FALSE;
}
@@ -3188,9 +3181,8 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
{
Params output_params(params);
setupParamsForExport(output_params, parent);
- Params default_params(LLUICtrlFactory::getDefaultParams<LLFloater>());
output_node->setName(node->getName()->mString);
- parser.writeXUI(output_node, output_params, &default_params);
+ parser.writeXUI(output_node, output_params, LLInitParam::default_parse_rules(), &default_params);
}
// Default floater position to top-left corner of screen
@@ -3242,14 +3234,14 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
BOOL result;
{
- LLFastTimer ft(POST_BUILD);
+ LL_RECORD_BLOCK_TIME(POST_BUILD);
result = postBuild();
}
if (!result)
{
- llerrs << "Failed to construct floater " << getName() << llendl;
+ LL_ERRS() << "Failed to construct floater " << getName() << LL_ENDL;
}
applyRectControl(); // If we have a saved rect control, apply it
@@ -3290,29 +3282,29 @@ bool LLFloater::isVisible(const LLFloater* floater)
return floater && floater->getVisible();
}
-static LLFastTimer::DeclareTimer FTM_BUILD_FLOATERS("Build Floaters");
+static LLTrace::BlockTimerStatHandle FTM_BUILD_FLOATERS("Build Floaters");
bool LLFloater::buildFromFile(const std::string& filename)
{
- LLFastTimer timer(FTM_BUILD_FLOATERS);
+ LL_RECORD_BLOCK_TIME(FTM_BUILD_FLOATERS);
LLXMLNodePtr root;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
{
- llwarns << "Couldn't find (or parse) floater from: " << filename << llendl;
+ LL_WARNS() << "Couldn't find (or parse) floater from: " << filename << LL_ENDL;
return false;
}
// root must be called floater
if( !(root->hasName("floater") || root->hasName("multi_floater")) )
{
- llwarns << "Root node should be named floater in: " << filename << llendl;
+ LL_WARNS() << "Root node should be named floater in: " << filename << LL_ENDL;
return false;
}
bool res = true;
- lldebugs << "Building floater " << filename << llendl;
+ LL_DEBUGS() << "Building floater " << filename << LL_ENDL;
LLUICtrlFactory::instance().pushFileName(filename);
{
if (!getFactoryMap().empty())