summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index b622e98971..5f7e092afe 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -33,6 +33,7 @@
#include "llagentcamera.h"
#include "llbutton.h"
#include "llcommandhandler.h"
+#include "llfirstuse.h"
#include "llviewercontrol.h"
#include "llfloaterbuycurrency.h"
#include "llbuycurrencyhtml.h"
@@ -41,6 +42,7 @@
#include "llpanelvolumepulldown.h"
#include "llfloaterregioninfo.h"
#include "llfloaterscriptdebug.h"
+#include "llhints.h"
#include "llhudicon.h"
#include "llnavigationbar.h"
#include "llkeyboard.h"
@@ -134,7 +136,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mBalanceTimer = new LLFrameTimer();
mHealthTimer = new LLFrameTimer();
- LLUICtrlFactory::getInstance()->buildPanel(this,"panel_status_bar.xml");
+ buildFromFile("panel_status_bar.xml");
}
LLStatusBar::~LLStatusBar()
@@ -185,6 +187,8 @@ BOOL LLStatusBar::postBuild()
mMediaToggle->setClickedCallback( &LLStatusBar::onClickMediaToggle, this );
mMediaToggle->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterNearbyMedia, this));
+ LLHints::registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle());
+
gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));
// Adding Net Stat Graph
@@ -332,6 +336,11 @@ void LLStatusBar::creditBalance(S32 credit)
void LLStatusBar::setBalance(S32 balance)
{
+ if (balance > getBalance() && getBalance() != 0)
+ {
+ LLFirstUse::receiveLindens();
+ }
+
std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance );
LLTextBox* balance_box = getChild<LLTextBox>("balance");
@@ -454,6 +463,7 @@ void LLStatusBar::onClickBuyCurrency()
// open a currency floater - actual one open depends on
// value specified in settings.xml
LLBuyCurrencyHTML::openCurrencyFloater();
+ LLFirstUse::receiveLindens(false);
}
void LLStatusBar::onMouseEnterVolume()