summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5445a79137..5a9d219fac 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"
@@ -446,6 +447,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));