summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermenufile.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml4
3 files changed, 13 insertions, 3 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.
}
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index e0e6567872..62db15d456 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -52,7 +52,7 @@
<menu_item_call.on_enable
function="File.EnableUploadModel" />
<menu_item_call.on_visible
- function="File.MeshEnabled"/>
+ function="File.VisibleUploadModel"/>
</menu_item_call>
<menu_item_call
label="Bulk (L$[COST] per file)..."
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index cb2cbbe033..8e2c5840ee 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -970,7 +970,7 @@
<menu_item_call.on_enable
function="File.EnableUploadModel" />
<menu_item_call.on_visible
- function="File.MeshEnabled"/>
+ function="File.VisibleUploadModel"/>
</menu_item_call>
<menu_item_call
label="Model Wizard..."
@@ -982,7 +982,7 @@
<menu_item_call.on_enable
function="File.EnableUploadModel" />
<menu_item_call.on_visible
- function="File.MeshEnabled"/>
+ function="File.VisibleUploadModel"/>
</menu_item_call>
<menu_item_call
label="Bulk (L$[COST] per file)..."