Use legacy function pointer for old legacy setTextEntryCallback signature.

This commit is contained in:
Shyotl
2013-04-16 10:49:56 -05:00
parent 4cbf8b16b6
commit 11358746da
2 changed files with 7 additions and 4 deletions

View File

@@ -193,7 +193,8 @@ BOOL LLPanelDisplay::postBuild()
} }
mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio"); mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio");
mCtrlAspectRatio->setTextEntryCallback(boost::bind(&LLPanelDisplay::onKeystrokeAspectRatio,this)); mCtrlAspectRatio->setTextEntryCallback(&LLPanelDisplay::onKeystrokeAspectRatio);
mCtrlAspectRatio->setCallbackUserData(this);
mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this)); mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this));
// add default aspect ratios // add default aspect ratios
mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP); mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP);
@@ -1030,9 +1031,11 @@ void LLPanelDisplay::onCommitAutoDetectAspect(const LLSD& value)
} }
} }
void LLPanelDisplay::onKeystrokeAspectRatio() void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data)
{ {
mCtrlAutoDetectAspect->set(FALSE); LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
panel->mCtrlAutoDetectAspect->set(FALSE);
} }
void LLPanelDisplay::onSelectAspectRatio() void LLPanelDisplay::onSelectAspectRatio()

View File

@@ -202,7 +202,7 @@ protected:
static void onChangeCustom(); static void onChangeCustom();
void onCommitAutoDetectAspect(const LLSD& value); void onCommitAutoDetectAspect(const LLSD& value);
void onKeystrokeAspectRatio(); static void onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data);
void onSelectAspectRatio(); void onSelectAspectRatio();
void onCommitWindowedMode(); void onCommitWindowedMode();
static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box); static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box);