diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-07 09:40:27 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-07 09:40:27 -0800 |
commit | 29d67f0c690df1d24d4533327bc99f7a56148588 (patch) | |
tree | dc6fd659235ce6d3f0b9115750c6f708854bdd48 /indra/newview/llviewermenu.cpp | |
parent | ae7324ea34492a084300497b5da7ac611ee911e8 (diff) | |
parent | b7bab35cb58a33014bb05f2d77b03e58d9e90651 (diff) |
Merge latest fixes from viewer2.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 445c1060aa..1f5d2c0459 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -62,6 +62,7 @@ #include "llfloaterreporter.h" #include "llfloatersearch.h" #include "llfloaterscriptdebug.h" +#include "llfloatersnapshot.h" #include "llfloatertools.h" #include "llfloaterworldmap.h" #include "llavataractions.h" @@ -445,6 +446,8 @@ void init_menus() // Otherwise tool tips for menu items would be overlapped by menu, since // main view is behind of menu holder now. gViewerWindow->getRootView()->addChild(gToolTipView); + + gViewerWindow->getRootView()->addChild(gSnapshotFloaterView); gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid()); @@ -5857,8 +5860,12 @@ void confirm_replace_attachment(S32 option, void* user_data) } } -bool callback_attachment_drop(const LLSD& notification, const LLSD& response) +void callback_attachment_drop(const LLSD& notification, const LLSD& response) { + // Ensure user confirmed the drop + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return; + // Called when the user clicked on an object attached to them // and selected "Drop". LLUUID object_id = notification["payload"]["object_id"].asUUID(); @@ -5867,7 +5874,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) if (!object) { llwarns << "handle_drop_attachment() - no object to drop" << llendl; - return true; + return; } LLViewerObject *parent = (LLViewerObject*)object->getParent(); @@ -5884,13 +5891,13 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) if (!object) { llwarns << "handle_detach() - no object to detach" << llendl; - return true; + return; } if (object->isAvatar()) { llwarns << "Trying to detach avatar from avatar." << llendl; - return true; + return; } // reselect the object @@ -5898,7 +5905,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) LLSelectMgr::getInstance()->sendDropAttachment(); - return true; + return; } class LLAttachmentDrop : public view_listener_t @@ -7954,8 +7961,8 @@ void initialize_menus() enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute)); enable.add("Object.EnableMute", boost::bind(&enable_object_mute)); - enable.add("Object.EnableBuy", boost::bind(&enable_buy_object)); + commit.add("Object.ZoomIn", boost::bind(&handle_look_at_selection, "zoom")); // Attachment pie menu enable.add("Attachment.Label", boost::bind(&onEnableAttachmentLabel, _1, _2)); |