summaryrefslogtreecommitdiff
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
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
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llnearbychatbar.cpp16
-rw-r--r--indra/newview/llnearbychatbar.h1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
4 files changed, 26 insertions, 3 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4e4c0274e7..f71662a7c8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3578,6 +3578,17 @@
<key>Value</key>
<integer>1024</integer>
</map>
+ <key>GesturesMarketplaceURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL to the Gestures Marketplace</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>https://www.xstreetsl.com/modules.php?name=Marketplace&amp;CategoryID=233</string>
+ </map>
<key>GridCrossSections</key>
<map>
<key>Comment</key>
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)
{
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index dd467d7978..5af3152662 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -62,6 +62,7 @@ protected:
std::vector<LLMultiGesture*> mGestures;
std::string mLabel;
LLSD::Integer mViewAllItemIndex;
+ LLSD::Integer mGetMoreItemIndex;
public:
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 6d80b17ac6..e028ef2077 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1894,6 +1894,7 @@ Clears (deletes) the media and all params from the given face.
<string name="Wave" value=" Wave " />
<string name="HelloAvatar" value=" Hello, avatar! " />
<string name="ViewAllGestures" value=" View All &gt;&gt;" />
+ <string name="GetMoreGestures" value=" Get More &gt;&gt;" />
<!-- inventory filter -->
<!-- use value="" because they have preceding spaces -->