summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.cpp
diff options
context:
space:
mode:
authorleyla_linden <none@none>2011-01-26 17:01:56 -0800
committerleyla_linden <none@none>2011-01-26 17:01:56 -0800
commitae292e00bbd5612acbd092c1d045f491965e5cfa (patch)
tree6d6699f7ae9cb331cb496adcfead1b4701c18d43 /indra/newview/llviewermenufile.cpp
parent96c6200f7271cadec83f8d55e30e3b4713c3f939 (diff)
SH-842 Hide "Model" option in upload menu
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rw-r--r--indra/newview/llviewermenufile.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 4ba1d007fe..d0bb93d1b6 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -53,6 +53,7 @@
#include "llvfs.h"
#include "llviewerinventory.h"
#include "llviewermenu.h" // gMenuHolder
+#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerwindow.h"
@@ -102,6 +103,14 @@ class LLMeshEnabled : public view_listener_t
}
};
+class LLMeshUploadVisible : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ return LLViewerParcelMgr::getInstance()->allowAgentBuild() && !gAgent.getRegion()->getCapability("ObjectAdd").empty();
+ }
+};
+
LLMutex* LLFilePickerThread::sMutex = NULL;
std::queue<LLFilePickerThread*> LLFilePickerThread::sDeadQ;
@@ -1390,6 +1399,7 @@ void init_menu_file()
view_listener_t::addEnable(new LLFileEnableUpload(), "File.EnableUpload");
view_listener_t::addEnable(new LLFileEnableUploadModel(), "File.EnableUploadModel");
view_listener_t::addMenu(new LLMeshEnabled(), "File.MeshEnabled");
+ view_listener_t::addMenu(new LLMeshUploadVisible(), "File.VisibleUploadModel");
// "File.SaveTexture" moved to llpanelmaininventory so that it can be properly handled.
}