diff options
author | McCabe Maxsted | 2010-04-19 02:39:31 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-04-19 02:39:31 -0700 |
commit | 0a9be086ecd4fae7b9d390d00501b642c70357a5 (patch) | |
tree | 59dfd0a257514482be69bcf55a3e63b7fc69c08b /linden/indra/newview/llpanelweb.cpp | |
parent | Ported slviewer-0-v12300-ReinstateOldSearchTabs.patch from the Hippo Viewer (... (diff) | |
download | meta-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/llpanelweb.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
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) | |||
217 | void LLPanelWeb::onClickDefault(void* user_data) | 232 | void 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 | } |