void LLPanelDirFindAll::search(const std::string& search_text) { BOOL inc_pg = childGetValue("incpg").asBoolean(); BOOL inc_mature = childGetValue("incmature").asBoolean(); BOOL inc_adult = childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { LLNotifications::instance().add("NoContentToSearch"); return; } if (!search_text.empty()) { std::string selected_collection = childGetValue( "Category" ).asString(); std::string url = buildSearchURL(search_text, selected_collection, inc_pg, inc_mature, inc_adult); if (mWebBrowser) { mWebBrowser->navigateTo(url); } } else { // empty search text navigateToDefaultPage(); } childSetText("search_editor", search_text); }
void LLPanelDirFindAll::search(const std::string& search_text) { if (!search_text.empty()) { bool mature = childGetValue( "mature_check" ).asBoolean(); std::string selected_collection = childGetValue( "Category" ).asString(); std::string url = buildSearchURL(search_text, selected_collection, mature); if (mWebBrowser) { mWebBrowser->navigateTo(url); } } else { // empty search text navigateToDefaultPage(); } childSetText("search_editor", search_text); }
void LLPanelDirFindAll::search(const std::string& search_text) { BOOL inc_pg = childGetValue("incpg").asBoolean(); BOOL inc_mature = childGetValue("incmature").asBoolean(); BOOL inc_adult = childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { LLNotificationsUtil::add("NoContentToSearch"); return; } if (!search_text.empty()) { // Check whether or not we're on the old or web search All -- MC bool is_web = false; LLPanel* tabs_panel = mFloaterDirectory->getChild<LLTabContainer>("Directory Tabs")->getCurrentPanel(); if (tabs_panel) { is_web = tabs_panel->getName() == "find_all_panel"; } else { llwarns << "search panel not found! How can this be?!" << llendl; } std::string selected_collection = childGetValue( "Category" ).asString(); std::string url = buildSearchURL(search_text, selected_collection, inc_pg, inc_mature, inc_adult, is_web); if (mWebBrowser) { mWebBrowser->navigateTo(url); } } else { // empty search text navigateToDefaultPage(); } childSetText("search_editor", search_text); }