Trying out new LLCachedControl implementation.

This commit is contained in:
Shyotl
2011-07-16 23:36:56 -05:00
parent 5ec3795716
commit 6ad9367c24
27 changed files with 893 additions and 785 deletions

View File

@@ -817,7 +817,7 @@ void LLMenuItemCallGL::setEnabledControl(std::string enabled_control, LLView *co
control = context->findControl(enabled_control);
llassert_always(control);
}
control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("enabled")));
control->getSignal()->connect(boost::bind(&LLView::controlListener, _2, getHandle(), std::string("enabled")));
setEnabled(control->getValue());
}
}
@@ -834,7 +834,7 @@ void LLMenuItemCallGL::setVisibleControl(std::string visible_control, LLView *co
control = context->findControl(visible_control);
llassert_always(control);
}
control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("visible")));
control->getSignal()->connect(boost::bind(&LLView::controlListener, _2, getHandle(), std::string("visible")));
setVisible(control->getValue());
}
}
@@ -990,7 +990,7 @@ void LLMenuItemCheckGL::setCheckedControl(std::string checked_control, LLView *c
control = context->findControl(checked_control);
llassert_always(control);
}
control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("value")));
control->getSignal()->connect(boost::bind(&LLView::controlListener, _2, getHandle(), std::string("value")));
mChecked = control->getValue();
}
}

View File

@@ -1344,7 +1344,7 @@ bool LLNotifications::loadTemplates()
if (!sound.empty())
{
// TODO: test for bad sound effect name / missing effect
pTemplate->mSoundEffect = LLUUID(LLUI::sConfigGroup->getString(sound.c_str()));
pTemplate->mSoundEffect = LLUUID(LLUI::sConfigGroup->findString(sound.c_str()));
}
for (LLXMLNodePtr child = item->getFirstChild();

View File

@@ -1579,7 +1579,7 @@ void LLUI::initClass(LLControlGroup* config,
LLFontGL::sShadowColor = colors->getColor("ColorDropShadow");
LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames");
LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged);
LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(boost::bind(&handleShowXUINamesChanged,_2));
}
void LLUI::cleanupClass()

View File

@@ -2820,7 +2820,7 @@ bool LLView::setControlValue(const LLSD& value)
std::string ctrlname = getControlName();
if (!ctrlname.empty())
{
LLUI::sConfigGroup->setValue(ctrlname, value);
LLUI::sConfigGroup->setUntypedValue(ctrlname, value);
return true;
}
return false;
@@ -2848,7 +2848,7 @@ void LLView::setControlName(const std::string& control_name, LLView *context)
if (control)
{
mControlName = control_name;
mControlConnection = control->getSignal()->connect(boost::bind(&controlListener, _1, getHandle(), std::string("value")));
mControlConnection = control->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("value")));
setValue(control->getValue());
}
}