summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-04-16 23:45:35 +0000
committerAdam Moss <moss@lindenlab.com>2009-04-16 23:45:35 +0000
commitb01c75cb423f07a3d3354f8bd62f265f80062b3b (patch)
treedec1b220c24a60cc220d1cb07fd3545610644f0a /indra/newview/llviewermenu.cpp
parent868250bdd74f348557102c0d8408d9bec30331f6 (diff)
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1 QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp124
1 files changed, 68 insertions, 56 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 96a4f74927..4fd0c8dc8a 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -762,7 +762,7 @@ void init_client_menu(LLMenuGL* menu)
/*menu->append(new LLMenuItemCallGL("Reload settings/colors",
&handle_reload_settings, NULL, NULL));*/
menu->append(new LLMenuItemCallGL("Reload personal setting overrides",
- &reload_personal_settings_overrides, NULL, NULL, KEY_F2, MASK_CONTROL|MASK_SHIFT));
+ &reload_personal_settings_overrides, NULL, NULL, KEY_F12, MASK_CONTROL|MASK_SHIFT));
sub_menu = new LLMenuGL("HUD Info");
{
@@ -1084,94 +1084,95 @@ void init_debug_rendering_menu(LLMenuGL* menu)
//
sub_menu = new LLMenuGL("Types");
menu->appendMenu(sub_menu);
-
+
sub_menu->append(new LLMenuItemCheckGL("Simple",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_SIMPLE, '1', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_SIMPLE, '1', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Alpha",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_ALPHA, '2', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_ALPHA, '2', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Tree",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_TREE, '3', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_TREE, '3', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Character",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_AVATAR, '4', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_AVATAR, '4', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("SurfacePatch",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_TERRAIN, '5', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_TERRAIN, '5', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Sky",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_SKY, '6', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_SKY, '6', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Water",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_WATER, '7', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_WATER, '7', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Ground",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_GROUND, '8', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_GROUND, '8', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Volume",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_VOLUME, '9', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_VOLUME, '9', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Grass",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_GRASS, '0', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_GRASS, '0', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Clouds",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_CLOUDS, '-', MASK_CONTROL|MASK_ALT| MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_CLOUDS, '-', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Particles",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_PARTICLES, '=', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_PARTICLES, '`', MASK_ALT|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Bump",
&LLPipeline::toggleRenderTypeControl, NULL,
&LLPipeline::hasRenderTypeControl,
- (void*)LLPipeline::RENDER_TYPE_BUMP, '\\', MASK_CONTROL|MASK_ALT|MASK_SHIFT));
+ (void*)LLPipeline::RENDER_TYPE_BUMP, '\\', MASK_ALT|MASK_SHIFT));
+
sub_menu->createJumpKeys();
sub_menu = new LLMenuGL("Features");
menu->appendMenu(sub_menu);
sub_menu->append(new LLMenuItemCheckGL("UI",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, KEY_F1, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, KEY_F1, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Selected",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, KEY_F2, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, KEY_F2, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Highlighted",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, KEY_F3, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, KEY_F3, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Dynamic Textures",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, KEY_F4, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, KEY_F4, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL( "Foot Shadows",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, KEY_F5, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, KEY_F5, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Fog",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL("Test FRInfo",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, KEY_F8, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, KEY_F8, MASK_CONTROL|MASK_SHIFT));
sub_menu->append(new LLMenuItemCheckGL( "Flexible Objects",
&LLPipeline::toggleRenderDebugFeature, NULL,
&LLPipeline::toggleRenderDebugFeatureControl,
- (void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, KEY_F9, MASK_ALT|MASK_CONTROL));
+ (void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, KEY_F9, MASK_CONTROL|MASK_SHIFT));
sub_menu->createJumpKeys();
/////////////////////////////
@@ -1328,8 +1329,11 @@ void init_debug_avatar_menu(LLMenuGL* menu)
menu->appendMenu(sub_menu);
sub_menu = new LLMenuGL("Character Tests");
- sub_menu->append(new LLMenuItemToggleGL("Go Away/AFK When Idle",
- &gAllowIdleAFK));
+ sub_menu->append(new LLMenuItemCheckGL("Go Away/AFK When Idle",
+ menu_toggle_control,
+ NULL,
+ menu_check_control,
+ (void*)"AllowIdleAFK"));
sub_menu->append(new LLMenuItemCallGL("Appearance To XML",
&LLVOAvatar::dumpArchetypeXML));
@@ -4730,25 +4734,29 @@ class LLWorldSetBusy : public view_listener_t
}
};
+bool can_create_landmark()
+{
+ BOOL can = FALSE;
+
+ LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (agent_parcel)
+ {
+
+ if (agent_parcel->getAllowLandmark()
+ || LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
+ {
+ can = TRUE;
+ }
+ }
+
+ return can;
+}
class LLWorldCreateLandmark : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- LLViewerRegion* agent_region = gAgent.getRegion();
- if(!agent_region)
- {
- llwarns << "No agent region" << llendl;
- return true;
- }
- LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (!agent_parcel)
- {
- llwarns << "No agent parcel" << llendl;
- return true;
- }
- if (!agent_parcel->getAllowLandmark()
- && !LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
+ if (!can_create_landmark())
{
LLNotifications::instance().add("CannotCreateLandmarkNotOwner");
return true;
@@ -6284,25 +6292,28 @@ class LLToolsEnableTakeCopy : public view_listener_t
bool all_valid = false;
if (LLSelectMgr::getInstance())
{
- all_valid = true;
+ if (!LLSelectMgr::getInstance()->getSelection()->isEmpty())
+ {
+ all_valid = true;
#ifndef HACKED_GODLIKE_VIEWER
# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
- if (LLViewerLogin::getInstance()->isInProductionGrid()
- || !gAgent.isGodlike())
+ if (LLViewerLogin::getInstance()->isInProductionGrid()
+ || !gAgent.isGodlike())
# endif
- {
- struct f : public LLSelectedObjectFunctor
{
- virtual bool apply(LLViewerObject* obj)
+ struct f : public LLSelectedObjectFunctor
{
- return (!obj->permCopy() || obj->isAttachment());
- }
- } func;
- const bool firstonly = true;
- bool any_invalid = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
- all_valid = !any_invalid;
- }
+ virtual bool apply(LLViewerObject* obj)
+ {
+ return (!obj->permCopy() || obj->isAttachment());
+ }
+ } func;
+ const bool firstonly = true;
+ bool any_invalid = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
+ all_valid = !any_invalid;
+ }
#endif // HACKED_GODLIKE_VIEWER
+ }
}
gMenuHolder->findControl(userdata["control"].asString())->setValue(all_valid);
@@ -6496,9 +6507,10 @@ class LLWorldEnableCreateLandmark : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- bool new_value = gAgent.isGodlike() ||
- (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark());
+ bool new_value = can_create_landmark();
+
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
+
return true;
}
};
@@ -7544,8 +7556,8 @@ void initialize_menus()
addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");
addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake");
addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy");
- addMenu(new LLToolsEnableSaveToInventory(), "Tools.SaveToInventory");
- addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.SaveToObjectInventory");
+ addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory");
+ addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
/*addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject");
addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/