From 2fd5b397ad886d7f8a8792382374cd8c678abc0d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 Sep 2010 15:11:39 -0700 Subject: turn off get more and view all options in gesture combo list --- indra/newview/llnearbychatbar.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'indra/newview/llnearbychatbar.cpp') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 932ad75f29..836ae9a0cf 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -94,15 +94,19 @@ public: LLGestureComboList::Params::Params() : combo_button("combo_button"), - combo_list("combo_list") + combo_list("combo_list"), + get_more("get_more", true), + view_all("view_all", true) { } LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) -: LLUICtrl(p) - , mLabel(p.label) - , mViewAllItemIndex(0) - , mGetMoreItemIndex(0) +: LLUICtrl(p), + mLabel(p.label), + mViewAllItemIndex(-1), + mGetMoreItemIndex(-1), + mShowViewAll(p.view_all), + mShowGetMore(p.get_more) { LLBottomtrayButton::Params button_params = p.combo_button; button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); @@ -286,12 +290,16 @@ void LLGestureComboList::refreshGestures() sortByName(); // store indices for Get More and View All items (idx is the index followed by the last added Gesture) - mGetMoreItemIndex = idx; - mViewAllItemIndex = idx + 1; - - // add Get More and View All items at the bottom - mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); - mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); + if (mShowGetMore) + { + mGetMoreItemIndex = idx; + mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); + } + if (mShowViewAll) + { + mViewAllItemIndex = idx + 1; + mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); + } // Insert label after sorting, at top, with separator below it mList->addSeparator(ADD_TOP); -- cgit v1.2.3 From b6e6ba224620e0b122062c88f40295c10ce8db2d Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 10 Mar 2011 14:21:35 +0200 Subject: STORM-357 FIXED Gestures button is in the pressed state after drag-n-drop but gestures list isn't visible. - Because the Gesture Combo List isn't child of gViewerWindow->getNonSideTrayView(), after focus lost the gesture list becomes hidden under world. To avoid this, send child to front in each draw. --- indra/newview/llnearbychatbar.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llnearbychatbar.cpp') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 836ae9a0cf..162e465fef 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -157,6 +157,16 @@ BOOL LLGestureComboList::handleKeyHere(KEY key, MASK mask) return handled; } +void LLGestureComboList::draw() +{ + LLUICtrl::draw(); + + if(mButton->getToggleState()) + { + showList(); + } +} + void LLGestureComboList::showList() { LLRect rect = mList->getRect(); @@ -180,6 +190,7 @@ void LLGestureComboList::showList() // Show the list and push the button down mButton->setToggleState(TRUE); mList->setVisible(TRUE); + sendChildToFront(mList); LLUI::addPopup(mList); } -- cgit v1.2.3