From 7934dd649ec0a06965cb540fa5e95adfc2ab3090 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 Sep 2010 21:52:45 -0700 Subject: added show inspector menu callbacks --- indra/newview/llviewermenu.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d4af5048c3..07b6a9e642 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -190,6 +190,8 @@ BOOL is_selection_buy_not_take(); S32 selection_price(); BOOL enable_take(); void handle_take(); +void handle_object_show_inspector(); +void handle_avatar_show_inspector(); bool confirm_take(const LLSD& notification, const LLSD& response); void handle_buy_object(LLSaleInfo sale_info); @@ -4368,6 +4370,33 @@ void handle_take() } } +void handle_object_show_inspector() +{ + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + LLViewerObject* objectp = selection->getFirstRootObject(TRUE); + if (!objectp) + { + return; + } + + LLSD params; + params["object_id"] = objectp->getID(); + LLFloaterReg::showInstance("inspect_object", params); +} + +void handle_avatar_show_inspector() +{ + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); + if(avatar) + { + LLSD params; + params["avatar_id"] = avatar->getID(); + LLFloaterReg::showInstance("inspect_avatar", params); + } +} + + + bool confirm_take(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -8158,6 +8187,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.ShowInspector", boost::bind(&handle_avatar_show_inspector)); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); @@ -8185,6 +8215,7 @@ void initialize_menus() commit.add("Object.Inspect", boost::bind(&handle_object_inspect)); commit.add("Object.Open", boost::bind(&handle_object_open)); commit.add("Object.Take", boost::bind(&handle_take)); + commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector)); enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); -- cgit v1.2.3 From 5cfb82892fec41d121b7c55a9fcea46d2d395897 Mon Sep 17 00:00:00 2001 From: callum Date: Thu, 30 Sep 2010 16:11:08 -0700 Subject: Code changes for "EXP-126 Create destination guide popup at bottom of screen" --- indra/newview/llviewermenu.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 07b6a9e642..0ff5181cc5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -844,6 +844,25 @@ class LLAdvancedCheckFeature : public view_listener_t } }; +void LLDestinationGuideToggle() +{ + LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container"); + if ( destination_guide ) + { + if ( destination_guide->getVisible() ) + { + destination_guide->setVisible( FALSE ); + } + else + { + destination_guide->setVisible( true ); + } + } + else + { + llwarns << "ERROR: unable to find destination guide container" << llendl; + } +}; ////////////////// // INFO DISPLAY // @@ -8275,4 +8294,6 @@ void initialize_menus() view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono"); view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints"); + + commit.add("DestinationGuide.toggle", boost::bind(&LLDestinationGuideToggle)); } -- cgit v1.2.3 From 01b28ddf5ddc7118bc8b2047d899aee0293a8721 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 6 Oct 2010 20:10:36 -0700 Subject: EXP-156 WIP Implement custom Skylight hints --- indra/newview/llviewermenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0ff5181cc5..0454d4a249 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -44,7 +44,7 @@ #include "llconsole.h" #include "lldebugview.h" #include "llfilepicker.h" -//#include "llfirstuse.h" +#include "llfirstuse.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llbuycurrencyhtml.h" @@ -855,6 +855,7 @@ void LLDestinationGuideToggle() } else { + LLFirstUse::notUsingDestinationGuide(false); destination_guide->setVisible( true ); } } -- cgit v1.2.3 From e638204dc2d8b409f17f7cdf8938deb97d137dbc Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Oct 2010 17:14:14 -0700 Subject: EXP-273 WIP added avatar picker popup and hint --- indra/newview/llviewermenu.cpp | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0454d4a249..ca9cc8e987 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -847,24 +847,37 @@ class LLAdvancedCheckFeature : public view_listener_t void LLDestinationGuideToggle() { LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container"); - if ( destination_guide ) + LLView* avatar_picker = gViewerWindow->getRootView()->getChildView("avatar_picker_container"); + + if ( destination_guide->getVisible() ) { - if ( destination_guide->getVisible() ) - { - destination_guide->setVisible( FALSE ); - } - else - { - LLFirstUse::notUsingDestinationGuide(false); - destination_guide->setVisible( true ); - } + destination_guide->setVisible( FALSE ); + } + else + { + LLFirstUse::notUsingDestinationGuide(false); + destination_guide->setVisible( true ); + avatar_picker->setVisible( false ); + } +}; + +void LLAvatarPickerToggle() +{ + LLView* avatar_picker = gViewerWindow->getRootView()->getChildView("avatar_picker_container"); + LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container"); + if ( avatar_picker->getVisible() ) + { + avatar_picker->setVisible( false ); } else { - llwarns << "ERROR: unable to find destination guide container" << llendl; + LLFirstUse::notUsingAvatarPicker(false); + avatar_picker->setVisible( true ); + destination_guide->setVisible( false ); } }; + ////////////////// // INFO DISPLAY // ////////////////// @@ -8297,4 +8310,5 @@ void initialize_menus() view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints"); commit.add("DestinationGuide.toggle", boost::bind(&LLDestinationGuideToggle)); + commit.add("AvatarPicker.toggle", boost::bind(&LLAvatarPickerToggle)); } -- cgit v1.2.3 From 20e9dbf40b0c3e4ef9674adbaca255723a412959 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 22 Oct 2010 18:37:40 -0700 Subject: EXP-273 FIXED Add button/tray for avatar picker made "toggleable" radio group --- indra/newview/llviewermenu.cpp | 51 ++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 29 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ca9cc8e987..391f6b0b2a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -844,36 +844,30 @@ class LLAdvancedCheckFeature : public view_listener_t } }; -void LLDestinationGuideToggle() +void LLDestinationAndAvatarShow(const LLSD& value) { - LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container"); - LLView* avatar_picker = gViewerWindow->getRootView()->getChildView("avatar_picker_container"); + S32 panel_idx = value.isDefined() ? value.asInteger() : -1; + LLView* container = gViewerWindow->getRootView()->getChildView("avatar_picker_and_destination_guide_container"); + LLMediaCtrl* destinations = container->findChild("destination_guide_contents"); + LLMediaCtrl* avatar_picker = container->findChild("avatar_picker_contents"); - if ( destination_guide->getVisible() ) + switch(panel_idx) { - destination_guide->setVisible( FALSE ); - } - else - { - LLFirstUse::notUsingDestinationGuide(false); - destination_guide->setVisible( true ); - avatar_picker->setVisible( false ); - } -}; - -void LLAvatarPickerToggle() -{ - LLView* avatar_picker = gViewerWindow->getRootView()->getChildView("avatar_picker_container"); - LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container"); - if ( avatar_picker->getVisible() ) - { - avatar_picker->setVisible( false ); - } - else - { - LLFirstUse::notUsingAvatarPicker(false); - avatar_picker->setVisible( true ); - destination_guide->setVisible( false ); + case 0: + container->setVisible(true); + destinations->setVisible(true); + avatar_picker->setVisible(false); + break; + case 1: + container->setVisible(true); + destinations->setVisible(false); + avatar_picker->setVisible(true); + break; + default: + container->setVisible(false); + destinations->setVisible(false); + avatar_picker->setVisible(false); + break; } }; @@ -8309,6 +8303,5 @@ void initialize_menus() view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints"); - commit.add("DestinationGuide.toggle", boost::bind(&LLDestinationGuideToggle)); - commit.add("AvatarPicker.toggle", boost::bind(&LLAvatarPickerToggle)); + commit.add("DestinationAndAvatar.show", boost::bind(&LLDestinationAndAvatarShow, _2)); } -- cgit v1.2.3 From 7a74e2c0cb93be6481205a4747824fd2e7dd6640 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 26 Oct 2010 16:36:58 -0700 Subject: fix for destination guide and avatar picker hints not disappearing when opening destination guide/avatar picker respectively --- indra/newview/llviewermenu.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 391f6b0b2a..5ad71263c3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -857,11 +857,13 @@ void LLDestinationAndAvatarShow(const LLSD& value) container->setVisible(true); destinations->setVisible(true); avatar_picker->setVisible(false); + LLFirstUse::notUsingDestinationGuide(false); break; case 1: container->setVisible(true); destinations->setVisible(false); avatar_picker->setVisible(true); + LLFirstUse::notUsingAvatarPicker(false); break; default: container->setVisible(false); -- cgit v1.2.3 From 522bcf17b759910040225c209f7851fbb0640c56 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 30 Nov 2010 20:52:30 -0800 Subject: SOCIAL-311 PARTIAL FIX Media browser has too many oddities to be useful for viewer web apps --- indra/newview/llviewermenu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2874a6ec79..a16f53083c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7175,6 +7175,12 @@ void handle_web_browser_test(const LLSD& param) LLWeb::loadURLInternal(url); } +void handle_web_content_test(const LLSD& param) +{ + std::string url = param.asString(); + LLWeb::loadWebURLInternal(url); +} + void handle_buy_currency_test(void*) { std::string url = @@ -7925,7 +7931,8 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache"); // Advanced > UI - commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); + commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser + commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest"); view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); -- cgit v1.2.3