diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-05 16:10:45 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-05 16:10:45 +0100 |
commit | c5d3d29ef4471813661e777651859c6216a227f2 (patch) | |
tree | ba5b87cbd00a7c49ed7ccdffbd8525415124ab96 /indra | |
parent | 1ff353452174c37c600d7de650348ab30f91b86c (diff) | |
parent | c267f4148aa13cea96412ae19863db607abc29e4 (diff) |
merge from PE's viewer-release
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 10 |
2 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 53a11eff04..b8590d838e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -231,7 +231,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.rect(text_entry_rect); params.default_text(LLStringUtil::null); params.max_length_bytes(p.max_chars); - params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); + params.keystroke_callback(boost::bind(&LLLocationInputCtrl::onTextEntry, this, _1)); params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); mTextEntry = LLUICtrlFactory::create<LLURLLineEditor>(params); @@ -484,13 +484,16 @@ void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) KEY key = gKeyboard->currentKey(); MASK mask = gKeyboard->currentMask(TRUE); + // Typing? (moving cursor should not affect showing the list) + bool typing = mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END; + bool pasting = mask == MASK_CONTROL && key == 'V'; + if (line_editor->getText().empty()) { prearrangeList(); // resets filter hideList(); } - // Typing? (moving cursor should not affect showing the list) - else if (mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) + else if (typing || pasting) { prearrangeList(line_editor->getText()); if (mList->getItemCount() != 0) @@ -966,7 +969,12 @@ void LLLocationInputCtrl::focusTextEntry() // if the "select_on_focus" parameter is true it places the cursor // at the beginning (after selecting text), thus screwing up updateSelection(). if (mTextEntry) + { gFocusMgr.setKeyboardFocus(mTextEntry); + + // Enable the text entry to handle accelerator keys (EXT-8104). + LLEditMenuHandler::gEditMenuHandler = mTextEntry; + } } void LLLocationInputCtrl::enableAddLandmarkButton(bool val) diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index cb65756764..e6b4aeb6c2 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -582,8 +582,6 @@ LLIMWellWindow::LLIMWellWindow(const LLSD& key) : LLSysWellWindow(key) { LLIMMgr::getInstance()->addSessionObserver(this); - LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1)); - LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); } LLIMWellWindow::~LLIMWellWindow() @@ -601,6 +599,10 @@ BOOL LLIMWellWindow::postBuild() { BOOL rv = LLSysWellWindow::postBuild(); setTitle(getString("title_im_well_window")); + + LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1)); + LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); + return rv; } @@ -641,6 +643,8 @@ void LLIMWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& notification_id) { + if (!mMessageList) return NULL; + LLChiclet* res = NULL; ObjectRowPanel* panel = mMessageList->getTypedItemByValue<ObjectRowPanel>(notification_id); if (panel != NULL) @@ -655,6 +659,8 @@ LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& notification_id) // PRIVATE METHODS LLChiclet* LLIMWellWindow::findIMChiclet(const LLUUID& sessionId) { + if (!mMessageList) return NULL; + LLChiclet* res = NULL; RowPanel* panel = mMessageList->getTypedItemByValue<RowPanel>(sessionId); if (panel != NULL) |