diff options
author | Aleric Inglewood | 2010-10-19 21:14:03 +0200 |
---|---|---|
committer | Aleric Inglewood | 2010-10-19 21:16:10 +0200 |
commit | 6f52903897ccb2ddd88049cd3137cf554ef45621 (patch) | |
tree | cb3caa0fc2f8ceebd8b0808335d9f4ba12ae1ba6 /linden/indra | |
parent | Forgot QtWebKit and Qt plugins in last commit. (diff) | |
download | meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.zip meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.tar.gz meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.tar.bz2 meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.tar.xz |
Sync LLViewerMediaImpl::newSourceFromMediaType with SG2
Also renamed CookiesEnabled to BrowswerCookiesEnabled.
Added BrowserJavascriptEnabled, BrowserPluginsEnabled and
PluginAttachDebuggerToPlugins.
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 55 | ||||
-rw-r--r-- | linden/indra/newview/llpanelweb.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/llviewermedia.cpp | 37 |
3 files changed, 82 insertions, 16 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 57ed4c0..417ddc3 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -2612,6 +2612,39 @@ | |||
2612 | <key>Value</key> | 2612 | <key>Value</key> |
2613 | <integer>0</integer> | 2613 | <integer>0</integer> |
2614 | </map> | 2614 | </map> |
2615 | <key>BrowserCookiesEnabled</key> | ||
2616 | <map> | ||
2617 | <key>Comment</key> | ||
2618 | <string>Accept cookies from Web sites?</string> | ||
2619 | <key>Persist</key> | ||
2620 | <integer>1</integer> | ||
2621 | <key>Type</key> | ||
2622 | <string>Boolean</string> | ||
2623 | <key>Value</key> | ||
2624 | <integer>1</integer> | ||
2625 | </map> | ||
2626 | <key>BrowserJavascriptEnabled</key> | ||
2627 | <map> | ||
2628 | <key>Comment</key> | ||
2629 | <string>Enable Javascript in the built-in Web browser?</string> | ||
2630 | <key>Persist</key> | ||
2631 | <integer>1</integer> | ||
2632 | <key>Type</key> | ||
2633 | <string>Boolean</string> | ||
2634 | <key>Value</key> | ||
2635 | <integer>1</integer> | ||
2636 | </map> | ||
2637 | <key>BrowserPluginsEnabled</key> | ||
2638 | <map> | ||
2639 | <key>Comment</key> | ||
2640 | <string>Enable Web plugins in the built-in Web browser?</string> | ||
2641 | <key>Persist</key> | ||
2642 | <integer>1</integer> | ||
2643 | <key>Type</key> | ||
2644 | <string>Boolean</string> | ||
2645 | <key>Value</key> | ||
2646 | <integer>1</integer> | ||
2647 | </map> | ||
2615 | <key>BrowserProxyAddress</key> | 2648 | <key>BrowserProxyAddress</key> |
2616 | <map> | 2649 | <map> |
2617 | <key>Comment</key> | 2650 | <key>Comment</key> |
@@ -4050,17 +4083,6 @@ | |||
4050 | <key>Value</key> | 4083 | <key>Value</key> |
4051 | <integer>0</integer> | 4084 | <integer>0</integer> |
4052 | </map> | 4085 | </map> |
4053 | <key>CookiesEnabled</key> | ||
4054 | <map> | ||
4055 | <key>Comment</key> | ||
4056 | <string>Accept cookies from Web sites?</string> | ||
4057 | <key>Persist</key> | ||
4058 | <integer>1</integer> | ||
4059 | <key>Type</key> | ||
4060 | <string>Boolean</string> | ||
4061 | <key>Value</key> | ||
4062 | <integer>1</integer> | ||
4063 | </map> | ||
4064 | <key>CreateToolCopyCenters</key> | 4086 | <key>CreateToolCopyCenters</key> |
4065 | <map> | 4087 | <map> |
4066 | <key>Comment</key> | 4088 | <key>Comment</key> |
@@ -8460,6 +8482,17 @@ | |||
8460 | <key>Value</key> | 8482 | <key>Value</key> |
8461 | <integer>1</integer> | 8483 | <integer>1</integer> |
8462 | </map> | 8484 | </map> |
8485 | <key>PluginAttachDebuggerToPlugins</key> | ||
8486 | <map> | ||
8487 | <key>Comment</key> | ||
8488 | <string>If true, attach a debugger session to each plugin process as it's launched.</string> | ||
8489 | <key>Persist</key> | ||
8490 | <integer>1</integer> | ||
8491 | <key>Type</key> | ||
8492 | <string>Boolean</string> | ||
8493 | <key>Value</key> | ||
8494 | <integer>0</integer> | ||
8495 | </map> | ||
8463 | <key>PrecachingDelay</key> | 8496 | <key>PrecachingDelay</key> |
8464 | <map> | 8497 | <map> |
8465 | <key>Comment</key> | 8498 | <key>Comment</key> |
diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp index e2933f0..14df239 100644 --- a/linden/indra/newview/llpanelweb.cpp +++ b/linden/indra/newview/llpanelweb.cpp | |||
@@ -68,7 +68,7 @@ BOOL LLPanelWeb::postBuild() | |||
68 | std::string value = gSavedSettings.getBOOL("UseExternalBrowser") ? "external" : "internal"; | 68 | std::string value = gSavedSettings.getBOOL("UseExternalBrowser") ? "external" : "internal"; |
69 | childSetValue("use_external_browser", value); | 69 | childSetValue("use_external_browser", value); |
70 | 70 | ||
71 | childSetValue("cookies_enabled", gSavedSettings.getBOOL("CookiesEnabled")); | 71 | childSetValue("cookies_enabled", gSavedSettings.getBOOL("BrowserCookiesEnabled")); |
72 | 72 | ||
73 | childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); | 73 | childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); |
74 | childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); | 74 | childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); |
@@ -101,7 +101,7 @@ LLPanelWeb::~LLPanelWeb() | |||
101 | 101 | ||
102 | void LLPanelWeb::apply() | 102 | void LLPanelWeb::apply() |
103 | { | 103 | { |
104 | gSavedSettings.setBOOL("CookiesEnabled", childGetValue("cookies_enabled")); | 104 | gSavedSettings.setBOOL("BrowserCookiesEnabled", childGetValue("cookies_enabled")); |
105 | gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled")); | 105 | gSavedSettings.setBOOL("BrowserProxyEnabled", childGetValue("web_proxy_enabled")); |
106 | gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor")); | 106 | gSavedSettings.setString("BrowserProxyAddress", childGetValue("web_proxy_editor")); |
107 | gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port")); | 107 | gSavedSettings.setS32("BrowserProxyPort", childGetValue("web_proxy_port")); |
@@ -224,4 +224,4 @@ void LLPanelWeb::onClickClear(void* user_data) | |||
224 | { | 224 | { |
225 | LLPanelWeb* self = (LLPanelWeb*)user_data; | 225 | LLPanelWeb* self = (LLPanelWeb*)user_data; |
226 | self->childSetValue("world_search_editor","") ; | 226 | self->childSetValue("world_search_editor","") ; |
227 | } \ No newline at end of file | 227 | } |
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index 8c5cf6a..57c2111 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp | |||
@@ -466,6 +466,19 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ | |||
466 | std::string user_data_path = gDirUtilp->getOSUserAppDir(); | 466 | std::string user_data_path = gDirUtilp->getOSUserAppDir(); |
467 | user_data_path += gDirUtilp->getDirDelimiter(); | 467 | user_data_path += gDirUtilp->getDirDelimiter(); |
468 | 468 | ||
469 | // Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.) | ||
470 | // If the linden username returned is blank, that can only mean we are | ||
471 | // at the login page displaying login Web page or Web browser test via Develop menu. | ||
472 | // In this case we just use whatever gDirUtilp->getOSUserAppDir() gives us (this | ||
473 | // is what we always used before this change) | ||
474 | std::string linden_user_dir = gDirUtilp->getLindenUserDir(); | ||
475 | if ( ! linden_user_dir.empty() ) | ||
476 | { | ||
477 | // gDirUtilp->getLindenUserDir() is whole path, not just Linden name | ||
478 | user_data_path = linden_user_dir; | ||
479 | user_data_path += gDirUtilp->getDirDelimiter(); | ||
480 | } | ||
481 | |||
469 | // See if the plugin executable exists | 482 | // See if the plugin executable exists |
470 | llstat s; | 483 | llstat s; |
471 | if(LLFile::stat(launcher_name, &s)) | 484 | if(LLFile::stat(launcher_name, &s)) |
@@ -480,7 +493,22 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ | |||
480 | { | 493 | { |
481 | LLPluginClassMedia* media_source = new LLPluginClassMedia(owner); | 494 | LLPluginClassMedia* media_source = new LLPluginClassMedia(owner); |
482 | media_source->setSize(default_width, default_height); | 495 | media_source->setSize(default_width, default_height); |
483 | if (media_source->init(launcher_name, plugin_name, false)) | 496 | media_source->setUserDataPath(user_data_path); |
497 | media_source->setLanguageCode(LLUI::getLanguage()); | ||
498 | |||
499 | // collect 'cookies enabled' setting from prefs and send to embedded browser | ||
500 | bool cookies_enabled = gSavedSettings.getBOOL( "BrowserCookiesEnabled" ); | ||
501 | media_source->enable_cookies( cookies_enabled ); | ||
502 | |||
503 | // collect 'plugins enabled' setting from prefs and send to embedded browser | ||
504 | bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" ); | ||
505 | media_source->setPluginsEnabled( plugins_enabled ); | ||
506 | |||
507 | // collect 'javascript enabled' setting from prefs and send to embedded browser | ||
508 | bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); | ||
509 | media_source->setJavascriptEnabled( javascript_enabled ); | ||
510 | |||
511 | if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) | ||
484 | { | 512 | { |
485 | return media_source; | 513 | return media_source; |
486 | } | 514 | } |
@@ -491,7 +519,12 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ | |||
491 | } | 519 | } |
492 | } | 520 | } |
493 | } | 521 | } |
494 | 522 | ||
523 | LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL; | ||
524 | LLSD args; | ||
525 | args["MIME_TYPE"] = media_type; | ||
526 | LLNotifications::instance().add("NoPlugin", args); | ||
527 | |||
495 | return NULL; | 528 | return NULL; |
496 | } | 529 | } |
497 | 530 | ||