00001 00032 #include "llviewerprecompiledheaders.h" 00033 00034 #include "llpaneldirplaces.h" 00035 00036 #include "llwebbrowserctrl.h" 00037 00038 LLPanelDirPlaces::LLPanelDirPlaces(const std::string& name, LLFloaterDirectory* floater) 00039 : LLPanelDirFind(name, floater, "places_browser") 00040 { 00041 } 00042 00043 00044 void LLPanelDirPlaces::search(const std::string& search_text) 00045 { 00046 if (!search_text.empty()) 00047 { 00048 bool mature = childGetValue( "mature_check" ).asBoolean(); 00049 std::string selected_collection = "Places"; 00050 std::string url = buildSearchURL(search_text, selected_collection, mature); 00051 if (mWebBrowser) 00052 { 00053 mWebBrowser->navigateTo(url); 00054 } 00055 } 00056 else 00057 { 00058 // empty search text 00059 navigateToDefaultPage(); 00060 } 00061 00062 childSetText("search_editor", search_text); 00063 } 00064 00065 LLPanelDirPlaces::~LLPanelDirPlaces() 00066 { 00067 // Children all cleaned up by default view destructor. 00068 } 00069