From 11358746dacb61f613dbeced9228127a49d07e4b Mon Sep 17 00:00:00 2001 From: Shyotl Date: Tue, 16 Apr 2013 10:49:56 -0500 Subject: [PATCH] Use legacy function pointer for old legacy setTextEntryCallback signature. --- indra/newview/llpaneldisplay.cpp | 9 ++++++--- indra/newview/llpaneldisplay.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 375781a95..d354dc516 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -193,7 +193,8 @@ BOOL LLPanelDisplay::postBuild() } mCtrlAspectRatio = getChild( "aspect_ratio"); - mCtrlAspectRatio->setTextEntryCallback(boost::bind(&LLPanelDisplay::onKeystrokeAspectRatio,this)); + mCtrlAspectRatio->setTextEntryCallback(&LLPanelDisplay::onKeystrokeAspectRatio); + mCtrlAspectRatio->setCallbackUserData(this); mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this)); // add default aspect ratios 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() diff --git a/indra/newview/llpaneldisplay.h b/indra/newview/llpaneldisplay.h index 9b39ee555..07b6b6dbe 100644 --- a/indra/newview/llpaneldisplay.h +++ b/indra/newview/llpaneldisplay.h @@ -202,7 +202,7 @@ protected: static void onChangeCustom(); void onCommitAutoDetectAspect(const LLSD& value); - void onKeystrokeAspectRatio(); + static void onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data); void onSelectAspectRatio(); void onCommitWindowedMode(); static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box);