diff options
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 35 | ||||
-rw-r--r-- | linden/indra/newview/llpanelnetwork.cpp | 24 | ||||
-rw-r--r-- | linden/indra/newview/llpanelnetwork.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/llpanelweb.cpp | 13 | ||||
-rw-r--r-- | linden/indra/newview/llviewermedia.cpp | 38 | ||||
-rw-r--r-- | linden/indra/newview/llviewermedia.h | 5 | ||||
-rw-r--r-- | linden/indra/newview/llxmlrpctransaction.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml | 27 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml | 4 |
9 files changed, 147 insertions, 6 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 2a508ee..c381d99 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -2311,6 +2311,41 @@ | |||
2311 | <key>Value</key> | 2311 | <key>Value</key> |
2312 | <integer>0</integer> | 2312 | <integer>0</integer> |
2313 | </map> | 2313 | </map> |
2314 | |||
2315 | <key>XMLRPCProxyAddress</key> | ||
2316 | <map> | ||
2317 | <key>Comment</key> | ||
2318 | <string>Address for the XMLRPC Web Proxy</string> | ||
2319 | <key>Persist</key> | ||
2320 | <integer>1</integer> | ||
2321 | <key>Type</key> | ||
2322 | <string>String</string> | ||
2323 | <key>Value</key> | ||
2324 | <string /> | ||
2325 | </map> | ||
2326 | <key>XMLRPCProxyEnabled</key> | ||
2327 | <map> | ||
2328 | <key>Comment</key> | ||
2329 | <string>Use XMLRPC Proxy</string> | ||
2330 | <key>Persist</key> | ||
2331 | <integer>1</integer> | ||
2332 | <key>Type</key> | ||
2333 | <string>Boolean</string> | ||
2334 | <key>Value</key> | ||
2335 | <integer>0</integer> | ||
2336 | </map> | ||
2337 | <key>XMLRPCProxyPort</key> | ||
2338 | <map> | ||
2339 | <key>Comment</key> | ||
2340 | <string>Port of the XMLRPC Proxy</string> | ||
2341 | <key>Persist</key> | ||
2342 | <integer>1</integer> | ||
2343 | <key>Type</key> | ||
2344 | <string>S32</string> | ||
2345 | <key>Value</key> | ||
2346 | <integer>3128</integer> | ||
2347 | </map> | ||
2348 | |||
2314 | <key>AllowIdleAFK</key> | 2349 | <key>AllowIdleAFK</key> |
2315 | <map> | 2350 | <map> |
2316 | <key>Comment</key> | 2351 | <key>Comment</key> |
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp index 2edd1a1..16b9a76 100644 --- a/linden/indra/newview/llpanelnetwork.cpp +++ b/linden/indra/newview/llpanelnetwork.cpp | |||
@@ -64,6 +64,14 @@ BOOL LLPanelNetwork::postBuild() | |||
64 | childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); | 64 | childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); |
65 | childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); | 65 | childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); |
66 | 66 | ||
67 | childSetCommitCallback("xmlrpc_proxy_enabled", onCommitXMLRPCProxyEnabled, this); | ||
68 | childSetValue("xmlrpc_proxy_enabled", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
69 | childSetValue("xmlrpc_proxy_editor", gSavedSettings.getString("XMLRPCProxyAddress")); | ||
70 | childSetValue("xmlrpc_proxy_port", gSavedSettings.getS32("XMLRPCProxyPort")); | ||
71 | childSetEnabled("xmlrpc_proxy_text_label", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
72 | childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
73 | childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
74 | |||
67 | return TRUE; | 75 | return TRUE; |
68 | } | 76 | } |
69 | 77 | ||
@@ -79,6 +87,10 @@ void LLPanelNetwork::apply() | |||
79 | gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal()); | 87 | gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal()); |
80 | gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled")); | 88 | gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled")); |
81 | gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger()); | 89 | gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger()); |
90 | |||
91 | gSavedSettings.setBOOL("XMLRPCProxyEnabled", childGetValue("xmlrpc_proxy_enabled")); | ||
92 | gSavedSettings.setString("XMLRPCProxyAddress", childGetValue("xmlrpc_proxy_editor")); | ||
93 | gSavedSettings.setS32("XMLRPCProxyPort", childGetValue("xmlrpc_proxy_port")); | ||
82 | } | 94 | } |
83 | 95 | ||
84 | void LLPanelNetwork::cancel() | 96 | void LLPanelNetwork::cancel() |
@@ -144,3 +156,15 @@ void LLPanelNetwork::onCommitPort(LLUICtrl* ctrl, void* data) | |||
144 | self->childSetEnabled("connection_port", check->get()); | 156 | self->childSetEnabled("connection_port", check->get()); |
145 | LLNotifications::instance().add("ChangeConnectionPort"); | 157 | LLNotifications::instance().add("ChangeConnectionPort"); |
146 | } | 158 | } |
159 | |||
160 | // static | ||
161 | void LLPanelNetwork::onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data) | ||
162 | { | ||
163 | LLPanelNetwork* self = (LLPanelNetwork*)data; | ||
164 | LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; | ||
165 | |||
166 | if (!self || !check) return; | ||
167 | self->childSetEnabled("xmlrpc_proxy_editor", check->get()); | ||
168 | self->childSetEnabled("xmlrpc_proxy_port", check->get()); | ||
169 | self->childSetEnabled("xmlrpc_proxy_text_label", check->get()); | ||
170 | } \ No newline at end of file | ||
diff --git a/linden/indra/newview/llpanelnetwork.h b/linden/indra/newview/llpanelnetwork.h index 3a3d857..900158a 100644 --- a/linden/indra/newview/llpanelnetwork.h +++ b/linden/indra/newview/llpanelnetwork.h | |||
@@ -51,6 +51,7 @@ private: | |||
51 | static void onClickSetCache(void*); | 51 | static void onClickSetCache(void*); |
52 | static void onClickResetCache(void*); | 52 | static void onClickResetCache(void*); |
53 | static void onCommitPort(LLUICtrl* ctrl, void*); | 53 | static void onCommitPort(LLUICtrl* ctrl, void*); |
54 | static void onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data); | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | #endif | 57 | #endif |
diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp index 6f9bd7a..93441dd 100644 --- a/linden/indra/newview/llpanelweb.cpp +++ b/linden/indra/newview/llpanelweb.cpp | |||
@@ -69,6 +69,7 @@ BOOL LLPanelWeb::postBuild() | |||
69 | childSetValue("use_external_browser", value); | 69 | childSetValue("use_external_browser", value); |
70 | 70 | ||
71 | childSetValue("cookies_enabled", gSavedSettings.getBOOL("BrowserCookiesEnabled")); | 71 | childSetValue("cookies_enabled", gSavedSettings.getBOOL("BrowserCookiesEnabled")); |
72 | childSetAction("clear_cookies", onClickClearCookies,this); | ||
72 | 73 | ||
73 | childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); | 74 | childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); |
74 | childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); | 75 | childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); |
@@ -102,9 +103,15 @@ LLPanelWeb::~LLPanelWeb() | |||
102 | void LLPanelWeb::apply() | 103 | void LLPanelWeb::apply() |
103 | { | 104 | { |
104 | gSavedSettings.setBOOL("BrowserCookiesEnabled", childGetValue("cookies_enabled")); | 105 | gSavedSettings.setBOOL("BrowserCookiesEnabled", childGetValue("cookies_enabled")); |
105 | gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled")); | 106 | |
106 | gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor")); | 107 | bool proxy_enable = childGetValue("web_proxy_enabled"); |
107 | gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port")); | 108 | std::string proxy_address = childGetValue("web_proxy_editor"); |
109 | int proxy_port = childGetValue("web_proxy_port"); | ||
110 | gSavedSettings.setBOOL("BrowserProxyEnabled", proxy_enable); | ||
111 | gSavedSettings.setString("BrowserProxyAddress", proxy_address); | ||
112 | gSavedSettings.setS32("BrowserProxyPort", proxy_port); | ||
113 | LLViewerMedia::setProxyConfig(proxy_enable, proxy_address, proxy_port); | ||
114 | |||
108 | if (gHippoGridManager->getConnectedGrid()->isSecondLife()) | 115 | if (gHippoGridManager->getConnectedGrid()->isSecondLife()) |
109 | { | 116 | { |
110 | gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor")); | 117 | gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor")); |
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index f0faedf..c228468 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp | |||
@@ -267,6 +267,23 @@ std::string LLViewerMedia::getCurrentUserAgent() | |||
267 | 267 | ||
268 | return codec.str(); | 268 | return codec.str(); |
269 | } | 269 | } |
270 | |||
271 | ///////////////////////////////////////////////////////////////////////////////////////// | ||
272 | // static | ||
273 | void LLViewerMedia::setProxyConfig(bool enable, const std::string &host, int port) | ||
274 | { | ||
275 | // Set the proxy config for all loaded plugins | ||
276 | impl_list::iterator iter = sViewerMediaImplList.begin(); | ||
277 | impl_list::iterator end = sViewerMediaImplList.end(); | ||
278 | for (; iter != end; iter++) | ||
279 | { | ||
280 | LLViewerMediaImpl* pimpl = *iter; | ||
281 | if(pimpl->mMediaSource) | ||
282 | { | ||
283 | pimpl->mMediaSource->proxy_setup(enable, host, port); | ||
284 | } | ||
285 | } | ||
286 | } | ||
270 | 287 | ||
271 | ////////////////////////////////////////////////////////////////////////////////////////// | 288 | ////////////////////////////////////////////////////////////////////////////////////////// |
272 | // static | 289 | // static |
@@ -395,6 +412,19 @@ LLViewerMediaImpl::~LLViewerMediaImpl() | |||
395 | LLViewerMedia::removeMedia(this); | 412 | LLViewerMedia::removeMedia(this); |
396 | } | 413 | } |
397 | 414 | ||
415 | //static | ||
416 | void LLViewerMediaImpl::setProxy(LLPluginClassMedia* media_source) | ||
417 | { | ||
418 | // pass proxy settings to browser | ||
419 | bool proxy_enabled = gSavedSettings.getBOOL( "BrowserProxyEnabled" ); | ||
420 | std::string proxy_address = gSavedSettings.getString("BrowserProxyAddress"); | ||
421 | S32 proxy_port = gSavedSettings.getS32("BrowserProxyPort"); | ||
422 | media_source->proxy_setup(proxy_enabled, proxy_address, proxy_port); | ||
423 | LL_DEBUGS("Media") << "Proxy: " << (proxy_enabled ? "enabled" : "not enabled") | ||
424 | << " Address: " << proxy_address | ||
425 | << " Port: " << proxy_port << LL_ENDL; | ||
426 | } | ||
427 | |||
398 | ////////////////////////////////////////////////////////////////////////////////////////// | 428 | ////////////////////////////////////////////////////////////////////////////////////////// |
399 | bool LLViewerMediaImpl::initializeMedia(const std::string& mime_type) | 429 | bool LLViewerMediaImpl::initializeMedia(const std::string& mime_type) |
400 | { | 430 | { |
@@ -411,6 +441,11 @@ bool LLViewerMediaImpl::initializeMedia(const std::string& mime_type) | |||
411 | } | 441 | } |
412 | } | 442 | } |
413 | 443 | ||
444 | if(mMediaSource) | ||
445 | { | ||
446 | setProxy(mMediaSource); | ||
447 | } | ||
448 | |||
414 | // play(); | 449 | // play(); |
415 | return (mMediaSource != NULL); | 450 | return (mMediaSource != NULL); |
416 | } | 451 | } |
@@ -508,6 +543,8 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ | |||
508 | bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); | 543 | bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); |
509 | media_source->setJavascriptEnabled( javascript_enabled ); | 544 | media_source->setJavascriptEnabled( javascript_enabled ); |
510 | 545 | ||
546 | setProxy(media_source); | ||
547 | |||
511 | if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) | 548 | if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) |
512 | { | 549 | { |
513 | return media_source; | 550 | return media_source; |
@@ -741,6 +778,7 @@ void LLViewerMediaImpl::navigateHome() | |||
741 | ////////////////////////////////////////////////////////////////////////////////////////// | 778 | ////////////////////////////////////////////////////////////////////////////////////////// |
742 | void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type) | 779 | void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type) |
743 | { | 780 | { |
781 | |||
744 | if(rediscover_type) | 782 | if(rediscover_type) |
745 | { | 783 | { |
746 | 784 | ||
diff --git a/linden/indra/newview/llviewermedia.h b/linden/indra/newview/llviewermedia.h index afda426..ee5fef4 100644 --- a/linden/indra/newview/llviewermedia.h +++ b/linden/indra/newview/llviewermedia.h | |||
@@ -79,6 +79,10 @@ class LLViewerMedia | |||
79 | static void removeMedia(LLViewerMediaImpl* media); | 79 | static void removeMedia(LLViewerMediaImpl* media); |
80 | static LLViewerMediaImpl* getMediaImplFromTextureID(const LLUUID& texture_id); | 80 | static LLViewerMediaImpl* getMediaImplFromTextureID(const LLUUID& texture_id); |
81 | static std::string getCurrentUserAgent(); | 81 | static std::string getCurrentUserAgent(); |
82 | |||
83 | // Set the proxy config for all loaded plugins | ||
84 | static void setProxyConfig(bool enable, const std::string &host, int port); | ||
85 | |||
82 | static void updateBrowserUserAgent(); | 86 | static void updateBrowserUserAgent(); |
83 | static bool handleSkinCurrentChanged(const LLSD& /*newvalue*/); | 87 | static bool handleSkinCurrentChanged(const LLSD& /*newvalue*/); |
84 | static bool textureHasMedia(const LLUUID& texture_id); | 88 | static bool textureHasMedia(const LLUUID& texture_id); |
@@ -109,6 +113,7 @@ public: | |||
109 | void createMediaSource(); | 113 | void createMediaSource(); |
110 | void destroyMediaSource(); | 114 | void destroyMediaSource(); |
111 | void setMediaType(const std::string& media_type); | 115 | void setMediaType(const std::string& media_type); |
116 | static void setProxy(LLPluginClassMedia* media_source); | ||
112 | bool initializeMedia(const std::string& mime_type); | 117 | bool initializeMedia(const std::string& mime_type); |
113 | bool initializePlugin(const std::string& media_type); | 118 | bool initializePlugin(const std::string& media_type); |
114 | LLPluginClassMedia* getMediaPlugin() { return mMediaSource; } | 119 | LLPluginClassMedia* getMediaPlugin() { return mMediaSource; } |
diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp index 058946e..675ba42 100644 --- a/linden/indra/newview/llxmlrpctransaction.cpp +++ b/linden/indra/newview/llxmlrpctransaction.cpp | |||
@@ -226,10 +226,10 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) | |||
226 | mCurlRequest = new LLCurlEasyRequest(); | 226 | mCurlRequest = new LLCurlEasyRequest(); |
227 | } | 227 | } |
228 | 228 | ||
229 | if (gSavedSettings.getBOOL("BrowserProxyEnabled")) | 229 | if (gSavedSettings.getBOOL("XMLRPCProxyEnabled")) |
230 | { | 230 | { |
231 | mProxyAddress = gSavedSettings.getString("BrowserProxyAddress"); | 231 | mProxyAddress = gSavedSettings.getString("XMLRPCProxyAddress"); |
232 | S32 port = gSavedSettings.getS32 ( "BrowserProxyPort" ); | 232 | S32 port = gSavedSettings.getS32 ( "XMLRPCProxyPort" ); |
233 | 233 | ||
234 | // tell curl about the settings | 234 | // tell curl about the settings |
235 | mCurlRequest->setoptString(CURLOPT_PROXY, mProxyAddress); | 235 | mCurlRequest->setoptString(CURLOPT_PROXY, mProxyAddress); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml index 1e4ded6..86aa353 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml | |||
@@ -64,4 +64,31 @@ | |||
64 | increment="1" initial_val="13000" label="Port number:" label_width="75" | 64 | increment="1" initial_val="13000" label="Port number:" label_width="75" |
65 | left_delta="20" max_val="13050" min_val="13000" mouse_opaque="true" | 65 | left_delta="20" max_val="13050" min_val="13000" mouse_opaque="true" |
66 | name="connection_port" width="150" /> | 66 | name="connection_port" width="150" /> |
67 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
68 | bottom_delta="-24" drop_shadow_visible="true" enabled="true" | ||
69 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
70 | height="10" left="15" mouse_opaque="false" name="proxy_label" v_pad="0" | ||
71 | width="250"> | ||
72 | XMLRPC Proxy (Login, Land- and Money purchase): | ||
73 | </text> | ||
74 | <check_box bottom_delta="-25" enabled="true" | ||
75 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | ||
76 | label="Enable XMLRPC proxy" left_delta="199" mouse_opaque="true" | ||
77 | name="xmlrpc_proxy_enabled" radio_style="false" width="256" /> | ||
78 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
79 | bottom_delta="-25" drop_shadow_visible="true" enabled="true" | ||
80 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
81 | height="10" left="140" mouse_opaque="false" name="xmlrpc_proxy_text_label" | ||
82 | v_pad="0" width="128"> | ||
83 | Address: | ||
84 | </text> | ||
85 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" | ||
86 | height="20" left="217" name="xmlrpc_proxy_editor" | ||
87 | tool_tip="The name or IP address of the proxy you would like to use" | ||
88 | width="200" /> | ||
89 | <spinner bottom_delta="-25" decimal_digits="0" | ||
90 | enabled="true" follows="left|top" height="16" increment="1" | ||
91 | initial_val="80" label="Port number:" label_width="75" left="140" | ||
92 | max_val="12000" min_val="10" mouse_opaque="true" name="xmlrpc_proxy_port" | ||
93 | width="140" /> | ||
67 | </panel> | 94 | </panel> |
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 46283bb..727b142 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 | |||
@@ -34,6 +34,10 @@ | |||
34 | font="SansSerifSmall" height="16" initial_value="false" | 34 | font="SansSerifSmall" height="16" initial_value="false" |
35 | label="Accept cookies from sites" left="140" mouse_opaque="true" | 35 | label="Accept cookies from sites" left="140" mouse_opaque="true" |
36 | name="cookies_enabled" radio_style="false" width="256" /> | 36 | name="cookies_enabled" radio_style="false" width="256" /> |
37 | <button bottom_delta="-20" enabled="true" follows="left|top" font="SansSerif" | ||
38 | halign="center" height="18" label="Clear Cookies" left_delta="0" | ||
39 | tool_tip="Clear Cookies" | ||
40 | mouse_opaque="true" name="clear_ookies" scale_image="true" width="110" /> | ||
37 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 41 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
38 | bottom_delta="-24" drop_shadow_visible="true" enabled="true" | 42 | bottom_delta="-24" drop_shadow_visible="true" enabled="true" |
39 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 43 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" |