aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog.txt7
-rw-r--r--linden/indra/newview/llpanelweb.cpp28
-rw-r--r--linden/indra/newview/llpanelweb.h2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml20
4 files changed, 57 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 39eb412..7a51a98 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -255,6 +255,13 @@
255 255
2562010-02-05 Armin Weatherwax <Armin.Weatherwax@gmail.com> 2562010-02-05 Armin Weatherwax <Armin.Weatherwax@gmail.com>
257 257
258 * Added custom search URL in Preferences > Web.
259
260 modified: linden/indra/newview/llpanelweb.cpp
261 modified: linden/indra/newview/llpanelweb.h
262 modified: linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml
263
264
258 * Ignore HideFromEditor from settings.xml. 265 * Ignore HideFromEditor from settings.xml.
259 Don't hide any settings from Debug Settings. 266 Don't hide any settings from Debug Settings.
260 267
diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp
index 2e7a9a1..32ec567 100644
--- a/linden/indra/newview/llpanelweb.cpp
+++ b/linden/indra/newview/llpanelweb.cpp
@@ -100,6 +100,10 @@ BOOL LLPanelWeb::postBuild()
100 childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); 100 childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress"));
101 childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort")); 101 childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort"));
102 102
103 childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQuery")) ;
104 childSetAction("world_search_reset_default", onClickDefault, this);
105 childSetAction("world_search_clear", onClickClear, this);
106
103 childSetEnabled("proxy_text_label", gSavedSettings.getBOOL("BrowserProxyEnabled")); 107 childSetEnabled("proxy_text_label", gSavedSettings.getBOOL("BrowserProxyEnabled"));
104 childSetEnabled("web_proxy_editor", gSavedSettings.getBOOL("BrowserProxyEnabled")); 108 childSetEnabled("web_proxy_editor", gSavedSettings.getBOOL("BrowserProxyEnabled"));
105 childSetEnabled("web_proxy_port", gSavedSettings.getBOOL("BrowserProxyEnabled")); 109 childSetEnabled("web_proxy_port", gSavedSettings.getBOOL("BrowserProxyEnabled"));
@@ -120,6 +124,7 @@ void LLPanelWeb::apply()
120 gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled")); 124 gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled"));
121 gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor")); 125 gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor"));
122 gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port")); 126 gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port"));
127 gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor"));
123 128
124 bool value = childGetValue("use_external_browser").asString() == "external" ? true : false; 129 bool value = childGetValue("use_external_browser").asString() == "external" ? true : false;
125 gSavedSettings.setBOOL("UseExternalBrowser", value); 130 gSavedSettings.setBOOL("UseExternalBrowser", value);
@@ -207,3 +212,26 @@ void LLPanelWeb::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data)
207 212
208 213
209} 214}
215
216// static
217void LLPanelWeb::onClickDefault(void* user_data)
218{
219 LLPanelWeb* self = (LLPanelWeb*)user_data;
220 LLControlVariable* controlp = gSavedSettings.getControl("SearchURLQuery");
221 if (controlp)
222 {
223 self->childSetValue("world_search_editor",controlp->getDefault().asString()) ;
224 }
225 else
226 {
227 llwarns << "SearchURLQuery missing from settings.xml - thats bad!" << llendl;
228 }
229
230}
231
232// static
233void LLPanelWeb::onClickClear(void* user_data)
234{
235 LLPanelWeb* self = (LLPanelWeb*)user_data;
236 self->childSetValue("world_search_editor","") ;
237} \ No newline at end of file
diff --git a/linden/indra/newview/llpanelweb.h b/linden/indra/newview/llpanelweb.h
index 449b9cb..3282827 100644
--- a/linden/indra/newview/llpanelweb.h
+++ b/linden/indra/newview/llpanelweb.h
@@ -49,6 +49,8 @@ public:
49private: 49private:
50 static void onClickClearCache(void*); 50 static void onClickClearCache(void*);
51 static void onClickClearCookies(void*); 51 static void onClickClearCookies(void*);
52 static void onClickDefault(void* user_data);
53 static void onClickClear(void* user_data);
52 static bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); 54 static bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response);
53 static bool callback_clear_cookies(const LLSD& notification, const LLSD& response); 55 static bool callback_clear_cookies(const LLSD& notification, const LLSD& response);
54 static void onCommitCookies(LLUICtrl* ctrl, void* data); 56 static void onCommitCookies(LLUICtrl* ctrl, void* data);
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml
index ed13e8f..117e494 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml
@@ -61,4 +61,24 @@
61 initial_val="80" label="Port Number:" label_width="75" left="140" 61 initial_val="80" label="Port Number:" label_width="75" left="140"
62 max_val="12000" min_val="10" mouse_opaque="true" name="web_proxy_port" 62 max_val="12000" min_val="10" mouse_opaque="true" name="web_proxy_port"
63 width="140" /> 63 width="140" />
64 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
65 bottom_delta="-25" drop_shadow_visible="true" enabled="true"
66 follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
67 height="10" left="15" mouse_opaque="false" name="cache_size_label_l"
68 v_pad="0" width="128">
69 World search:
70 </text>
71 <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif"
72 height="18" left="100" name="world_search_editor"
73 tool_tip="Address of the world search engine you would like to use"
74 width="355" />
75 <button bottom_delta="-20" enabled="true" follows="left|bottom" font="SansSerif"
76 halign="center" height="16" label="Reset" left="100"
77 tool_tip="Reset to default"
78 mouse_opaque="true" name="world_search_reset_default" scale_image="true" width="65" />
79 <button bottom_delta="0" enabled="true" follows="left|bottom" font="SansSerif"
80 halign="center" height="16" label="Clear" left="170"
81 tool_tip="clear field"
82 mouse_opaque="true" name="world_search_clear" scale_image="true" width="65" />
83
64</panel> 84</panel>