Make the SL Marketplace use the preloaded CEF instance for it

This commit is contained in:
Hecklezz
2026-01-04 03:38:52 +10:00
parent d10e5ac07e
commit 72d51fbb02
2 changed files with 28 additions and 3 deletions
+27
View File
@@ -173,6 +173,7 @@
#include "llavatarpropertiesprocessor.h"
#include "llcheckboxctrl.h"
#include "llfloatergridstatus.h"
#include "llfloatermarketplace.h"
#include "llfloaterpreference.h"
#include "llkeyconflict.h"
#include "lllogininstance.h"
@@ -8798,6 +8799,29 @@ class LLPromptShowURL : public view_listener_t
}
};
// <FS:TJ> For the SL Marketplace, use the already preloaded CEF instance
class FSLoadSLMarketplace : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
static LLCachedControl<std::string> marketplace_url(gSavedSettings, "MarketplaceURL", "https://marketplace.secondlife.com/");
if (LLWeb::useExternalBrowser(marketplace_url))
{
LLWeb::loadURL(marketplace_url);
}
else
{
LLFloaterReg::showInstanceOrBringToFront("marketplace");
if (LLFloaterMarketplace* marketplace = LLFloaterReg::getTypedInstance<LLFloaterMarketplace>("marketplace"))
{
marketplace->openMarketplace();
}
}
return true;
}
};
// </FS:TJ>
bool callback_show_file(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -13241,6 +13265,9 @@ void initialize_menus()
commit.add("Camera.LoadView", boost::bind(&LLAgentCamera::loadCameraPosition, &gAgentCamera));
// </FS:Ansariel>
// <FS:TJ> For the SL Marketplace, use the already preloaded CEF instance
view_listener_t::addMenu(new FSLoadSLMarketplace(), "LoadSLMarketplace");
// <FS:Ansariel> Script debug floater
commit.add("ShowScriptDebug", boost::bind(&LLFloaterScriptDebug::show, LLUUID::null));
@@ -2505,9 +2505,7 @@
label="SL Marketplace"
name="SL Marketplace">
<menu_item_call.on_click
function="PromptShowURL"
name="Xstreet_url"
parameter="WebLaunchExternalTarget,https://marketplace.secondlife.com/" />
function="LoadSLMarketplace"/>
<menu_item_call.on_visible
function="GridCheck"
parameter="secondlife"/>