summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-06 18:31:52 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-06 18:31:52 -0500
commit9c048d12fdd9fd9c95cc93223fc731ee7b548294 (patch)
tree4d6e91028b4ab48b6600c34f9cf126610fbce690 /indra/newview/llviewermenu.cpp
parent2aa981ac23bbdf2fd609e04434179be0cfec79ce (diff)
parentf3bbcfb9d41b41f8c4b144ae9a1173fc7719b88c (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp185
1 files changed, 38 insertions, 147 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index e2e0e00dcf..207f0e3f42 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -146,7 +146,6 @@
#include "llmenucommands.h"
#include "llmenugl.h"
#include "llmimetypes.h"
-#include "llmorphview.h"
#include "llmoveview.h"
#include "llmutelist.h"
#include "llnotify.h"
@@ -610,6 +609,14 @@ class LLAdvancedToggleConsole : public view_listener_t
{
toggle_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) );
}
+ else if (gTextureSizeView && "texture size" == console_type)
+ {
+ toggle_visibility( (void*)gTextureSizeView );
+ }
+ else if (gTextureCategoryView && "texture category" == console_type)
+ {
+ toggle_visibility( (void*)gTextureCategoryView );
+ }
else if ("fast timers" == console_type)
{
toggle_visibility( (void*)gDebugView->mFastTimerView );
@@ -637,6 +644,14 @@ class LLAdvancedCheckConsole : public view_listener_t
{
new_value = get_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) );
}
+ else if (gTextureSizeView && "texture size" == console_type)
+ {
+ new_value = get_visibility( (void*)gTextureSizeView );
+ }
+ else if (gTextureCategoryView && "texture category" == console_type)
+ {
+ new_value = get_visibility( (void*)gTextureCategoryView );
+ }
else if ("fast timers" == console_type)
{
new_value = get_visibility( (void*)gDebugView->mFastTimerView );
@@ -1161,28 +1176,6 @@ class LLAdvancedCheckWireframe : public view_listener_t
};
//////////////////////
-// DISABLE TEXTURES //
-//////////////////////
-
-class LLAdvancedToggleDisableTextures : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLViewerTexture::sDontLoadVolumeTextures = !LLViewerTexture::sDontLoadVolumeTextures;
- return true;
- }
-};
-
-class LLAdvancedCheckDisableTextures : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- bool new_value = LLViewerTexture::sDontLoadVolumeTextures; // <-- make this using LLCacheControl
- return new_value;
- }
-};
-
-//////////////////////
// TEXTURE ATLAS //
//////////////////////
@@ -1885,7 +1878,7 @@ class LLAdvancedRebakeTextures : public view_listener_t
};
-#ifndef LL_RELEASE_FOR_DOWNLOAD
+#if 1 //ndef LL_RELEASE_FOR_DOWNLOAD
///////////////////////////
// DEBUG AVATAR TEXTURES //
///////////////////////////
@@ -3445,26 +3438,13 @@ void handle_show_side_tray()
root->addChild(side_tray);
}
-class LLSelfFriends : public view_listener_t
+class LLShowPanelPeopleTab : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- // Open "Friends" tab of the "People" panel in side tray.
+ // Open tab of the "People" panel in side tray.
LLSD param;
- param["people_panel_tab_name"] = "friends_panel";
-
- LLSideTray::getInstance()->showPanel("panel_people", param);
- return true;
- }
-};
-
-class LLSelfGroups : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- // Open "Groups" tab of the "People" panel in side tray.
- LLSD param;
- param["people_panel_tab_name"] = "groups_panel";
+ param["people_panel_tab_name"] = userdata.asString();
LLSideTray::getInstance()->showPanel("panel_people", param);
return true;
}
@@ -3499,9 +3479,8 @@ void set_god_level(U8 god_level)
gAgent.setGodLevel( god_level );
LLViewerParcelMgr::getInstance()->notifyObservers();
- // God mode changes sim visibility
- LLWorldMap::getInstance()->reset();
- LLWorldMap::getInstance()->setCurrentLayer(0);
+ // God mode changes region visibility
+ LLWorldMap::getInstance()->reloadItems(true);
// inventory in items may change in god mode
gObjectList.dirtyAllObjectInventory();
@@ -4178,12 +4157,10 @@ void handle_take_copy()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
- LLUUID category_id =
- gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT);
+ const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id);
}
-
// You can return an object to its owner if it is on your land.
class LLObjectReturn : public view_listener_t
{
@@ -4264,7 +4241,7 @@ class LLObjectEnableReturn : public view_listener_t
void force_take_copy(void*)
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
- const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT);
+ const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
derez_objects(DRD_FORCE_TO_GOD_INVENTORY, category_id);
}
@@ -4325,8 +4302,7 @@ void handle_take()
if(category_id.notNull())
{
// check trash
- LLUUID trash;
- trash = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ const LLUUID trash = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
if(category_id == trash || gInventory.isObjectDescendentOf(category_id, trash))
{
category_id.setNull();
@@ -4342,7 +4318,7 @@ void handle_take()
}
if(category_id.isNull())
{
- category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT);
+ category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
}
LLSD payload;
payload["folder_id"] = category_id;
@@ -6921,7 +6897,7 @@ void handle_grab_texture(void* data)
LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl;
LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE;
LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE;
- LLUUID folder_id(gInventory.findCategoryUUIDForType(asset_type));
+ const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type));
if(folder_id.notNull())
{
std::string name = "Unknown";
@@ -7463,52 +7439,10 @@ class LLEditEnableTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- bool new_value = false;
- if (clothing == "shirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SHIRT);
- }
- if (clothing == "pants")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_PANTS);
- }
- if (clothing == "shoes")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SHOES);
- }
- if (clothing == "socks")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SOCKS);
- }
- if (clothing == "jacket")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_JACKET);
- }
- if (clothing == "gloves")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_GLOVES);
- }
- if (clothing == "undershirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT);
- }
- if (clothing == "underpants")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS);
- }
- if (clothing == "skirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SKIRT);
- }
- if (clothing == "alpha")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_ALPHA);
- }
- if (clothing == "tattoo")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_TATTOO);
- }
- return new_value;
+ EWearableType type = LLWearableDictionary::typeNameToType(clothing);
+ if (type >= WT_SHAPE && type < WT_COUNT)
+ return LLAgentWearables::selfHasWearable(type);
+ return false;
}
};
@@ -7517,53 +7451,13 @@ class LLEditTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- if (clothing == "shirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SHIRT);
- }
- else if (clothing == "pants")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_PANTS);
- }
- else if (clothing == "shoes")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SHOES);
- }
- else if (clothing == "socks")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SOCKS);
- }
- else if (clothing == "jacket")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_JACKET);
- }
- else if (clothing == "gloves")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_GLOVES);
- }
- else if (clothing == "undershirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT);
- }
- else if (clothing == "underpants")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS);
- }
- else if (clothing == "skirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SKIRT);
- }
- else if (clothing == "alpha")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_ALPHA);
- }
- else if (clothing == "tattoo")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_TATTOO);
- }
- else if (clothing == "all")
+ if (clothing == "all")
+ LLAgentWearables::userRemoveAllClothes();
+ else
{
- LLAgentWearables::userRemoveAllClothes(NULL);
+ EWearableType type = LLWearableDictionary::typeNameToType(clothing);
+ if (type >= WT_SHAPE && type < WT_COUNT)
+ LLAgentWearables::userRemoveWearable(type);
}
return true;
}
@@ -7878,8 +7772,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedSelectedTextureInfo(), "Advanced.SelectedTextureInfo");
view_listener_t::addMenu(new LLAdvancedToggleWireframe(), "Advanced.ToggleWireframe");
view_listener_t::addMenu(new LLAdvancedCheckWireframe(), "Advanced.CheckWireframe");
- view_listener_t::addMenu(new LLAdvancedToggleDisableTextures(), "Advanced.ToggleDisableTextures");
- view_listener_t::addMenu(new LLAdvancedCheckDisableTextures(), "Advanced.CheckDisableTextures");
view_listener_t::addMenu(new LLAdvancedToggleTextureAtlas(), "Advanced.ToggleTextureAtlas");
view_listener_t::addMenu(new LLAdvancedCheckTextureAtlas(), "Advanced.CheckTextureAtlas");
view_listener_t::addMenu(new LLAdvancedEnableObjectObjectOcclusion(), "Advanced.EnableObjectObjectOcclusion");
@@ -8028,8 +7920,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
// we don't use boost::bind directly to delay side tray construction
- view_listener_t::addMenu(new LLSelfFriends(), "Self.Friends");
- view_listener_t::addMenu(new LLSelfGroups(), "Self.Groups");
+ view_listener_t::addMenu( new LLShowPanelPeopleTab(), "SideTray.PanelPeopleTab");
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");