diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-19 20:12:39 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-19 20:12:39 +0200 |
commit | 26c44e755f5fbc911b8f0431c81668bb37236a78 (patch) | |
tree | 8c963f062a251d8495a09b1aecdcfe0cafe70dd2 /indra | |
parent | 785bf264bf035df18b35973a0d5517bbff9c3291 (diff) |
Minor cleanup.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterlagmeter.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloaterlagmeter.h | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index 8aa7d6d849..85186cee6b 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -64,7 +64,7 @@ BOOL LLFloaterLagMeter::postBuild() setIsChrome(TRUE); // were we shrunk last time? - if (gSavedSettings.getBOOL("LagMeterShrunk")) + if (isShrunk()) { onClickShrink(); } @@ -122,7 +122,7 @@ BOOL LLFloaterLagMeter::postBuild() mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps"); // childSetAction("minimize", onClickShrink, this); - updateControls(gSavedSettings.getBOOL("LagMeterShrunk")); // If expanded append colon to the labels (EXT-4079) + updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079) return TRUE; } @@ -131,7 +131,7 @@ LLFloaterLagMeter::~LLFloaterLagMeter() // save shrunk status for next time // gSavedSettings.setBOOL("LagMeterShrunk", mShrunk); // expand so we save the large window rectangle - if (gSavedSettings.getBOOL("LagMeterShrunk")) + if (isShrunk()) { onClickShrink(); } @@ -369,9 +369,14 @@ void LLFloaterLagMeter::updateControls(bool shrink) // self->mShrunk = !self->mShrunk; } +BOOL LLFloaterLagMeter::isShrunk() +{ + return gSavedSettings.getBOOL("LagMeterShrunk"); +} + void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk" { - bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk"); + bool shrunk = isShrunk(); updateControls(!shrunk); gSavedSettings.setBOOL("LagMeterShrunk", !shrunk); } diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h index c55bee4221..5416bca790 100644 --- a/indra/newview/llfloaterlagmeter.h +++ b/indra/newview/llfloaterlagmeter.h @@ -52,6 +52,7 @@ private: void determineNetwork(); void determineServer(); void updateControls(bool shrink); + BOOL isShrunk(); void onClickShrink(); |