summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychatbar.cpp
diff options
context:
space:
mode:
authorAndrew Polunin <apolunin@productengine.com>2010-05-14 13:03:44 +0300
committerAndrew Polunin <apolunin@productengine.com>2010-05-14 13:03:44 +0300
commit61316403aa7cd430d4bffac8ae517e5563598898 (patch)
tree699004aaa8abd16e1da5bf1a8018d1532d2bebf3 /indra/newview/llnearbychatbar.cpp
parent07678ad2db9ffca1cacdab4f28c63e01e8e6f514 (diff)
EXT-7221 FIXED Now the 'Get More >>' link exists exactly before the 'View All >>' link in the Gestures list
- Added new setting GesturesMarketplaceURL in settings.xml to represent URL which points to the Gesture's Marketplace. - Added mGetMoreItemIndex instance variable (similar to mViewAllItemIndex which was already there). - Added mGetMoreItemIndex handling in the LLGestureComboList::onCommitGesture() (again, similar to mViewAllItemIndex). - Added new string in strings.xml with name GetMoreGestures to represent Gesture's list item. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/386/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r--indra/newview/llnearbychatbar.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 1507b7d324..bd504906d5 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -79,6 +79,7 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p)
: LLUICtrl(p)
, mLabel(p.label)
, mViewAllItemIndex(0)
+ , mGetMoreItemIndex(0)
{
LLButton::Params button_params = p.combo_button;
button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
@@ -260,9 +261,12 @@ void LLGestureComboList::refreshGestures()
sortByName();
- // store index followed by the last added Gesture and add View All item at bottom
- mViewAllItemIndex = idx;
-
+ // 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));
// Insert label after sorting, at top, with separator below it
@@ -318,6 +322,12 @@ void LLGestureComboList::onCommitGesture()
return;
}
+ if (mGetMoreItemIndex == index)
+ {
+ LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL"));
+ return;
+ }
+
LLMultiGesture* gesture = mGestures.at(index);
if(gesture)
{