aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-04-19 02:39:31 -0700
committerMcCabe Maxsted2010-04-19 02:39:31 -0700
commit0a9be086ecd4fae7b9d390d00501b642c70357a5 (patch)
tree59dfd0a257514482be69bcf55a3e63b7fc69c08b /linden
parentPorted slviewer-0-v12300-ReinstateOldSearchTabs.patch from the Hippo Viewer (... (diff)
downloadmeta-impy-0a9be086ecd4fae7b9d390d00501b642c70357a5.zip
meta-impy-0a9be086ecd4fae7b9d390d00501b642c70357a5.tar.gz
meta-impy-0a9be086ecd4fae7b9d390d00501b642c70357a5.tar.bz2
meta-impy-0a9be086ecd4fae7b9d390d00501b642c70357a5.tar.xz
Use metaverseink.com for non-SL web searches
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/app_settings/settings.xml45
-rw-r--r--linden/indra/newview/hippoGridManager.cpp53
-rw-r--r--linden/indra/newview/hippoGridManager.h2
-rw-r--r--linden/indra/newview/llpaneldirfind.cpp169
-rw-r--r--linden/indra/newview/llpaneldirfind.h4
-rw-r--r--linden/indra/newview/llpanelweb.cpp29
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_directory.xml2
7 files changed, 203 insertions, 101 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 6643e43..0fee2e0 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -8828,7 +8828,7 @@
8828 <key>SearchURLDefault</key> 8828 <key>SearchURLDefault</key>
8829 <map> 8829 <map>
8830 <key>Comment</key> 8830 <key>Comment</key>
8831 <string>URL to load for empty searches</string> 8831 <string>URL to load for empty Second Life searches</string>
8832 <key>Persist</key> 8832 <key>Persist</key>
8833 <integer>1</integer> 8833 <integer>1</integer>
8834 <key>HideFromEditor</key> 8834 <key>HideFromEditor</key>
@@ -8838,10 +8838,23 @@
8838 <key>Value</key> 8838 <key>Value</key>
8839 <string>http://search.secondlife.com/client_search.php?</string> 8839 <string>http://search.secondlife.com/client_search.php?</string>
8840 </map> 8840 </map>
8841 <key>SearchURLDefaultOpenSim</key>
8842 <map>
8843 <key>Comment</key>
8844 <string>URL to load for empty OpenSim searches</string>
8845 <key>Persist</key>
8846 <integer>1</integer>
8847 <key>HideFromEditor</key>
8848 <integer>0</integer>
8849 <key>Type</key>
8850 <string>String</string>
8851 <key>Value</key>
8852 <string>http://webi.metaverseink.com/opensim/results.jsp?</string>
8853 </map>
8841 <key>SearchURLQuery</key> 8854 <key>SearchURLQuery</key>
8842 <map> 8855 <map>
8843 <key>Comment</key> 8856 <key>Comment</key>
8844 <string>URL to use for searches</string> 8857 <string>URL to use for Second Life searches</string>
8845 <key>Persist</key> 8858 <key>Persist</key>
8846 <integer>1</integer> 8859 <integer>1</integer>
8847 <key>HideFromEditor</key> 8860 <key>HideFromEditor</key>
@@ -8851,10 +8864,23 @@
8851 <key>Value</key> 8864 <key>Value</key>
8852 <string>http://search.secondlife.com/client_search.php?q=[QUERY]&amp;s=[COLLECTION]&amp;</string> 8865 <string>http://search.secondlife.com/client_search.php?q=[QUERY]&amp;s=[COLLECTION]&amp;</string>
8853 </map> 8866 </map>
8867 <key>SearchURLQueryOpenSim</key>
8868 <map>
8869 <key>Comment</key>
8870 <string>URL to use for OpenSim searches</string>
8871 <key>Persist</key>
8872 <integer>1</integer>
8873 <key>HideFromEditor</key>
8874 <integer>0</integer>
8875 <key>Type</key>
8876 <string>String</string>
8877 <key>Value</key>
8878 <string>http://webi.metaverseink.com/opensim/results.jsp?query=[QUERY]&amp;vw=os</string>
8879 </map>
8854 <key>SearchURLSuffix2</key> 8880 <key>SearchURLSuffix2</key>
8855 <map> 8881 <map>
8856 <key>Comment</key> 8882 <key>Comment</key>
8857 <string>Parameters added to end of search queries</string> 8883 <string>Parameters added to end of Second Life search queries</string>
8858 <key>Persist</key> 8884 <key>Persist</key>
8859 <integer>1</integer> 8885 <integer>1</integer>
8860 <key>HideFromEditor</key> 8886 <key>HideFromEditor</key>
@@ -8864,6 +8890,19 @@
8864 <key>Value</key> 8890 <key>Value</key>
8865 <string>lang=[LANG]&amp;mat=[MATURITY]&amp;t=[TEEN]&amp;region=[REGION]&amp;x=[X]&amp;y=[Y]&amp;z=[Z]&amp;session=[SESSION]</string> 8891 <string>lang=[LANG]&amp;mat=[MATURITY]&amp;t=[TEEN]&amp;region=[REGION]&amp;x=[X]&amp;y=[Y]&amp;z=[Z]&amp;session=[SESSION]</string>
8866 </map> 8892 </map>
8893 <key>SearchURLSuffixOpenSim</key>
8894 <map>
8895 <key>Comment</key>
8896 <string>Parameters added to end of OpenSim search queries</string>
8897 <key>Persist</key>
8898 <integer>1</integer>
8899 <key>HideFromEditor</key>
8900 <integer>0</integer>
8901 <key>Type</key>
8902 <string>String</string>
8903 <key>Value</key>
8904 <string></string>
8905 </map>
8867 <key>SelectMovableOnly</key> 8906 <key>SelectMovableOnly</key>
8868 <map> 8907 <map>
8869 <key>Comment</key> 8908 <key>Comment</key>
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp
index f96e3ec..9acdd69 100644
--- a/linden/indra/newview/hippoGridManager.cpp
+++ b/linden/indra/newview/hippoGridManager.cpp
@@ -263,22 +263,43 @@ void HippoGridInfo::setDirectoryFee(int fee)
263// ******************************************************************** 263// ********************************************************************
264// Grid Info 264// Grid Info
265 265
266std::string HippoGridInfo::getSearchUrl(SearchType ty) const 266std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
267{ 267{
268 if ((mPlatform == PLATFORM_SECONDLIFE) || mSearchUrl.empty()) { 268 // Don't worry about whether or not mSearchUrl is empty here anymore -- MC
269 // Second Life defaults 269 if (is_web)
270 if (ty == SEARCH_ALL_EMPTY) { 270 {
271 return gSavedSettings.getString("SearchURLDefault"); 271 if (mPlatform == PLATFORM_SECONDLIFE)
272 } else if (ty == SEARCH_ALL_QUERY) { 272 {
273 return gSavedSettings.getString("SearchURLQuery"); 273 // Second Life defaults
274 } else if (ty == SEARCH_ALL_TEMPLATE) { 274 if (ty == SEARCH_ALL_EMPTY) {
275 return gSavedSettings.getString("SearchURLSuffix2"); 275 return gSavedSettings.getString("SearchURLDefault");
276 } else { 276 } else if (ty == SEARCH_ALL_QUERY) {
277 llinfos << "Illegal search URL type " << ty << llendl; 277 return gSavedSettings.getString("SearchURLQuery");
278 return ""; 278 } else if (ty == SEARCH_ALL_TEMPLATE) {
279 } 279 return gSavedSettings.getString("SearchURLSuffix2");
280 } else { 280 } else {
281 // OpenSim and other 281 llinfos << "Illegal search URL type " << ty << llendl;
282 return "";
283 }
284 }
285 else
286 {
287 // OpenSim and other web search defaults
288 if (ty == SEARCH_ALL_EMPTY) {
289 return gSavedSettings.getString("SearchURLDefaultOpenSim");
290 } else if (ty == SEARCH_ALL_QUERY) {
291 return gSavedSettings.getString("SearchURLQueryOpenSim");
292 } else if (ty == SEARCH_ALL_TEMPLATE) {
293 return gSavedSettings.getString("SearchURLSuffixOpenSim");
294 } else {
295 llinfos << "Illegal search URL type " << ty << llendl;
296 return "";
297 }
298 }
299 }
300 else
301 {
302 // Use the old search all
282 if (ty == SEARCH_ALL_EMPTY) { 303 if (ty == SEARCH_ALL_EMPTY) {
283 return (mSearchUrl + "panel=All&"); 304 return (mSearchUrl + "panel=All&");
284 } else if (ty == SEARCH_ALL_QUERY) { 305 } else if (ty == SEARCH_ALL_QUERY) {
diff --git a/linden/indra/newview/hippoGridManager.h b/linden/indra/newview/hippoGridManager.h
index ef351d9..d99918b 100644
--- a/linden/indra/newview/hippoGridManager.h
+++ b/linden/indra/newview/hippoGridManager.h
@@ -51,7 +51,7 @@ public:
51 const std::string& getFirstName() const; 51 const std::string& getFirstName() const;
52 const std::string& getLastName() const; 52 const std::string& getLastName() const;
53 const std::string& getAvatarPassword() const; 53 const std::string& getAvatarPassword() const;
54 std::string getSearchUrl(SearchType ty) const; 54 std::string getSearchUrl(SearchType ty, bool is_web) const;
55 bool isRenderCompat() const; 55 bool isRenderCompat() const;
56 56
57 const std::string& getCurrencySymbol() const; 57 const std::string& getCurrencySymbol() const;
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp
index cb83ee1..ed22477 100644
--- a/linden/indra/newview/llpaneldirfind.cpp
+++ b/linden/indra/newview/llpaneldirfind.cpp
@@ -227,8 +227,20 @@ void LLPanelDirFindAll::search(const std::string& search_text)
227 227
228 if (!search_text.empty()) 228 if (!search_text.empty())
229 { 229 {
230 // Check whether or not we're on the old or web search All -- MC
231 bool is_web = false;
232 LLPanel* tabs_panel = mFloaterDirectory->getChild<LLTabContainer>("Directory Tabs")->getCurrentPanel();
233 if (tabs_panel)
234 {
235 is_web = tabs_panel->getName() == "find_all_panel";
236 }
237 else
238 {
239 llwarns << "search panel not found! How can this be?!" << llendl;
240 }
241
230 std::string selected_collection = childGetValue( "Category" ).asString(); 242 std::string selected_collection = childGetValue( "Category" ).asString();
231 std::string url = buildSearchURL(search_text, selected_collection, inc_pg, inc_mature, inc_adult); 243 std::string url = buildSearchURL(search_text, selected_collection, inc_pg, inc_mature, inc_adult, is_web);
232 if (mWebBrowser) 244 if (mWebBrowser)
233 { 245 {
234 mWebBrowser->navigateTo(url); 246 mWebBrowser->navigateTo(url);
@@ -250,26 +262,28 @@ void LLPanelDirFind::focus()
250 262
251void LLPanelDirFind::navigateToDefaultPage() 263void LLPanelDirFind::navigateToDefaultPage()
252{ 264{
253 std::string start_url = gSavedSettings.getString("SearchURLDefault"); 265 std::string start_url;
254 // Note: beware porting stuff like below. We use the web panel in OpenSim as well as Second Life -- MC 266 // Note: we use the web panel in OpenSim as well as Second Life -- MC
255 /*if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) { 267 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
256 start_url = getString("default_search_page"); 268 {
257 } else { 269 start_url = gSavedSettings.getString("SearchURLDefault");
258 start_url = gHippoGridManager->getConnectedGrid()->getSearchUrl();
259 start_url += "panel=" + getLabel() + "&";
260 }*/
261 270
262 BOOL inc_pg = childGetValue("incpg").asBoolean(); 271 BOOL inc_pg = childGetValue("incpg").asBoolean();
263 BOOL inc_mature = childGetValue("incmature").asBoolean(); 272 BOOL inc_mature = childGetValue("incmature").asBoolean();
264 BOOL inc_adult = childGetValue("incadult").asBoolean(); 273 BOOL inc_adult = childGetValue("incadult").asBoolean();
265 if (!(inc_pg || inc_mature || inc_adult)) 274 if (!(inc_pg || inc_mature || inc_adult))
275 {
276 // if nothing's checked, just go for pg; we don't notify in
277 // this case because it's a default page.
278 inc_pg = true;
279 }
280
281 start_url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult, true);
282 }
283 else
266 { 284 {
267 // if nothing's checked, just go for pg; we don't notify in 285 start_url = gSavedSettings.getString("SearchURLDefaultOpenSim");
268 // this case because it's a default page.
269 inc_pg = true;
270 } 286 }
271
272 start_url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult);
273 287
274 llinfos << "default url: " << start_url << llendl; 288 llinfos << "default url: " << start_url << llendl;
275 289
@@ -280,11 +294,11 @@ void LLPanelDirFind::navigateToDefaultPage()
280} 294}
281// static 295// static
282std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const std::string& collection, 296std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const std::string& collection,
283 bool inc_pg, bool inc_mature, bool inc_adult) 297 bool inc_pg, bool inc_mature, bool inc_adult, bool is_web)
284{ 298{
285 std::string url; 299 std::string url;
286 if (search_text.empty()) { 300 if (search_text.empty()) {
287 url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_EMPTY); 301 url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_EMPTY, is_web);
288 } else { 302 } else {
289 // Replace spaces with "+" for use by Google search appliance 303 // Replace spaces with "+" for use by Google search appliance
290 // Yes, this actually works for double-spaces 304 // Yes, this actually works for double-spaces
@@ -307,7 +321,7 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const
307 "-._~$+!*'()"; 321 "-._~$+!*'()";
308 std::string query = LLURI::escape(search_text_with_plus, allowed); 322 std::string query = LLURI::escape(search_text_with_plus, allowed);
309 323
310 url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_QUERY); 324 url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_QUERY, is_web);
311 std::string substring = "[QUERY]"; 325 std::string substring = "[QUERY]";
312 std::string::size_type where = url.find(substring); 326 std::string::size_type where = url.find(substring);
313 if (where != std::string::npos) 327 if (where != std::string::npos)
@@ -325,66 +339,73 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const
325 } 339 }
326 340
327 } 341 }
328 url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult); 342 url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult, is_web);
329 llinfos << "search url " << url << llendl; 343 llinfos << "search url " << url << llendl;
330 return url; 344 return url;
331} 345}
332// static 346// static
333std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult) 347std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web)
334{ 348{
335 std::string url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_TEMPLATE); 349 std::string url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_TEMPLATE, is_web);
336 350
337 // if the mature checkbox is unchecked, modify query to remove 351 if (!url.empty())
338 // terms with given phrase from the result set
339 // This builds a value from 1-7 by or-ing together the flags, and then converts
340 // it to a string.
341 std::string substring="[MATURITY]";
342 S32 maturityFlag =
343 (inc_pg ? SEARCH_PG : SEARCH_NONE) |
344 (inc_mature ? SEARCH_MATURE : SEARCH_NONE) |
345 (inc_adult ? SEARCH_ADULT : SEARCH_NONE);
346 url.replace(url.find(substring), substring.length(), boost::lexical_cast<std::string>(maturityFlag));
347
348 // Include region and x/y position, not for the GSA, but
349 // just to get logs on the web server for search_proxy.php
350 // showing where people were standing when they searched.
351 std::string region_name;
352 LLViewerRegion* region = gAgent.getRegion();
353 if (region)
354 { 352 {
355 region_name = region->getName(); 353 // Note: opensim's template (SearchURLSuffixOpenSim) is currently empty -- MC
354 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
355 {
356 // if the mature checkbox is unchecked, modify query to remove
357 // terms with given phrase from the result set
358 // This builds a value from 1-7 by or-ing together the flags, and then converts
359 // it to a string.
360 std::string substring="[MATURITY]";
361 S32 maturityFlag =
362 (inc_pg ? SEARCH_PG : SEARCH_NONE) |
363 (inc_mature ? SEARCH_MATURE : SEARCH_NONE) |
364 (inc_adult ? SEARCH_ADULT : SEARCH_NONE);
365 url.replace(url.find(substring), substring.length(), boost::lexical_cast<std::string>(maturityFlag));
366
367 // Include region and x/y position, not for the GSA, but
368 // just to get logs on the web server for search_proxy.php
369 // showing where people were standing when they searched.
370 std::string region_name;
371 LLViewerRegion* region = gAgent.getRegion();
372 if (region)
373 {
374 region_name = region->getName();
375 }
376 // take care of spaces in names
377 region_name = LLURI::escape(region_name);
378 substring = "[REGION]";
379 url.replace(url.find(substring), substring.length(), region_name);
380
381 LLVector3 pos_region = gAgent.getPositionAgent();
382
383 std::string x = llformat("%.0f", pos_region.mV[VX]);
384 substring = "[X]";
385 url.replace(url.find(substring), substring.length(), x);
386 std::string y = llformat("%.0f", pos_region.mV[VY]);
387 substring = "[Y]";
388 url.replace(url.find(substring), substring.length(), y);
389 std::string z = llformat("%.0f", pos_region.mV[VZ]);
390 substring = "[Z]";
391 url.replace(url.find(substring), substring.length(), z);
392
393 LLUUID session_id = gAgent.getSessionID();
394 std::string session_string = session_id.getString();
395 substring = "[SESSION]";
396 url.replace(url.find(substring), substring.length(), session_string);
397
398 // set the currently selected language by asking the pref setting
399 std::string language_string = LLUI::getLanguage();
400 std::string language_tag = "[LANG]";
401 url.replace( url.find( language_tag ), language_tag.length(), language_string );
402
403 // and set the flag for the teen grid
404 std::string teen_string = gAgent.isTeen() ? "y" : "n";
405 std::string teen_tag = "[TEEN]";
406 url.replace( url.find( teen_tag ), teen_tag.length(), teen_string );
407 }
356 } 408 }
357 // take care of spaces in names
358 region_name = LLURI::escape(region_name);
359 substring = "[REGION]";
360 url.replace(url.find(substring), substring.length(), region_name);
361
362 LLVector3 pos_region = gAgent.getPositionAgent();
363
364 std::string x = llformat("%.0f", pos_region.mV[VX]);
365 substring = "[X]";
366 url.replace(url.find(substring), substring.length(), x);
367 std::string y = llformat("%.0f", pos_region.mV[VY]);
368 substring = "[Y]";
369 url.replace(url.find(substring), substring.length(), y);
370 std::string z = llformat("%.0f", pos_region.mV[VZ]);
371 substring = "[Z]";
372 url.replace(url.find(substring), substring.length(), z);
373
374 LLUUID session_id = gAgent.getSessionID();
375 std::string session_string = session_id.getString();
376 substring = "[SESSION]";
377 url.replace(url.find(substring), substring.length(), session_string);
378
379 // set the currently selected language by asking the pref setting
380 std::string language_string = LLUI::getLanguage();
381 std::string language_tag = "[LANG]";
382 url.replace( url.find( language_tag ), language_tag.length(), language_string );
383
384 // and set the flag for the teen grid
385 std::string teen_string = gAgent.isTeen() ? "y" : "n";
386 std::string teen_tag = "[TEEN]";
387 url.replace( url.find( teen_tag ), teen_tag.length(), teen_string );
388 409
389 return url; 410 return url;
390} 411}
diff --git a/linden/indra/newview/llpaneldirfind.h b/linden/indra/newview/llpaneldirfind.h
index 299060c..1a97f4b 100644
--- a/linden/indra/newview/llpaneldirfind.h
+++ b/linden/indra/newview/llpaneldirfind.h
@@ -62,8 +62,8 @@ public:
62 virtual void navigateToDefaultPage(); 62 virtual void navigateToDefaultPage();
63 void focus(); 63 void focus();
64 64
65 static std::string buildSearchURL(const std::string& search_text, const std::string& collection, bool inc_pg, bool inc_mature, bool inc_adult); 65 static std::string buildSearchURL(const std::string& search_text, const std::string& collection, bool inc_pg, bool inc_mature, bool inc_adult, bool is_web);
66 static std::string getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult); 66 static std::string getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web);
67 67
68private: 68private:
69 static void onClickBack( void* data ); 69 static void onClickBack( void* data );
diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp
index 32ec567..38bb2d7 100644
--- a/linden/indra/newview/llpanelweb.cpp
+++ b/linden/indra/newview/llpanelweb.cpp
@@ -37,6 +37,7 @@
37 37
38// project includes 38// project includes
39#include "llcheckboxctrl.h" 39#include "llcheckboxctrl.h"
40#include "hippoGridManager.h"
40#include "llmediamanager.h" 41#include "llmediamanager.h"
41#include "lluictrlfactory.h" 42#include "lluictrlfactory.h"
42#include "llviewercontrol.h" 43#include "llviewercontrol.h"
@@ -100,7 +101,14 @@ BOOL LLPanelWeb::postBuild()
100 childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); 101 childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress"));
101 childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort")); 102 childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort"));
102 103
103 childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQuery")) ; 104 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
105 {
106 childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQuery")) ;
107 }
108 else
109 {
110 childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQueryOpenSim")) ;
111 }
104 childSetAction("world_search_reset_default", onClickDefault, this); 112 childSetAction("world_search_reset_default", onClickDefault, this);
105 childSetAction("world_search_clear", onClickClear, this); 113 childSetAction("world_search_clear", onClickClear, this);
106 114
@@ -124,7 +132,14 @@ void LLPanelWeb::apply()
124 gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled")); 132 gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled"));
125 gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor")); 133 gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor"));
126 gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port")); 134 gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port"));
127 gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor")); 135 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
136 {
137 gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor"));
138 }
139 else
140 {
141 gSavedSettings.setString("SearchURLQueryOpenSim", childGetValue("world_search_editor"));
142 }
128 143
129 bool value = childGetValue("use_external_browser").asString() == "external" ? true : false; 144 bool value = childGetValue("use_external_browser").asString() == "external" ? true : false;
130 gSavedSettings.setBOOL("UseExternalBrowser", value); 145 gSavedSettings.setBOOL("UseExternalBrowser", value);
@@ -217,14 +232,20 @@ void LLPanelWeb::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data)
217void LLPanelWeb::onClickDefault(void* user_data) 232void LLPanelWeb::onClickDefault(void* user_data)
218{ 233{
219 LLPanelWeb* self = (LLPanelWeb*)user_data; 234 LLPanelWeb* self = (LLPanelWeb*)user_data;
220 LLControlVariable* controlp = gSavedSettings.getControl("SearchURLQuery"); 235 LLControlVariable* controlp =
236 (gHippoGridManager->getConnectedGrid()->isSecondLife())
237 ?
238 gSavedSettings.getControl("SearchURLQuery")
239 :
240 gSavedSettings.getControl("SearchURLQueryOpenSim");
241
221 if (controlp) 242 if (controlp)
222 { 243 {
223 self->childSetValue("world_search_editor",controlp->getDefault().asString()) ; 244 self->childSetValue("world_search_editor",controlp->getDefault().asString()) ;
224 } 245 }
225 else 246 else
226 { 247 {
227 llwarns << "SearchURLQuery missing from settings.xml - thats bad!" << llendl; 248 llwarns << "SearchURLQuery or SearchURLQueryOpenSim missing from settings.xml - thats bad!" << llendl;
228 } 249 }
229 250
230} 251}
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml b/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml
index 039c4f8..ebadde3 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml
@@ -82,7 +82,7 @@
82 font="SansSerif" handle_edit_keys_directly="false" height="18" 82 font="SansSerif" handle_edit_keys_directly="false" height="18"
83 label="Search" left_delta="56" max_length="254" mouse_opaque="true" 83 label="Search" left_delta="56" max_length="254" mouse_opaque="true"
84 name="search_editor" select_all_on_focus_received="false" 84 name="search_editor" select_all_on_focus_received="false"
85 select_on_focus="false" tab_group="1" tool_tip="Search Second Life" 85 select_on_focus="false" tab_group="1" tool_tip="Search the web"
86 width="160" /> 86 width="160" />
87 <button bottom="-26" follows="top|right" font="SansSerifSmall" height="20" label="Back" 87 <button bottom="-26" follows="top|right" font="SansSerifSmall" height="20" label="Back"
88 left="230" name="back_btn" width="70" /> 88 left="230" name="back_btn" width="70" />