diff --git a/indra/newview/llfloatermarketplace.cpp b/indra/newview/llfloatermarketplace.cpp index 889daf84ab3..4abea64302b 100644 --- a/indra/newview/llfloatermarketplace.cpp +++ b/indra/newview/llfloatermarketplace.cpp @@ -27,10 +27,11 @@ #include "llviewerprecompiledheaders.h" #include "llfloatermarketplace.h" +#include "llviewercontrol.h" #include "lluictrlfactory.h" LLFloaterMarketplace::LLFloaterMarketplace(const LLSD& key) - : LLFloater(key) + : LLFloaterWebContent(key) { } @@ -38,10 +39,25 @@ LLFloaterMarketplace::~LLFloaterMarketplace() { } +// just to override LLFloaterWebContent +void LLFloaterMarketplace::onClose(bool app_quitting) +{ +} + bool LLFloaterMarketplace::postBuild() { - enableResizeCtrls(true, true, false); + LLFloaterWebContent::postBuild(); + mWebBrowser = getChild("marketplace_contents"); + mWebBrowser->addObserver(this); + return true; } - +void LLFloaterMarketplace::openMarketplace() +{ + std::string url = gSavedSettings.getString("MarketplaceURL"); + if (mCurrentURL != url) + { + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } +} diff --git a/indra/newview/llfloatermarketplace.h b/indra/newview/llfloatermarketplace.h index 2ae4d0d64a2..9524c94eeec 100644 --- a/indra/newview/llfloatermarketplace.h +++ b/indra/newview/llfloatermarketplace.h @@ -27,14 +27,20 @@ #pragma once #include "llfloater.h" +#include "llfloaterwebcontent.h" class LLFloaterMarketplace: - public LLFloater + public LLFloaterWebContent { friend class LLFloaterReg; + +public: + void openMarketplace(); + private: LLFloaterMarketplace(const LLSD& key); ~LLFloaterMarketplace(); bool postBuild() override; + void onClose(bool app_quitting) override; }; diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 8e6a47dce5d..7ee1b88f05b 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -66,7 +66,7 @@ class LLSearchHandler : public LLCommandHandler { LLSearchHandler gSearchHandler; LLFloaterSearch::LLFloaterSearch(const LLSD& key) - : LLFloater(key) + : LLFloaterWebContent(key) { mSearchType.insert("standard"); mSearchType.insert("land"); @@ -86,6 +86,12 @@ LLFloaterSearch::~LLFloaterSearch() void LLFloaterSearch::onOpen(const LLSD& tokens) { initiateSearch(tokens); + mWebBrowser->setFocus(true); +} + +// just to override LLFloaterWebContent +void LLFloaterSearch::onClose(bool app_quitting) +{ } void LLFloaterSearch::initiateSearch(const LLSD& tokens) @@ -161,7 +167,11 @@ void LLFloaterSearch::initiateSearch(const LLSD& tokens) bool LLFloaterSearch::postBuild() { - enableResizeCtrls(true, true, false); + LLFloaterWebContent::postBuild(); + mWebBrowser = getChild("search_contents"); + mWebBrowser->addObserver(this); + getChildView("address")->setEnabled(false); + getChildView("popexternal")->setEnabled(false); // This call is actioned by the preload code in llViewerWindow // that creates the search floater during the login process diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index e8a2be4797c..6d93474f4a6 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -27,13 +27,15 @@ #pragma once #include "llfloater.h" +#include "llfloaterwebcontent.h" class LLFloaterSearch: - public LLFloater { + public LLFloaterWebContent { friend class LLFloaterReg; public: void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; private: LLFloaterSearch(const LLSD& key); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 82c959d7f77..2727127633d 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -41,6 +41,7 @@ #include "llpanelpresetscamerapulldown.h" #include "llpanelpresetspulldown.h" #include "llpanelvolumepulldown.h" +#include "llfloatermarketplace.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" #include "llhints.h" @@ -523,7 +524,11 @@ void LLStatusBar::onClickBuyCurrency() void LLStatusBar::onClickShop() { - LLFloaterReg::toggleInstanceOrBringToFront("marketplace"); + LLFloaterReg::showInstanceOrBringToFront("marketplace"); + if (LLFloaterMarketplace* marketplace = LLFloaterReg::getTypedInstance("marketplace")) + { + marketplace->openMarketplace(); + } } void LLStatusBar::onMouseEnterPresetsCamera() diff --git a/indra/newview/skins/default/xui/en/floater_marketplace.xml b/indra/newview/skins/default/xui/en/floater_marketplace.xml index 2299e02c63e..99fb3a1ad82 100644 --- a/indra/newview/skins/default/xui/en/floater_marketplace.xml +++ b/indra/newview/skins/default/xui/en/floater_marketplace.xml @@ -1,26 +1,201 @@ - + legacy_header_height="18" + can_minimize="true" + can_close="true" + can_resize="true" + height="775" + layout="topleft" + min_height="500" + min_width="600" + name="Marketplace" + save_rect="true" + single_instance="true" + save_visibility="true" + title="MARKETPLACE" + tab_stop="true" + width="780"> + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 76a486e211f..43c4aa1b9de 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -1,26 +1,202 @@ - + legacy_header_height="18" + can_minimize="true" + can_close="true" + can_resize="true" + height="775" + layout="topleft" + min_height="500" + min_width="600" + name="Search" + save_rect="true" + single_instance="true" + save_visibility="true" + title="SEARCH" + tab_stop="true" + width="780"> + + + + + + + + + + + + + + + + + + + +