diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 37be33e564..1a6a62c368 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -257,6 +257,20 @@ bool callback_clear_inventory_cache(const LLSD& notification, const LLSD& respon } // +// Clear inventory cache button +bool callback_clear_web_browser_cache(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( option == 0 ) // YES + { + LLViewerMedia::clearAllCaches(); + LLViewerMedia::clearAllCookies(); + } + + return false; +} +// + bool callback_clear_cache(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -450,6 +464,9 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) // Clear inventory cache button mCommitCallbackRegistrar.add("Pref.InvClearCache", boost::bind(&LLFloaterPreference::onClickInventoryClearCache, this)); // + // Clear web browser cache button + mCommitCallbackRegistrar.add("Pref.WebBrowserClearCache", boost::bind(&LLFloaterPreference::onClickWebBrowserClearCache, this)); + // mCommitCallbackRegistrar.add("Pref.SetCache", boost::bind(&LLFloaterPreference::onClickSetCache, this)); mCommitCallbackRegistrar.add("Pref.ResetCache", boost::bind(&LLFloaterPreference::onClickResetCache, this)); // mCommitCallbackRegistrar.add("Pref.ClickSkin", boost::bind(&LLFloaterPreference::onClickSkin, this,_1, _2)); @@ -1210,6 +1227,13 @@ void LLFloaterPreference::onClickInventoryClearCache() } // +// Clear web browser cache button +void LLFloaterPreference::onClickWebBrowserClearCache() +{ + LLNotificationsUtil::add("ConfirmClearWebBrowserCache", LLSD(), LLSD(), callback_clear_web_browser_cache); +} +// + // Called when user changes language via the combobox. void LLFloaterPreference::onLanguageChange() { @@ -2227,6 +2251,9 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im // Clear inventory cache button getChildView("ClearInventoryCache")->setEnabled(TRUE); + + // Clear web browser cache button + getChildView("ClearWebBrowserCache")->setEnabled(TRUE); } void LLFloaterPreference::refreshUI() diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index a9ab82d635..3c55ec11d1 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -204,6 +204,8 @@ public: //void callback_clear_settings(const LLSD& notification, const LLSD& response); // Clear inventory cache button void onClickInventoryClearCache(); + // Clear web browser cache button + void onClickWebBrowserClearCache(); void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box); void refreshUI(); diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 7b3591046e..d7839d3d32 100755 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -2293,6 +2293,10 @@ Möchten Sie den Nicht-stören-Modus deaktivieren, bevor Sie diese Transaktion a Möchten Sie Ihren Inventar-Cache wirklich leeren? + + Möchten Sie Ihren Webbrowser-Cache wirklich leeren? + + Sind Sie sicher, dass Sie Ihre Cookies löschen möchten? diff --git a/indra/newview/skins/default/xui/de/panel_preferences_setup.xml b/indra/newview/skins/default/xui/de/panel_preferences_setup.xml index 64d1c3eaf1..eb48297a03 100755 --- a/indra/newview/skins/default/xui/de/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_setup.xml @@ -69,6 +69,7 @@ + +