From bd897431e14aff091d5f45425816ddec4b2538c7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 12 Aug 2010 12:20:38 -0700 Subject: remaining hints defined --- indra/newview/llstatusbar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index a6bb4d4d5f..46d148c088 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -47,6 +47,7 @@ #include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" +#include "llhints.h" #include "llhudicon.h" #include "llnavigationbar.h" #include "llkeyboard.h" @@ -191,6 +192,8 @@ BOOL LLStatusBar::postBuild() mMediaToggle->setClickedCallback( &LLStatusBar::onClickMediaToggle, this ); mMediaToggle->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterNearbyMedia, this)); + LLHints::registerHintTarget("linden_balance", getChild("balance_bg")->getHandle()); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); // Adding Net Stat Graph -- cgit v1.2.3 From 2c999688c4c792630865bd97c2b45ff886d9a26c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 12 Aug 2010 15:18:25 -0700 Subject: added remaining hints and fade in/fade out behavior --- indra/newview/llstatusbar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 46d148c088..6a081a573e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -39,6 +39,7 @@ #include "llagentcamera.h" #include "llbutton.h" #include "llcommandhandler.h" +#include "llfirstuse.h" #include "llviewercontrol.h" #include "llfloaterbuycurrency.h" #include "llbuycurrencyhtml.h" @@ -341,6 +342,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("balance"); @@ -463,6 +469,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() -- cgit v1.2.3 From c20bd2dfee1068d5a23eef9a10d21c2035c0b324 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 15:00:51 -0700 Subject: cleaned up LLUICtrlFactory... removed redundant functionality moved buildPanel to LLPanel --- indra/newview/llstatusbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6a081a573e..8d61bb94e1 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -142,7 +142,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); - LLUICtrlFactory::getInstance()->buildPanel(this,"panel_status_bar.xml"); + buildPanel(this,"panel_status_bar.xml"); } LLStatusBar::~LLStatusBar() -- cgit v1.2.3 From 02d8197019dcecec7aee80a104c4644ddb4807ca Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 20 Aug 2010 10:14:28 -0700 Subject: changed buildPanel/buildFloater to member functions buildFromFile streamlined LLUICtrlFactory's interface --- indra/newview/llstatusbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8d61bb94e1..63e54fdeb2 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -142,7 +142,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); - buildPanel(this,"panel_status_bar.xml"); + buildFromFile("panel_status_bar.xml"); } LLStatusBar::~LLStatusBar() -- cgit v1.2.3 From 73ba940ffe00f361c370214e47af188082d83a7e Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 16 Sep 2010 22:10:20 +0300 Subject: A little refactoring. Removed unused code and xml data which were once used for date in status bar. --- indra/newview/llstatusbar.cpp | 74 ------------------------------------------- 1 file changed, 74 deletions(-) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b622e98971..2c15ff9aed 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -107,10 +107,6 @@ const S32 TEXT_HEIGHT = 18; static void onClickVolume(void*); -std::vector LLStatusBar::sDays; -std::vector LLStatusBar::sMonths; -const U32 LLStatusBar::MAX_DATE_STRING_LENGTH = 2000; - LLStatusBar::LLStatusBar(const LLRect& rect) : LLPanel(), mTextTime(NULL), @@ -127,10 +123,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) // status bar can possible overlay menus? setMouseOpaque(FALSE); - // size of day of the weeks and year - sDays.reserve(7); - sMonths.reserve(12); - mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); @@ -169,9 +161,6 @@ BOOL LLStatusBar::postBuild() { gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); - // build date necessary data (must do after panel built) - setupDate(); - mTextTime = getChild("TimeText" ); getChild("buyL")->setCommitCallback( @@ -517,69 +506,6 @@ void LLStatusBar::onClickMediaToggle(void* data) LLViewerMedia::setAllMediaEnabled(enable); } -// sets the static variables necessary for the date -void LLStatusBar::setupDate() -{ - // fill the day array with what's in the xui - std::string day_list = getString("StatBarDaysOfWeek"); - size_t length = day_list.size(); - - // quick input check - if(length < MAX_DATE_STRING_LENGTH) - { - // tokenize it and put it in the array - std::string cur_word; - for(size_t i = 0; i < length; ++i) - { - if(day_list[i] == ':') - { - sDays.push_back(cur_word); - cur_word.clear(); - } - else - { - cur_word.append(1, day_list[i]); - } - } - sDays.push_back(cur_word); - } - - // fill the day array with what's in the xui - std::string month_list = getString( "StatBarMonthsOfYear" ); - length = month_list.size(); - - // quick input check - if(length < MAX_DATE_STRING_LENGTH) - { - // tokenize it and put it in the array - std::string cur_word; - for(size_t i = 0; i < length; ++i) - { - if(month_list[i] == ':') - { - sMonths.push_back(cur_word); - cur_word.clear(); - } - else - { - cur_word.append(1, month_list[i]); - } - } - sMonths.push_back(cur_word); - } - - // make sure we have at least 7 days and 12 months - if(sDays.size() < 7) - { - sDays.resize(7); - } - - if(sMonths.size() < 12) - { - sMonths.resize(12); - } -} - // static void LLStatusBar::onClickStatGraph(void* data) { -- cgit v1.2.3 From d9547f5e8074f5997320815e8352c981022cb622 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Tue, 28 Sep 2010 13:20:13 -0400 Subject: STORM-265 -- remove invisible button on menu bar that was tied to the lag meter. --- indra/newview/llstatusbar.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2c15ff9aed..0cf2b74f9c 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -213,8 +213,6 @@ BOOL LLStatusBar::postBuild() mSGPacketLoss->mPerSec = FALSE; addChild(mSGPacketLoss); - getChild("stat_btn")->setClickedCallback(onClickStatGraph); - mPanelVolumePulldown = new LLPanelVolumePulldown(); addChild(mPanelVolumePulldown); mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); @@ -506,12 +504,6 @@ void LLStatusBar::onClickMediaToggle(void* data) LLViewerMedia::setAllMediaEnabled(enable); } -// static -void LLStatusBar::onClickStatGraph(void* data) -{ - LLFloaterReg::showInstance("lagmeter"); -} - BOOL can_afford_transaction(S32 cost) { return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost))); -- cgit v1.2.3