Fixed currency not shown on access tab on about land floater

Ansariel 2012-05-31 22:10:10 +02:00
parent 367117e8ee
commit 6e06d3e693
3 changed files with 20 additions and 1 deletions

View File

@ -418,6 +418,23 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label)
updateLabelColor();
}
// <FS:Ansariel> Allow setting an argument on the label
BOOL LLSpinCtrl::setLabelArg(const std::string& key, const LLStringExplicit& text)
{
if (mLabelBox)
{
mLabelBox->setTextArg(key, text);
}
else
{
llwarns << "Attempting to set label argument on LLSpinCtrl constructed without one " << getName() << llendl;
}
updateLabelColor();
return TRUE;
}
// </FS:Ansariel> Allow setting an argument on the label
void LLSpinCtrl::setAllowEdit(BOOL allow_edit)
{
mEditor->setEnabled(allow_edit);

View File

@ -79,6 +79,8 @@ public:
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; updateLabelColor(); }
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; updateLabelColor();}
void setAllowEdit(BOOL allow_edit);
// <FS:Ansariel> Allow setting an argument on the label
virtual BOOL setLabelArg(const std::string& key, const LLStringExplicit& text);
virtual void onTabInto();

View File

@ -2444,7 +2444,7 @@ BOOL LLPanelLandAccess::postBuild()
}
std::string type_currency = LLGridManager::getInstance()->getCurrency();
getChild<LLSpinCtrl>("PriceSpin")->setLabelArg(std::string("[CUR]"), type_currency);
getChild<LLSpinCtrl>("PriceSpin")->setLabelArg("[CUR]", type_currency);
return TRUE;
}