diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-11-12 17:34:30 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-11-12 17:34:30 -0500 |
commit | 3ea3d4cf16894c928cd60c19429dbec158185f96 (patch) | |
tree | c6331ca9eb06764e1d8109b6d90002ee34507d04 /indra/newview/llviewermenu.cpp | |
parent | d9c0e0ba74d3f042ae7f3a7310f0c0bf23e6eaa9 (diff) | |
parent | 63466f0ecae64cad8d2f74ccd1ade29121a26a95 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3c850c8b13..1fa99b4a8a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1968,6 +1968,16 @@ class LLAdvancedShowDebugSettings : public view_listener_t // VIEW ADMIN OPTIONS // //////////////////////// +class LLAdvancedEnableViewAdminOptions : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Don't enable in god mode since the admin menu is shown anyway. + // Only enable if the user has set the appropriate debug setting. + bool new_value = !gAgent.getAgentAccess().isGodlikeWithoutAdminMenuFakery() && gSavedSettings.getBOOL("AdminMenu"); + return new_value; + } +}; class LLAdvancedToggleViewAdminOptions : public view_listener_t { @@ -1982,7 +1992,7 @@ class LLAdvancedCheckViewAdminOptions : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = check_admin_override(NULL); + bool new_value = check_admin_override(NULL) || gAgent.isGodlike(); return new_value; } }; @@ -8007,6 +8017,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates"); view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage"); view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings"); + view_listener_t::addMenu(new LLAdvancedEnableViewAdminOptions(), "Advanced.EnableViewAdminOptions"); view_listener_t::addMenu(new LLAdvancedToggleViewAdminOptions(), "Advanced.ToggleViewAdminOptions"); view_listener_t::addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); view_listener_t::addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); |