From 53505bd225608d1f048ca80e0bc475d2c125db3a Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Thu, 20 May 2010 21:16:16 +0300 Subject: 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 --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llsidepanelinventory.cpp | 9 +++++++++ indra/newview/llsidepanelinventory.h | 1 + indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 10 ++++++++++ 4 files changed, 31 insertions(+) (limited to 'indra/newview') 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 @@ Value + MarketplaceURL + + Comment + URL to the Marketplace + Persist + 0 + Type + String + Value + https://www.xstreetsl.com/modules.php?name=Marketplace + MaxDragDistance Comment 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 t_inventory("sidepanel_inventory"); @@ -70,6 +71,9 @@ BOOL LLSidepanelInventory::postBuild() mShareBtn = mInventoryPanel->getChild("share_btn"); mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this)); + LLButton* shop_btn = mInventoryPanel->getChild("shop_btn"); + shop_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); + mWearBtn = mInventoryPanel->getChild("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("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 @@ -57,6 +57,16 @@ name="share_btn" top="0" width="102" /> +