aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-02-15 19:58:57 -0600
committerJacek Antonelli2009-02-15 20:06:17 -0600
commit7552080406d6c54e981d2e26f3826e7457cdd5fb (patch)
treee613b774b600367635484fd71770c7984e720576 /linden/indra/newview/llviewermenu.cpp
parentUpdated release notes for 1.1.0 RC1. (diff)
parentMerge branch '1.1.0-RC1-fixes' into next (diff)
downloadmeta-impy-7552080406d6c54e981d2e26f3826e7457cdd5fb.zip
meta-impy-7552080406d6c54e981d2e26f3826e7457cdd5fb.tar.gz
meta-impy-7552080406d6c54e981d2e26f3826e7457cdd5fb.tar.bz2
meta-impy-7552080406d6c54e981d2e26f3826e7457cdd5fb.tar.xz
Merge commit 'mccabe/next' into next
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index c4cbf84..b7f4a40 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -1605,6 +1605,31 @@ void label_touch(std::string& label, void*)
1605 } 1605 }
1606} 1606}
1607 1607
1608class LLAttachmentEnableTouch : public view_listener_t
1609{
1610 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1611 {
1612 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
1613
1614 if (!obj) return false;
1615 if (!obj->isAttachment()) return false;
1616
1617 bool new_value = obj && obj->flagHandleTouch();
1618 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
1619 LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
1620
1621 if (node && node->mValid && !node->mTouchName.empty())
1622 {
1623 gMenuHolder->childSetText("Attachment Touch", node->mTouchName);
1624 }
1625 else
1626 {
1627 gMenuHolder->childSetText("Attachment Touch", userdata["data"].asString());
1628 }
1629 return true;
1630 }
1631};
1632
1608bool handle_object_open() 1633bool handle_object_open()
1609{ 1634{
1610 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); 1635 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -9822,6 +9847,7 @@ void initialize_menus()
9822 9847
9823 addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop"); 9848 addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
9824 addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach"); 9849 addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
9850 addMenu(new LLAttachmentEnableTouch(), "Attachment.EnableTouch");
9825 9851
9826 // Land pie menu 9852 // Land pie menu
9827 addMenu(new LLLandBuild(), "Land.Build"); 9853 addMenu(new LLLandBuild(), "Land.Build");