summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-24 14:39:39 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-11-24 14:39:39 -0500
commitc812c616ea0ba6531b3fe7f75efc815081cd0c2e (patch)
tree2d966b5ba9fae58a3369055fadd6192b417c7f46 /indra/newview/llviewermenu.cpp
parentfc6cfc27bec61ac1f66c1304cc7b54f19157584e (diff)
parenta22bb00530bb779d8e5bb40b68e55767604d88dc (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 6a6aa1061d..625b816125 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2733,15 +2733,26 @@ bool enable_object_edit()
// there. Eventually this needs to be replaced with code that only
// lets you edit objects if you have permission to do so (edit perms,
// group edit, god). See also lltoolbar.cpp. JC
- bool enable = true;
+ bool enable = false;
if (gAgent.inPrelude())
{
enable = LLViewerParcelMgr::getInstance()->agentCanBuild()
|| LLSelectMgr::getInstance()->getSelection()->isAttachment();
+ }
+ else if (LLSelectMgr::getInstance()->selectGetModify())
+ {
+ enable = true;
}
+
return enable;
}
+// mutually exclusive - show either edit option or build in menu
+bool enable_object_build()
+{
+ return !enable_object_edit();
+}
+
class LLSelfRemoveAllAttachments : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -5667,6 +5678,16 @@ class LLFloaterVisible : public view_listener_t
}
};
+class LLShowSidetrayPanel : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string panel_name = userdata.asString();
+ LLSideTray::getInstance()->showPanel(panel_name, LLSD());
+ return true;
+ }
+};
+
bool callback_show_url(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -8023,9 +8044,12 @@ void initialize_menus()
visible.add("VisiblePayObject", boost::bind(&enable_pay_object));
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
+ visible.add("VisibleBuild", boost::bind(&enable_object_build));
+ visible.add("VisibleEdit", boost::bind(&enable_object_edit));
visible.add("Object.VisibleEdit", boost::bind(&enable_object_edit));
view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible");
+ view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel");
view_listener_t::addMenu(new LLSomethingSelected(), "SomethingSelected");
view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD");
view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected");