diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-09-11 23:50:59 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-11 23:50:59 +0000 |
commit | 7df79382a075646a51f21bed0d7f8de883fc3608 (patch) | |
tree | e7a71ed0dc7e05e4091066e3a0455343dfcfce4f /indra/newview/llnearbychatbar.cpp | |
parent | 56449313529145a3d3c0e231967d9502b549056c (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1634 https://svn.aws.productengine.com/secondlife/pe/stable-2@1648 -> viewer-2.0.0-3
* Bugs: EXT-888 EXT-866 EXT-861 EXT-858 EXT-864 EXT-875 EXT-884 EXT-718 EXT-786 EXT-885 EXT-910 EXT-845 EXT-312 EXT-823 EXT-868
* New Development: EXT-748 EXT-863 EXT-835
QA: Please test Recent List to verify it has no troubles.
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r-- | indra/newview/llnearbychatbar.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index d4a9be0355..764e093bcc 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -32,6 +32,9 @@ #include "llviewerprecompiledheaders.h" +#include "llfloaterreg.h" +#include "lltrans.h" + #include "llnearbychatbar.h" #include "llbottomtray.h" #include "llagent.h" @@ -45,7 +48,7 @@ S32 LLNearbyChatBar::sLastSpecialChatChannel = 0; -// legacy calllback glue +// legacy callback glue void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); static LLDefaultChildRegistry::Register<LLGestureComboBox> r("gesture_combo_box"); @@ -64,6 +67,7 @@ LLGestureComboBox::LLGestureComboBox(const LLGestureComboBox::Params& p) : LLComboBox(p) , mGestureLabelTimer() , mLabel(p.label) + , mViewAllItemIndex(0) { setCommitCallback(boost::bind(&LLGestureComboBox::onCommitGesture, this)); @@ -102,6 +106,11 @@ void LLGestureComboBox::refreshGestures() } sortByName(); + + // store index followed by the last added Gesture and add View All item at bottom + mViewAllItemIndex = idx; + addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); + // Insert label after sorting, at top, with separator below it addSeparator(ADD_TOP); addSimpleElement(mLabel, ADD_TOP); @@ -128,6 +137,15 @@ void LLGestureComboBox::onCommitGesture() } index = gestures->getSelectedValue().asInteger(); + + if (mViewAllItemIndex == index) + { + // The same behavior as Ctrl+G. EXT-823 + LLFloaterReg::toggleInstance("gestures"); + gestures->selectFirstItem(); + return; + } + LLMultiGesture* gesture = mGestures.at(index); if(gesture) { |