EXP-1202 : pull from richard/viewer-experience-fui

meow-7.2.2
Merov Linden 2011-10-03 17:29:00 -07:00
commit daae211fe3
2 changed files with 26 additions and 11 deletions

View File

@ -511,10 +511,13 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
LLCommand* commandp = LLCommandManager::instance().getCommand(id);
if (!commandp) return NULL;
std::string label = LLTrans::getString(commandp->labelRef());
std::string tooltip = label + "\n" + LLTrans::getString(commandp->tooltipRef());
LLToolBarButton::Params button_p;
button_p.name = id.name();
button_p.label = LLTrans::getString(commandp->labelRef());
button_p.tool_tip = button_p.label();
button_p.label = label;
button_p.tool_tip = tooltip;
button_p.image_overlay = LLUI::getUIImage(commandp->icon());
button_p.overwriteFrom(mButtonParams[mButtonType]);
LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);

View File

@ -564,10 +564,6 @@ namespace LLInitParam
public:
typedef const T& value_assignment_t;
S32 mKeyVersion;
mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
ParamValue()
: T(),
mKeyVersion(0),
@ -607,6 +603,12 @@ namespace LLInitParam
{
return *this;
}
S32 mKeyVersion;
protected:
mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
};
template<typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> >
@ -1679,8 +1681,6 @@ namespace LLInitParam
S32 mLastParseGeneration;
};
template<typename DERIVED_BLOCK,
typename BASE_BLOCK,
typename NAME_VALUE_LOOKUP>
@ -1690,21 +1690,28 @@ namespace LLInitParam
: public Param,
protected BatchBlock<DERIVED_BLOCK, BASE_BLOCK>
{
typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> block_t;
typedef const BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& value_assignment_t;
ParamValue()
: BatchBlock<DERIVED_BLOCK, BASE_BLOCK>()
: block_t(),
mKeyVersion(0),
mValidatedVersion(-1),
mValidated(false)
{}
ParamValue(value_assignment_t other)
: BatchBlock<DERIVED_BLOCK, BASE_BLOCK>(other)
: block_t(other),
mKeyVersion(0),
mValidatedVersion(-1),
mValidated(false)
{
}
void setValue(value_assignment_t val)
{
*this = val;
BatchBlock<DERIVED_BLOCK, BASE_BLOCK>::mLastParseGeneration = -1;
block_t::mLastParseGeneration = -1;
}
value_assignment_t getValue() const
@ -1727,6 +1734,11 @@ namespace LLInitParam
return *this;
}
S32 mKeyVersion;
protected:
mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
};
template<typename T>