From fbac3aaf0c43de4892ab0b95540f86c2b7c7a0de Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 4 Jan 2010 14:04:20 -0800 Subject: EXT-2481 [BSI] Add "Zoom in" to 3D Object context menu and inspector Gear menu EXT-3388 [BSI] "Teleport" option missing dropdown when right clicking on friends list --- indra/newview/llviewermenu.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2a9c738c97..a28aef6ddd 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3017,6 +3017,26 @@ bool callback_eject(const LLSD& notification, const LLSD& response) return false; } +void handle_avatar_teleport(const LLSD& avatar_id) +{ + // Use avatar_id if available, otherwise default to right-click avatar + LLVOAvatar* avatar = NULL; + if (avatar_id.asUUID().notNull()) + { + avatar = find_avatar_from_object(avatar_id.asUUID()); + } + else + { + avatar = find_avatar_from_object( + LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); + } + + if( avatar ) + { + LLAvatarActions::offerTeleport(avatar->getID()); + } +} + void handle_avatar_eject(const LLSD& avatar_id) { // Use avatar_id if available, otherwise default to right-click avatar @@ -7913,6 +7933,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup"); view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); + commit.add("Avatar.Teleport", boost::bind(&handle_avatar_teleport, LLSD())); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); @@ -7952,8 +7973,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)); -- cgit v1.2.3 From fd8e1ea53586f6e7065baa143608102804882c9a Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 4 Jan 2010 14:36:04 -0800 Subject: moving this menu item to the right place EXT-3388 [BSI] "Teleport" option missing dropdown when right clicking on friends list --- indra/newview/llviewermenu.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a28aef6ddd..b56af3c345 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3017,26 +3017,6 @@ bool callback_eject(const LLSD& notification, const LLSD& response) return false; } -void handle_avatar_teleport(const LLSD& avatar_id) -{ - // Use avatar_id if available, otherwise default to right-click avatar - LLVOAvatar* avatar = NULL; - if (avatar_id.asUUID().notNull()) - { - avatar = find_avatar_from_object(avatar_id.asUUID()); - } - else - { - avatar = find_avatar_from_object( - LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); - } - - if( avatar ) - { - LLAvatarActions::offerTeleport(avatar->getID()); - } -} - void handle_avatar_eject(const LLSD& avatar_id) { // Use avatar_id if available, otherwise default to right-click avatar @@ -7933,7 +7913,6 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup"); view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); - commit.add("Avatar.Teleport", boost::bind(&handle_avatar_teleport, LLSD())); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); -- cgit v1.2.3 From b5f02c573799687b59e04fbd23cd730f5673f77b Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 5 Jan 2010 13:00:15 -0800 Subject: EXT-3806 Attachment drop confirmation popup: "No" is ignored Missing an if (option != 0) Made callback function return void as result is not used. --- indra/newview/llviewermenu.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 40c74ccf82..fb64a1929d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5856,8 +5856,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(); @@ -5866,7 +5870,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(); @@ -5883,13 +5887,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 @@ -5897,7 +5901,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response) LLSelectMgr::getInstance()->sendDropAttachment(); - return true; + return; } class LLAttachmentDrop : public view_listener_t -- cgit v1.2.3 From db6069e249b509e1551a76f438d795cbb9f992fa Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 5 Jan 2010 15:49:45 -0800 Subject: EXT-3721 SNAPSHOT PREVIEW can be dragged over the top menus reviewed by Richard --- indra/newview/llviewermenu.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 40c74ccf82..bd589b5485 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()); -- cgit v1.2.3