diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-03-20 16:29:48 -0600 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-03-20 16:29:48 -0600 |
| commit | 933691ad133b552be3fdd26b0d9d26a09c3a7aa5 (patch) | |
| tree | 013fc4663d69057b5f3eff589b33d840e57b8115 /indra/newview/llviewermenu.cpp | |
| parent | 041024e8e5d1f27ab77dc4fa2c1e38b8266e7b41 (diff) | |
for SH-4004: interesting: need debug option to clear viewer cache while still logged in
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9a0cb432be..d66287f172 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7572,6 +7572,23 @@ void handle_web_browser_test(const LLSD& param) LLWeb::loadURLInternal(url); } +bool callback_clear_cache_immediately(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( option == 0 ) // YES + { + //clear cache + LLAppViewer::instance()->purgeCacheImmediate(); + } + + return false; +} + +void handle_cache_clear_immediately() +{ + LLNotificationsUtil::add("ConfirmClearCache", LLSD(), LLSD(), callback_clear_cache_immediately); +} + void handle_web_content_test(const LLSD& param) { std::string url = param.asString(); @@ -8492,6 +8509,8 @@ void initialize_menus() //Develop (Texture Fetch Debug Console) view_listener_t::addMenu(new LLDevelopTextureFetchDebugger(), "Develop.SetTexFetchDebugger"); + //Develop (clear cache immediately) + commit.add("Develop.ClearCache", boost::bind(&handle_cache_clear_immediately) ); // Admin >Object view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy"); |
