summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index e998d10fcc..3487f52f35 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -183,7 +183,6 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data)
// a static member and update all our static callbacks
void handleNameTagOptionChanged(const LLSD& newvalue);
-viewer_media_t get_web_media();
bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response);
//bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater);
@@ -191,23 +190,14 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
-viewer_media_t get_web_media()
-{
- viewer_media_t media_source = LLViewerMedia::newMediaImpl(LLUUID::null);
- media_source->initializeMedia("text/html");
- return media_source;
-}
-
-
bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if ( option == 0 ) // YES
{
// clean web
- viewer_media_t media_source = get_web_media();
- if (media_source && media_source->hasMedia())
- media_source->getMediaPlugin()->clear_cache();
+ LLViewerMedia::clearAllCaches();
+ LLViewerMedia::clearAllCookies();
// clean nav bar history
LLNavigationBar::getInstance()->clearHistoryCache();
@@ -429,17 +419,14 @@ void LLFloaterPreference::apply()
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
childSetText("cache_location", cache_location);
- viewer_media_t media_source = get_web_media();
- if (media_source && media_source->hasMedia())
+ LLViewerMedia::setCookiesEnabled(childGetValue("cookies_enabled"));
+
+ if(hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port"))
{
- media_source->getMediaPlugin()->enable_cookies(childGetValue("cookies_enabled"));
- if(hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port"))
- {
- bool proxy_enable = childGetValue("web_proxy_enabled");
- std::string proxy_address = childGetValue("web_proxy_editor");
- int proxy_port = childGetValue("web_proxy_port");
- media_source->getMediaPlugin()->proxy_setup(proxy_enable, proxy_address, proxy_port);
- }
+ bool proxy_enable = childGetValue("web_proxy_enabled");
+ std::string proxy_address = childGetValue("web_proxy_editor");
+ int proxy_port = childGetValue("web_proxy_port");
+ LLViewerMedia::setProxyConfig(proxy_enable, proxy_address, proxy_port);
}
// LLWString busy_response = utf8str_to_wstring(getChild<LLUICtrl>("busy_response")->getValue().asString());