aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-07-05 20:07:38 -0700
committerMcCabe Maxsted2011-07-05 20:14:44 -0700
commit676beaab8d6f6717d15f4e6d30e08a428ba7c408 (patch)
treea2111ee0fa82b4d63266c87875276228ab81d19b /linden
parentAdded debug setting KeepUnpackedCacheFiles to keep unpacked script, sound, an... (diff)
downloadmeta-impy-676beaab8d6f6717d15f4e6d30e08a428ba7c408.zip
meta-impy-676beaab8d6f6717d15f4e6d30e08a428ba7c408.tar.gz
meta-impy-676beaab8d6f6717d15f4e6d30e08a428ba7c408.tar.bz2
meta-impy-676beaab8d6f6717d15f4e6d30e08a428ba7c408.tar.xz
Added clear sounds cache option
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/floatercache.cpp5
-rw-r--r--linden/indra/newview/llappviewer.cpp7
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml7
4 files changed, 27 insertions, 3 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 3d38a18..74750a6 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -2640,6 +2640,17 @@
2640 <key>Value</key> 2640 <key>Value</key>
2641 <integer>0</integer> 2641 <integer>0</integer>
2642 </map> 2642 </map>
2643 <key>ClearSoundsCache</key>
2644 <map>
2645 <key>Comment</key>
2646 <string>Clear cached sounds</string>
2647 <key>Persist</key>
2648 <integer>1</integer>
2649 <key>Type</key>
2650 <string>Boolean</string>
2651 <key>Value</key>
2652 <integer>0</integer>
2653 </map>
2643 2654
2644 <!-- End: clear cache --> 2655 <!-- End: clear cache -->
2645 2656
diff --git a/linden/indra/newview/floatercache.cpp b/linden/indra/newview/floatercache.cpp
index 3d3091f..211fd5a 100644
--- a/linden/indra/newview/floatercache.cpp
+++ b/linden/indra/newview/floatercache.cpp
@@ -53,6 +53,7 @@ BOOL FloaterCache::postBuild()
53 getChild<LLCheckBoxCtrl>("object_cache")->setValue(gSavedSettings.getBOOL("ClearObjectCache")); 53 getChild<LLCheckBoxCtrl>("object_cache")->setValue(gSavedSettings.getBOOL("ClearObjectCache"));
54 getChild<LLCheckBoxCtrl>("inv_cache")->setValue(gSavedSettings.getBOOL("ClearInvCache")); 54 getChild<LLCheckBoxCtrl>("inv_cache")->setValue(gSavedSettings.getBOOL("ClearInvCache"));
55 getChild<LLCheckBoxCtrl>("name_cache")->setValue(gSavedSettings.getBOOL("ClearNameCache")); 55 getChild<LLCheckBoxCtrl>("name_cache")->setValue(gSavedSettings.getBOOL("ClearNameCache"));
56 getChild<LLCheckBoxCtrl>("sounds_cache")->setValue(gSavedSettings.getBOOL("ClearSoundsCache"));
56 57
57 childSetAction("btn_ok", onClickOK, this); 58 childSetAction("btn_ok", onClickOK, this);
58 childSetAction("btn_cancel", onClickCancel, this); 59 childSetAction("btn_cancel", onClickCancel, this);
@@ -70,13 +71,15 @@ void FloaterCache::onClickOK(void* data)
70 bool purge_objects = self->getChild<LLCheckBoxCtrl>("object_cache")->getValue().asBoolean(); 71 bool purge_objects = self->getChild<LLCheckBoxCtrl>("object_cache")->getValue().asBoolean();
71 bool purge_inv = self->getChild<LLCheckBoxCtrl>("inv_cache")->getValue().asBoolean(); 72 bool purge_inv = self->getChild<LLCheckBoxCtrl>("inv_cache")->getValue().asBoolean();
72 bool purge_names = self->getChild<LLCheckBoxCtrl>("name_cache")->getValue().asBoolean(); 73 bool purge_names = self->getChild<LLCheckBoxCtrl>("name_cache")->getValue().asBoolean();
74 bool purge_sounds = self->getChild<LLCheckBoxCtrl>("sounds_cache")->getValue().asBoolean();
73 75
74 gSavedSettings.setBOOL("ClearTextureCache", purge_textures); 76 gSavedSettings.setBOOL("ClearTextureCache", purge_textures);
75 gSavedSettings.setBOOL("ClearObjectCache", purge_objects); 77 gSavedSettings.setBOOL("ClearObjectCache", purge_objects);
76 gSavedSettings.setBOOL("ClearInvCache", purge_inv); 78 gSavedSettings.setBOOL("ClearInvCache", purge_inv);
77 gSavedSettings.setBOOL("ClearNameCache", purge_names); 79 gSavedSettings.setBOOL("ClearNameCache", purge_names);
80 gSavedSettings.setBOOL("ClearSoundsCache", purge_sounds);
78 81
79 if (purge_textures || purge_objects || purge_inv || purge_names) 82 if (purge_textures || purge_objects || purge_inv || purge_names || purge_sounds)
80 { 83 {
81 // flag client cache for clearing next time the client runs 84 // flag client cache for clearing next time the client runs
82 gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); 85 gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index c10c79b..5a398a5 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -3238,6 +3238,13 @@ void LLAppViewer::purgeCache()
3238 3238
3239 gSavedSettings.setBOOL("ClearNameCache", FALSE); 3239 gSavedSettings.setBOOL("ClearNameCache", FALSE);
3240 } 3240 }
3241
3242 if (gSavedSettings.getBOOL("ClearSoundsCache"))
3243 {
3244 removeCacheFiles("*.wav");
3245 removeCacheFiles("*.dsf");
3246 gSavedSettings.setBOOL("ClearSoundsCache", FALSE);
3247 }
3241 } 3248 }
3242} 3249}
3243 3250
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml b/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml
index e965b28..7974d85 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-175" can_close="true" can_drag_on_left="false" can_minimize="true" 2<floater bottom="-200" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" follows="left|top" mouse_opaque="true" height="175" width="200" 3 can_resize="false" follows="left|top" mouse_opaque="true" height="200" width="200"
4 name="Clear Cache" title="Clear Disk Cache"> 4 name="Clear Cache" title="Clear Disk Cache">
5 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 5 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
6 bottom="-39" drop_shadow_visible="true" follows="left|top" font-style="BOLD|SHADOW" 6 bottom="-39" drop_shadow_visible="true" follows="left|top" font-style="BOLD|SHADOW"
@@ -19,6 +19,9 @@ You Restart Imprudence
19 initial_value="false" label="Clear inventory cache" left_delta="0" 19 initial_value="false" label="Clear inventory cache" left_delta="0"
20 mouse_opaque="true" name="inv_cache" width="185" /> 20 mouse_opaque="true" name="inv_cache" width="185" />
21 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20" 21 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20"
22 initial_value="false" label="Clear sound cache" left_delta="0"
23 mouse_opaque="true" name="sounds_cache" width="185" />
24 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20"
22 initial_value="false" label="Clear avatar name cache" left_delta="0" 25 initial_value="false" label="Clear avatar name cache" left_delta="0"
23 mouse_opaque="true" name="name_cache" width="185" /> 26 mouse_opaque="true" name="name_cache" width="185" />
24 <button bottom_delta="-30" follows="right|top" font="SansSerif" halign="center" height="22" 27 <button bottom_delta="-30" follows="right|top" font="SansSerif" halign="center" height="22"