diff options
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 0a00885843..75db269bde 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -162,8 +162,6 @@ BOOL LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL LLStatusBar::postBuild() { - LLControlVariablePtr mode_control = gSavedSettings.getControl("SessionSettingsFile"); - gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); mTextTime = getChild<LLTextBox>("TimeText" ); @@ -171,6 +169,8 @@ BOOL LLStatusBar::postBuild() getChild<LLUICtrl>("buyL")->setCommitCallback( boost::bind(&LLStatusBar::onClickBuyCurrency, this)); + getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL"))); + mBoxBalance = getChild<LLTextBox>("balance"); mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this ); @@ -235,40 +235,9 @@ BOOL LLStatusBar::postBuild() mScriptOut = getChildView("scriptout"); - LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo"); - mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile")); - mode_combo.setCommitCallback(boost::bind(&LLStatusBar::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2)); - - return TRUE; } -void LLStatusBar::onModeChange(const LLSD& original_value, const LLSD& new_value) -{ - if (original_value.asString() != new_value.asString()) - { - LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLStatusBar::onModeChangeConfirm, this, original_value, new_value, _1, _2)); - } -} - -void LLStatusBar::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - switch (option) - { - case 0: - gSavedSettings.getControl("SessionSettingsFile")->set(new_value); - LLAppViewer::instance()->requestQuit(); - break; - case 1: - // revert to original value - getChild<LLUICtrl>("mode_combo")->setValue(original_value); - break; - default: - break; - } -} - // Per-frame updates of visibility void LLStatusBar::refresh() { @@ -378,9 +347,10 @@ void LLStatusBar::setBalance(S32 balance) const S32 HPAD = 24; LLRect balance_rect = mBoxBalance->getTextBoundingRect(); LLRect buy_rect = getChildView("buyL")->getRect(); + LLRect shop_rect = getChildView("goShop")->getRect(); LLView* balance_bg_view = getChildView("balance_bg"); LLRect balance_bg_rect = balance_bg_view->getRect(); - balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD); + balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + shop_rect.getWidth() + balance_rect.getWidth() + HPAD); balance_bg_view->setShape(balance_bg_rect); } |