Updated LLFocusMgr to use boost::signals2 instead of vanilla function pointers. Also removed top-focus handling from lluictrl because it doesn't belong there.

This commit is contained in:
Shyotl
2012-02-18 01:58:02 -06:00
parent ae7b12f230
commit 1810a7c7f9
38 changed files with 298 additions and 316 deletions

View File

@@ -127,8 +127,8 @@ BOOL LLPanelGroupGeneral::postBuild()
if(mEditCharter)
{
mEditCharter->setCommitCallback(onCommitAny);
mEditCharter->setFocusReceivedCallback(onFocusEdit, this);
mEditCharter->setFocusChangedCallback(onFocusEdit, this);
mEditCharter->setFocusReceivedCallback(boost::bind(&LLPanelGroupGeneral::onFocusEdit, this));
mEditCharter->setFocusChangedCallback(boost::bind(&LLPanelGroupGeneral::onFocusEdit, this));
mEditCharter->setCallbackUserData(this);
}
@@ -279,15 +279,12 @@ BOOL LLPanelGroupGeneral::postBuild()
return LLPanelGroupTab::postBuild();
}
// static
void LLPanelGroupGeneral::onFocusEdit(LLFocusableElement* ctrl, void* data)
void LLPanelGroupGeneral::onFocusEdit()
{
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
self->updateChanged();
self->notifyObservers();
updateChanged();
notifyObservers();
}
// static
void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data)
{
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;