FIRE-2107: Added button to clear internal web browser cache to "Network & Cache" preferences panel
parent
3ca2f34019
commit
e73d6e7f02
|
|
@ -257,6 +257,20 @@ bool callback_clear_inventory_cache(const LLSD& notification, const LLSD& respon
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> 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;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
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)
|
|||
// <FS:Ansariel> Clear inventory cache button
|
||||
mCommitCallbackRegistrar.add("Pref.InvClearCache", boost::bind(&LLFloaterPreference::onClickInventoryClearCache, this));
|
||||
// </FS:Ansariel>
|
||||
// <FS:Ansariel> Clear web browser cache button
|
||||
mCommitCallbackRegistrar.add("Pref.WebBrowserClearCache", boost::bind(&LLFloaterPreference::onClickWebBrowserClearCache, this));
|
||||
// </FS:Ansariel>
|
||||
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()
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> Clear web browser cache button
|
||||
void LLFloaterPreference::onClickWebBrowserClearCache()
|
||||
{
|
||||
LLNotificationsUtil::add("ConfirmClearWebBrowserCache", LLSD(), LLSD(), callback_clear_web_browser_cache);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Called when user changes language via the combobox.
|
||||
void LLFloaterPreference::onLanguageChange()
|
||||
{
|
||||
|
|
@ -2227,6 +2251,9 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
|
|||
|
||||
// <FS:Ansariel> Clear inventory cache button
|
||||
getChildView("ClearInventoryCache")->setEnabled(TRUE);
|
||||
|
||||
// <FS:Ansariel> Clear web browser cache button
|
||||
getChildView("ClearWebBrowserCache")->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
void LLFloaterPreference::refreshUI()
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ public:
|
|||
//void callback_clear_settings(const LLSD& notification, const LLSD& response);
|
||||
// <FS:Ansariel> Clear inventory cache button
|
||||
void onClickInventoryClearCache();
|
||||
// <FS:Ansariel> Clear web browser cache button
|
||||
void onClickWebBrowserClearCache();
|
||||
|
||||
void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
|
||||
void refreshUI();
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
|
||||
</notification>
|
||||
<notification name="ConfirmClearWebBrowserCache">
|
||||
Möchten Sie Ihren Webbrowser-Cache wirklich leeren?
|
||||
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
|
||||
</notification>
|
||||
<notification name="ConfirmClearCookies">
|
||||
Sind Sie sicher, dass Sie Ihre Cookies löschen möchten?
|
||||
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="Ja"/>
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
<combo_box.item label="Fünf Fenster" name="web_5"/>
|
||||
<combo_box.item label="Zehn Fenster" name="web_10"/>
|
||||
</combo_box>
|
||||
<button label="Webbrowser-Cache löschen" name="ClearWebBrowserCache" width="160"/>
|
||||
<check_box initial_value="true" label="Plugins aktivieren" name="browser_plugins_enabled"/>
|
||||
<check_box initial_value="true" label="Cookies annehmen" name="cookies_enabled"/>
|
||||
<check_box initial_value="true" label="Javascript aktivieren" name="browser_javascript_enabled"/>
|
||||
|
|
|
|||
|
|
@ -5662,6 +5662,18 @@ Are you sure you want to clear your inventory cache?
|
|||
notext="Cancel"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ConfirmClearWebBrowserCache"
|
||||
type="alertmodal">
|
||||
Are you sure you want to clear your web browser cache?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
notext="Cancel"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
|
|
|
|||
|
|
@ -524,6 +524,20 @@
|
|||
value="10" />
|
||||
</combo_box>
|
||||
|
||||
<button
|
||||
enabled="false"
|
||||
follows="right|top"
|
||||
height="23"
|
||||
label="Clear Browser Cache"
|
||||
layout="topleft"
|
||||
right="-10"
|
||||
name="ClearWebBrowserCache"
|
||||
top_delta="0"
|
||||
width="140">
|
||||
<button.commit_callback
|
||||
function="Pref.WebBrowserClearCache" />
|
||||
</button>
|
||||
|
||||
<check_box
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
|
|
@ -531,7 +545,7 @@
|
|||
initial_value="true"
|
||||
control_name="BrowserPluginsEnabled"
|
||||
label="Enable plugins"
|
||||
left_delta="0"
|
||||
left="25"
|
||||
mouse_opaque="true"
|
||||
name="browser_plugins_enabled"
|
||||
radio_style="false"
|
||||
|
|
|
|||
Loading…
Reference in New Issue