diff options
author | Andrew Polunin <apolunin@productengine.com> | 2010-05-20 21:16:16 +0300 |
---|---|---|
committer | Andrew Polunin <apolunin@productengine.com> | 2010-05-20 21:16:16 +0300 |
commit | 53505bd225608d1f048ca80e0bc475d2c125db3a (patch) | |
tree | 8984e9ff94a6b057af331f4802253d33b9fe511e | |
parent | ae6c2de1e33e15f7a3766007a2b20b16f99c1114 (diff) |
EXT-7223 FIXED (Add \"Shop\" Button in bottom of Inventory panel)
- Added 'MarketplaceURL' setting in settings.xml to represent URL which points to the Marketplace.
- Added member mShopBtn in the class LLSidepanelInventory.
- Added handler LLSidepanelInventory::onShopButtonClicked() which handles a click on the 'Shop' button
- Added corresponding widget in the sidepanel_inventory.xml
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/408/
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 10 |
4 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7156af57ec..418032c554 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4591,6 +4591,17 @@ <key>Value</key> <string /> </map> + <key>MarketplaceURL</key> + <map> + <key>Comment</key> + <string>URL to the 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</string> + </map> <key>MaxDragDistance</key> <map> <key>Comment</key> diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 65b9184fe5..fc5143d33b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -42,6 +42,7 @@ #include "llsidepaneltaskinfo.h" #include "lltabcontainer.h" #include "llselectmgr.h" +#include "llweb.h" static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_inventory"); @@ -70,6 +71,9 @@ BOOL LLSidepanelInventory::postBuild() mShareBtn = mInventoryPanel->getChild<LLButton>("share_btn"); mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this)); + LLButton* shop_btn = mInventoryPanel->getChild<LLButton>("shop_btn"); + shop_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); + mWearBtn = mInventoryPanel->getChild<LLButton>("wear_btn"); mWearBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onWearButtonClicked, this)); @@ -155,6 +159,11 @@ void LLSidepanelInventory::onShareButtonClicked() LLAvatarActions::shareWithAvatars(); } +void LLSidepanelInventory::onShopButtonClicked() +{ + LLWeb::loadURLExternal(gSavedSettings.getString("MarketplaceURL")); +} + void LLSidepanelInventory::performActionOnSelection(const std::string &action) { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 95eab3571c..2dc17e741d 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -79,6 +79,7 @@ private: protected: void onInfoButtonClicked(); void onShareButtonClicked(); + void onShopButtonClicked(); void onWearButtonClicked(); void onPlayButtonClicked(); void onTeleportButtonClicked(); diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 812d94c55f..4c42d1f750 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -58,6 +58,16 @@ top="0" width="102" /> <button + enabled="true" + follows="bottom|left" + height="23" + label="Shop" + layout="topleft" + left="210" + name="shop_btn" + top="0" + width="102" /> + <button enabled="false" follows="bottom|left" height="23" |