From ad4080854e037c8f89de2b807c287e09cac77194 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 3 May 2010 02:13:30 -0500 Subject: Clicking the money balance now does nothing on non-SL grids. So, it's totally inactive, not just the button hidden. TODO: Eventually it should actually check whether the grid supports buying currency. --- linden/indra/newview/llstatusbar.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index 6a9e0fc..bdc04d6 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp @@ -161,7 +161,6 @@ mSquareMetersCommitted(0) childSetAction("health", onClickHealth, this); childSetAction("no_fly", onClickFly, this); childSetAction("buyland", onClickBuyLand, this ); - childSetAction("buycurrency", onClickBuyCurrency, this ); childSetAction("no_build", onClickBuild, this ); childSetAction("no_scripts", onClickScripts, this ); childSetAction("restrictpush", onClickPush, this ); @@ -173,11 +172,23 @@ mSquareMetersCommitted(0) childSetVisible("search_editor", gSavedSettings.getBOOL("ShowSearchBar")); childSetVisible("search_btn", gSavedSettings.getBOOL("ShowSearchBar")); childSetVisible("menubar_search_bevel_bg", gSavedSettings.getBOOL("ShowSearchBar")); - // Hide the buy currency button in non-Second Life grids -- MC - childSetVisible("buycurrency", gHippoGridManager->getConnectedGrid()->isSecondLife()); childSetActionTextbox("ParcelNameText", onClickParcelInfo ); - childSetActionTextbox("BalanceText", onClickBalance ); + + // Disable buying currency when connected to non-SL grids. + // TODO: Check whether the grid supports buying currency. + if( gHippoGridManager->getConnectedGrid()->isSecondLife() ) + { + childSetEnabled("buycurrency", true); + childSetVisible("buycurrency", true); + childSetAction("buycurrency", onClickBuyCurrency, this ); + childSetActionTextbox("BalanceText", onClickBalance ); + } + else + { + childSetEnabled("buycurrency", false); + childSetVisible("buycurrency", false); + } // Adding Net Stat Graph S32 x = getRect().getWidth() - 2; -- cgit v1.1