Merge branch 'master' of git://github.com/Lirusaito/SingularityViewer into VoiceUpdate

This commit is contained in:
Lirusaito
2013-06-23 22:36:55 -04:00
16 changed files with 268 additions and 409 deletions

View File

@@ -773,12 +773,16 @@ BOOL LLPanel::childHasFocus(const std::string& id)
}
}
void LLPanel::childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void *userdata )
// *TODO: Deprecate; for backwards compatability only:
// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
// a named callback and reference it in XML.
void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
{
LLUICtrl* child = getChild<LLUICtrl>(id, true);
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
{
child->setCommitCallback(cb, userdata);
child->setCommitCallback(boost::bind(cb, child, data));
}
}