Added the ever-requested marketplace tab to search floater (When on SL Grids, only)
This commit is contained in:
@@ -67,6 +67,29 @@
|
||||
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
class LLPanelDirMarket : public LLPanelDirFind
|
||||
{
|
||||
public:
|
||||
LLPanelDirMarket(const std::string& name, LLFloaterDirectory* floater)
|
||||
: LLPanelDirFind(name, floater, "market_browser")
|
||||
{}
|
||||
|
||||
/*virtual*/ void search(const std::string& url)
|
||||
{
|
||||
if (url.empty()) navigateToDefaultPage();
|
||||
}
|
||||
|
||||
/*virtual*/ void navigateToDefaultPage()
|
||||
{
|
||||
if (mWebBrowser) mWebBrowser->navigateTo(getString("default_search_page"));
|
||||
}
|
||||
|
||||
static void* create(void* data)
|
||||
{
|
||||
return new LLPanelDirMarket("market_panel", static_cast<LLFloaterDirectory*>(data));
|
||||
}
|
||||
};
|
||||
|
||||
LLFloaterDirectory* LLFloaterDirectory::sInstance = NULL;
|
||||
//static
|
||||
S32 LLFloaterDirectory::sOldSearchCount = 0; // debug
|
||||
@@ -110,6 +133,8 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name)
|
||||
// web search and showcase only for SecondLife
|
||||
factory_map["find_all_panel"] = LLCallbackMap(createFindAll, this);
|
||||
factory_map["showcase_panel"] = LLCallbackMap(createShowcase, this);
|
||||
if (!enableClassicAllSearch)
|
||||
factory_map["market_panel"] = LLCallbackMap(LLPanelDirMarket::create, this);
|
||||
}
|
||||
|
||||
if (enableClassicAllSearch)
|
||||
|
||||
@@ -686,6 +686,17 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|bottom"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4"
|
||||
mouse_opaque="true" name="result_text" v_pad="0" width="328" />
|
||||
</panel>
|
||||
<panel bottom="-549" follows="all" height="533" label="Marketplace" left="1" mouse_opaque="false" name="market_panel" width="778">
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous-4.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next-4.png" />
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="reload_btn" width="25" image_overlay="view-refresh-5.png"/>
|
||||
<web_browser name="market_browser" bottom="25" follows="all" left="10" right="-10" top="-40"/>
|
||||
<text bottom="5" follows="bottom|left" left="10" height="16" name="status_text"/>
|
||||
<string name="loading_text">Loading...</string>
|
||||
<string name="done_text">Done</string>
|
||||
<string name="redirect_404_url">https://marketplace.secondlife.com/notfound</string>
|
||||
<string name="default_search_page">https://marketplace.secondlife.com/</string>
|
||||
</panel>
|
||||
</tab_container>
|
||||
<panel bottom="-560" follows="right|top" height="470" left="340"
|
||||
|
||||
Reference in New Issue
Block a user