diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 58aeb617287195739308669860c883f3757efeb2..0170ac0c6acf086a0cd7f3e7f7a8e5c2bf227e9f 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -483,7 +483,6 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p) params.max_length_bytes(mMaxChars); params.commit_callback.function(boost::bind(&LLComboBox::onTextCommit, this, _2)); params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); - params.focus_lost_callback(NULL); params.handle_edit_keys_directly(true); params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index ab9b59e2526efda611c7e6fefe3df611c3048067..279cbaa923506c213b6a4322d513df68a756e048 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -41,11 +41,6 @@ const F32 FOCUS_FADE_TIME = 0.3f; // NOTE: the LLFocusableElement implementation has been moved here from lluictrl.cpp. LLFocusableElement::LLFocusableElement() -: mFocusLostCallback(NULL), - mFocusReceivedCallback(NULL), - mFocusChangedCallback(NULL), - mTopLostCallback(NULL), - mFocusCallbackUserData(NULL) { } @@ -68,35 +63,19 @@ LLFocusableElement::~LLFocusableElement() void LLFocusableElement::onFocusReceived() { - if( mFocusReceivedCallback ) - { - mFocusReceivedCallback( this, mFocusCallbackUserData ); - } - if( mFocusChangedCallback ) - { - mFocusChangedCallback( this, mFocusCallbackUserData ); - } + mFocusReceivedCallback(this); + mFocusChangedCallback(this); } void LLFocusableElement::onFocusLost() { - if( mFocusLostCallback ) - { - mFocusLostCallback( this, mFocusCallbackUserData ); - } - - if( mFocusChangedCallback ) - { - mFocusChangedCallback( this, mFocusCallbackUserData ); - } + mFocusLostCallback(this); + mFocusChangedCallback(this); } void LLFocusableElement::onTopLost() { - if (mTopLostCallback) - { - mTopLostCallback(this, mFocusCallbackUserData); - } + mTopLostCallback(this); } BOOL LLFocusableElement::hasFocus() const @@ -188,12 +167,9 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL view_handle_list_t new_focus_list; // walk up the tree to root and add all views to the new_focus_list - for (LLView* ctrl = dynamic_cast<LLView*>(mKeyboardFocus); ctrl && ctrl != LLUI::getRootView(); ctrl = ctrl->getParent()) + for (LLView* ctrl = dynamic_cast<LLView*>(mKeyboardFocus); ctrl; ctrl = ctrl->getParent()) { - if (ctrl) - { - new_focus_list.push_back(ctrl->getHandle()); - } + new_focus_list.push_back(ctrl->getHandle()); } // remove all common ancestors since their focus is unchanged @@ -216,10 +192,6 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL { mCachedKeyboardFocusList.pop_front(); old_focus_view->onFocusLost(); - - // part of fix of EXT-996 - // this need to handle event when user click inside in-world area - mFocusChangeSignal(); } } diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 2c2dae216a90b5b0961919fa2c753752d2120e09..2fa4e124fb8c8fedba410114a22f03dbf04faa07 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -54,11 +54,12 @@ public: virtual void setFocus( BOOL b ); virtual BOOL hasFocus() const; - typedef boost::function<void(LLFocusableElement*, void*)> focus_callback_t; - void setFocusLostCallback(focus_callback_t cb, void* user_data = NULL) { mFocusLostCallback = cb; mFocusCallbackUserData = user_data; } - void setFocusReceivedCallback(focus_callback_t cb, void* user_data = NULL) { mFocusReceivedCallback = cb; mFocusCallbackUserData = user_data; } - void setFocusChangedCallback(focus_callback_t cb, void* user_data = NULL ) { mFocusChangedCallback = cb; mFocusCallbackUserData = user_data; } - void setTopLostCallback(focus_callback_t cb, void* user_data = NULL ) { mTopLostCallback = cb; mFocusCallbackUserData = user_data; } + typedef boost::signals2::signal<void(LLFocusableElement*)> focus_signal_t; + + boost::signals2::connection setFocusLostCallback( const focus_signal_t::slot_type& cb) { return mFocusLostCallback.connect(cb);} + boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb) { return mFocusReceivedCallback.connect(cb);} + boost::signals2::connection setFocusChangedCallback(const focus_signal_t::slot_type& cb) { return mFocusChangedCallback.connect(cb);} + void setTopLostCallback(const focus_signal_t::slot_type& cb) { mTopLostCallback.connect(cb);} // These were brought up the hierarchy from LLView so that we don't have to use dynamic_cast when dealing with keyboard focus. virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); @@ -68,11 +69,10 @@ protected: virtual void onFocusReceived(); virtual void onFocusLost(); virtual void onTopLost(); // called when registered as top ctrl and user clicks elsewhere - focus_callback_t mFocusLostCallback; - focus_callback_t mFocusReceivedCallback; - focus_callback_t mFocusChangedCallback; - focus_callback_t mTopLostCallback; - void* mFocusCallbackUserData; + focus_signal_t mFocusLostCallback; + focus_signal_t mFocusReceivedCallback; + focus_signal_t mFocusChangedCallback; + focus_signal_t mTopLostCallback; }; @@ -124,11 +124,6 @@ public: void unlockFocus(); BOOL focusLocked() const { return mLockedView != NULL; } - void addFocusChangeCallback(const boost::signals2::signal<void ()>::slot_type& cb) - { - mFocusChangeSignal.connect(cb); - } - private: LLUICtrl* mLockedView; @@ -155,8 +150,6 @@ private: typedef std::map<LLHandle<LLView>, LLHandle<LLView> > focus_history_map_t; focus_history_map_t mFocusHistory; - boost::signals2::signal<void()> mFocusChangeSignal; - #ifdef _DEBUG std::string mMouseCaptorName; std::string mKeyboardFocusName; diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index 01a3b5fdc795263aa118b33b35ea8cadcff8024b..0fbb7ced54fa5ab2cb565358176d720ca061c0b3 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -140,7 +140,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const LLMultiSliderCtrl::Params& p) params.prevalidate_callback(&LLLineEditor::prevalidateFloat); params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); mEditor = LLUICtrlFactory::create<LLLineEditor> (params); - mEditor->setFocusReceivedCallback( &LLMultiSliderCtrl::onEditorGainFocus ); + mEditor->setFocusReceivedCallback( boost::bind(LLMultiSliderCtrl::onEditorGainFocus, _1, this) ); // don't do this, as selecting the entire text is single clicking in some cases // and double clicking in others //mEditor->setSelectAllonFocusReceived(TRUE); diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h index 7e72331a3faa1b5c4ffa27c17e23850fe015566f..7e88b16561cd4594cdca01a999b70d6c3cfbb981 100644 --- a/indra/llui/llscrollbar.h +++ b/indra/llui/llscrollbar.h @@ -130,12 +130,6 @@ public: void onLineUpBtnPressed(const LLSD& data); void onLineDownBtnPressed(const LLSD& data); - void setBGColor(const LLUIColor& color) { mBGColor = color; } - const LLUIColor& getBGColor() const { return mBGColor; } - - void setBGVisible() { mBGVisible = true; } - bool getBGVisible() const { return mBGVisible; } - private: void updateThumbRect(); void changeLine(S32 delta, BOOL update_thumb ); diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index 15584c8dc7d62725d27adfa0d199463e9cde762e..fb71b607258f1279e23f4d5ec79b6ad86e82a581 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -143,7 +143,7 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p) line_p.prevalidate_callback(&LLLineEditor::prevalidateFloat); mEditor = LLUICtrlFactory::create<LLLineEditor>(line_p); - mEditor->setFocusReceivedCallback( &LLSliderCtrl::onEditorGainFocus, this ); + mEditor->setFocusReceivedCallback( boost::bind(&LLSliderCtrl::onEditorGainFocus, _1, this )); // don't do this, as selecting the entire text is single clicking in some cases // and double clicking in others //mEditor->setSelectAllonFocusReceived(TRUE); diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 3a96bc8f937df2e758e1e950f516a5d2879c32fa..83d71006aacaf6e0c9903677193b907b4d4c6964 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -142,7 +142,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) params.prevalidate_callback(&LLLineEditor::prevalidateFloat); params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); mEditor = LLUICtrlFactory::create<LLLineEditor> (params); - mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this ); + mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this )); //RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus // than when it doesn't. Instead, if you always have to double click to select all the text, // it's easier to understand diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 8807e26f6b3cb7eca84c5850c838ea30de58d228..2cd9c8844efbaa6253b6d0b689fc183d23343100 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -114,7 +114,6 @@ void LLUICtrl::initFromParams(const Params& p) } setTabStop(p.tab_stop); - setFocusLostCallback(p.focus_lost_callback()); if (p.initial_value.isProvided() && !p.control_name.isProvided()) @@ -800,14 +799,7 @@ namespace LLInitParam return false; } - template<> - bool ParamCompare<LLUICtrl::focus_callback_t>::equals( - const LLUICtrl::focus_callback_t &a, - const LLUICtrl::focus_callback_t &b) - { - return false; - } - + template<> bool ParamCompare<LLUICtrl::enable_callback_t>::equals( const LLUICtrl::enable_callback_t &a, diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 3add9393ea605059f6ec032fdd767ab8c5da98d2..0ca3acfa1c866faf51687fa826fc793b1075eefe 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -124,8 +124,6 @@ public: Optional<CommitCallbackParam> mouseenter_callback; Optional<CommitCallbackParam> mouseleave_callback; - Optional<focus_callback_t> focus_lost_callback; - Optional<std::string> control_name; Optional<EnableControls> enabled_controls; Optional<ControlVisibility> controls_visibility; @@ -309,11 +307,6 @@ namespace LLInitParam const LLUICtrl::enable_callback_t &a, const LLUICtrl::enable_callback_t &b); - template<> - bool ParamCompare<LLUICtrl::focus_callback_t>::equals( - const LLUICtrl::focus_callback_t &a, - const LLUICtrl::focus_callback_t &b); - template<> bool ParamCompare<LLLazyValue<LLColor4> >::equals( const LLLazyValue<LLColor4> &a, const LLLazyValue<LLColor4> &b); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 256c7762934e6b826b6b11e678634a8a9860e03b..10cb3fb37702dd50ccc3da40f0b97ecfd65d47b3 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -466,16 +466,6 @@ LLRect LLView::getRequiredRect() return mRect; } -//virtual -void LLView::onFocusLost() -{ -} - -//virtual -void LLView::onFocusReceived() -{ -} - BOOL LLView::focusNextRoot() { LLView::child_list_t result = LLView::getFocusRootsQuery().run(this); diff --git a/indra/llui/llview.h b/indra/llui/llview.h index bf3b5d0614e02f9171e9b84c83016209b8018656..7a37d6f4303cf23fe31ae1524bf2a1bc0dba0c9b 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -405,10 +405,6 @@ public: BOOL getSaveToXML() const { return mSaveToXML; } void setSaveToXML(BOOL b) { mSaveToXML = b; } - // inherited from LLFocusableElement - /* virtual */ void onFocusLost(); - /* virtual */ void onFocusReceived(); - typedef enum e_hit_test_type { HIT_TEST_USE_BOUNDING_RECT, diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 96c707b08f25bb808b774a39a414842729989410..4523267eddbaa6342b2af0365850f0d82d2f1b91 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -125,8 +125,8 @@ BOOL LLChatBar::postBuild() mInputEditor = getChild<LLLineEditor>("Chat Editor"); mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke, this); - mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this); - mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this ); + mInputEditor->setFocusLostCallback(boost::bind(&LLChatBar::onInputEditorFocusLost)); + mInputEditor->setFocusReceivedCallback(boost::bind(&LLChatBar::onInputEditorGainFocus)); mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setIgnoreTab(TRUE); @@ -538,14 +538,14 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) } // static -void LLChatBar::onInputEditorFocusLost( LLFocusableElement* caller, void* userdata) +void LLChatBar::onInputEditorFocusLost() { // stop typing animation gAgent.stopTyping(); } // static -void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userdata ) +void LLChatBar::onInputEditorGainFocus() { LLFloaterChat::setHistoryCursorAndScrollToEnd(); } diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h index a41947218de08d96e18e67176e892618257c3f83..86aa3ebd2a957cdff66dacd44f6499dc7a43411e 100644 --- a/indra/newview/llchatbar.h +++ b/indra/newview/llchatbar.h @@ -87,8 +87,8 @@ public: static void onTabClick( void* userdata ); static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); - static void onInputEditorFocusLost(LLFocusableElement* caller,void* userdata); - static void onInputEditorGainFocus(LLFocusableElement* caller,void* userdata); + static void onInputEditorFocusLost(); + static void onInputEditorGainFocus(); void onCommitGesture(LLUICtrl* ctrl); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index e5f5e8eedb0a37b987214fe544f709ef326c5bf6..3fe7d8d9da2a5ef2d9118b733a82fd7e0f960f24 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1043,7 +1043,7 @@ BOOL LLPanelLandObjects::postBuild() mSelectedObjects = getChild<LLTextBox>("selected_objects_text"); mCleanOtherObjectsTime = getChild<LLLineEditor>("clean other time"); - mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus, this); + mCleanOtherObjectsTime->setFocusLostCallback(boost::bind(onLostFocus, _1, this)); mCleanOtherObjectsTime->setCommitCallback(onCommitClean, this); childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32); diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index fbc0ff3cf57b827bcac34568c8c6eb9cfef194a7..938370b732ada65e55d6739432357141f3b59136 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -106,7 +106,7 @@ BOOL LLFloaterPostcard::postBuild() childSetValue("name_form", LLSD(name_string)); // For the first time a user focusess to .the msg box, all text will be selected. - getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(onMsgFormFocusRecieved, this); + getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(onMsgFormFocusRecieved, _1, this)); childSetFocus("to_form", TRUE); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 2a29566120aa55467d4df999a03c374088b8b49a..d149c8bbb5549c8df645f00f2e56cf7de57e36dd 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1318,7 +1318,7 @@ void LLFolderView::startRenamingSelectedItem( void ) mRenamer->setVisible( TRUE ); // set focus will fail unless item is visible mRenamer->setFocus( TRUE ); - mRenamer->setTopLostCallback(onRenamerLost); + mRenamer->setTopLostCallback(boost::bind(onRenamerLost, _1)); gFocusMgr.setTopCtrl( mRenamer ); } } @@ -2147,7 +2147,7 @@ void LLFolderView::updateRenamerPosition() ///---------------------------------------------------------------------------- //static -void LLFolderView::onRenamerLost( LLFocusableElement* renamer, void* user_data) +void LLFolderView::onRenamerLost( LLFocusableElement* renamer) { LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(renamer); if (uictrl) diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index a05dec3193e52839884f9902da2efb89825be1f9..69c0c5b13231078982ae07c04d9654fc1b389922 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -279,7 +279,7 @@ protected: LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container. void commitRename( const LLSD& data ); - static void onRenamerLost( LLFocusableElement* renamer, void* user_data); + static void onRenamerLost( LLFocusableElement* renamer); void finishRenamingItem( void ); void closeRenamer( void ); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 29102feb64dcdcb90c50b690b0b92c9ed82ebe45..254e16e1fb95210e69661cfa094f4dca0fb6b763 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -78,7 +78,7 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) } // LLUICtrlFactory::getInstance()->buildFloater(this, "floater_im_session.xml"); - gFocusMgr.addFocusChangeCallback(boost::bind(&LLIMFloater::focusChangeCallback, this)); + LLUI::getRootView()->setFocusLostCallback(boost::bind(&LLIMFloater::focusChangeCallback, this)); mCloseSignal.connect(boost::bind(&LLIMFloater::onClose, this)); } @@ -177,8 +177,8 @@ BOOL LLIMFloater::postBuild() // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); - mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived, this ); - mInputEditor->setFocusLostCallback( onInputEditorFocusLost, this ); + mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); + mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) ); mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this ); mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setRevertOnEsc( FALSE ); @@ -221,7 +221,7 @@ void* LLIMFloater::createPanelGroupControl(void* userdata) void LLIMFloater::focusChangeCallback() { // hide docked floater if user clicked inside in-world area - if (isDocked() && gFocusMgr.getKeyboardFocus() == NULL) + if (isDocked()) { setVisible(false); } diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index de4faf72f504200f58ab4cc4f6b3f5a4a63e0190..aa2beabf3d44ad7006986f2bd983e88b55d5b9e6 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1086,10 +1086,7 @@ LLFloaterIMPanel::~LLFloaterIMPanel() mVoiceChannel = NULL; //delete focus lost callback - if(mInputEditor) - { - mInputEditor->setFocusLostCallback( NULL ); - } + mFocusCallbackConnection.disconnect(); } BOOL LLFloaterIMPanel::postBuild() @@ -1099,8 +1096,8 @@ BOOL LLFloaterIMPanel::postBuild() mVisibleSignal.connect(boost::bind(&LLFloaterIMPanel::onVisibilityChange, this, _2)); mInputEditor = getChild<LLLineEditor>("chat_editor"); - mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived, this ); - mInputEditor->setFocusLostCallback( onInputEditorFocusLost, this ); + mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); + mFocusCallbackConnection = mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this)); mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this ); mInputEditor->setCommitCallback( onCommitChat, this ); mInputEditor->setCommitOnFocusLost( FALSE ); diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index dbf5e1cb6aba1f0657f592e13da0de046ee156d6..fd1134ee5e69e6ef21cf78e131e9e15e25c9f994 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -357,6 +357,8 @@ private: // Timer to detect when user has stopped typing. LLFrameTimer mLastKeystrokeTimer; + boost::signals2::connection mFocusCallbackConnection; + void disableWhileSessionStarting(); }; diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 9d14a3fbdcb9ea3527053e0ef82ea912fc6588b1..a6c2435e1e06be5586ded6596f53bd25bfc5a7b5 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -190,7 +190,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.max_length_bytes(p.max_chars); params.commit_callback.function(boost::bind(&LLComboBox::onTextCommit, this, _2)); params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); - params.focus_lost_callback(NULL); params.handle_edit_keys_directly(true); params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index cec4b9f7c7493fa6499cd7463977805e2eca0dee..1d8789fde0afc366743b485c847ff6d856690b6e 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -190,7 +190,7 @@ BOOL LLNearbyChatBar::postBuild() mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); - mChatBox->setFocusLostCallback(&onChatBoxFocusLost, this); + mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); mChatBox->setIgnoreArrowKeys(TRUE); mChatBox->setCommitOnFocusLost( FALSE ); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index ee5d2652203712d7e9a0e253b956a77d68bce9a2..7eaee92778e003ccfec0b734066cf8b52b6a7e73 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -238,13 +238,13 @@ BOOL LLPanelClassified::postBuild() mNameEditor = getChild<LLLineEditor>("given_name_editor"); mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN); mNameEditor->setCommitOnFocusLost(TRUE); - mNameEditor->setFocusReceivedCallback(focusReceived, this); + mNameEditor->setFocusReceivedCallback(boost::bind(focusReceived, _1, this)); mNameEditor->setCommitCallback(onCommitAny, this); mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII ); mDescEditor = getChild<LLTextEditor>("desc_editor"); mDescEditor->setCommitOnFocusLost(TRUE); - mDescEditor->setFocusReceivedCallback(focusReceived, this); + mDescEditor->setFocusReceivedCallback(boost::bind(focusReceived, _1, this)); mDescEditor->setCommitCallback(onCommitAny, this); mLocationEditor = getChild<LLLineEditor>("location_editor"); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index d63fd141b0bc7d81cabb49a2121510c529c59c81..5eb7b8f5f5d5d9820150b3618f4e03f07932f3d7 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -99,8 +99,8 @@ BOOL LLPanelGroupGeneral::postBuild() if(mEditCharter) { mEditCharter->setCommitCallback(onCommitAny, this); - mEditCharter->setFocusReceivedCallback(onFocusEdit, this); - mEditCharter->setFocusChangedCallback(onFocusEdit, this); + mEditCharter->setFocusReceivedCallback(boost::bind(onFocusEdit, _1, this)); + mEditCharter->setFocusChangedCallback(boost::bind(onFocusEdit, _1, this)); } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 378a09e31544c95af6c401cdd3c7e42350fcefec..99bb760b619003feec60a699e8b31ff68103b4c0 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1730,7 +1730,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mRoleDescription->setCommitOnFocusLost(TRUE); mRoleDescription->setCommitCallback(onDescriptionCommit, this); - mRoleDescription->setFocusReceivedCallback(onDescriptionFocus, this); + mRoleDescription->setFocusReceivedCallback(boost::bind(onDescriptionFocus, _1, this)); setFooterEnabled(FALSE); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 150fd399c638890d4bfff1ed05d0863e1597497f..809e1852f4499511421e643331f406d120620e86 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -229,7 +229,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); server_choice_combo->setCommitCallback(onSelectServer, NULL); - server_choice_combo->setFocusLostCallback(onServerComboLostFocus); + server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1)); childSetAction("connect_btn", onClickConnect, this); @@ -973,7 +973,7 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*) loadLoginPage(); } -void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) +void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe) { if (!sInstance) return; diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index ffcf6a9b70c390c17f70ed27fee934c4d6f26c45..5692b8d345a392365c75deea1dc1e3364799c4a2 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -94,7 +94,7 @@ private: static void onClickForgotPassword(void*); static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); - static void onServerComboLostFocus(LLFocusableElement*, void*); + static void onServerComboLostFocus(LLFocusableElement*); private: LLPointer<LLUIImage> mLogoImage;