summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterlagmeter.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloaterlagmeter.cpp
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloaterlagmeter.cpp')
-rw-r--r--indra/newview/llfloaterlagmeter.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 91471ca2d0..a97b270c44 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -51,7 +51,7 @@ const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
- : LLFloater(std::string("floater_lagmeter"))
+ : LLFloater()
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
@@ -59,6 +59,15 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
// lose arrow-key driving when testing lag.
setIsChrome(TRUE);
+ // were we shrunk last time?
+ if (gSavedSettings.getBOOL("LagMeterShrunk"))
+ {
+ onClickShrink(this);
+ }
+}
+
+BOOL LLFloaterLagMeter::postBuild()
+{
mClientButton = getChild<LLButton>("client_lagmeter");
mClientText = getChild<LLTextBox>("client_text");
mClientCause = getChild<LLTextBox>("client_lag_cause");
@@ -113,13 +122,8 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
childSetAction("minimize", onClickShrink, this);
- // were we shrunk last time?
- if (gSavedSettings.getBOOL("LagMeterShrunk"))
- {
- onClickShrink(this);
- }
+ return TRUE;
}
-
LLFloaterLagMeter::~LLFloaterLagMeter()
{
// save shrunk status for next time
@@ -180,7 +184,7 @@ void LLFloaterLagMeter::determineClient()
{
mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) );
}
- else if((LLViewerImage::sBoundTextureMemory >> 20) > LLViewerImage::sMaxBoundTextureMem)
+ else if((BYTES_TO_MEGA_BYTES(LLViewerImage::sBoundTextureMemoryInBytes)) > LLViewerImage::sMaxBoundTextureMemInMegaBytes)
{
mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) );
}