From f6b48339d9423399ccd1c93709de978ccc7f5a8c Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Fri, 2 Apr 2010 15:49:13 +0300
Subject: [PATCH] Fixed major bug EXT-6595 (World->Place Profile flyout menu
 doesn't include link to side panel place info).

Added a new main menu item: World -> Place Profile -> Place Profile.
I'm not sure about its label though (double "Place Profile").

Reviewed by Sam: https://codereview.productengine.com/secondlife/r/161/

--HG--
branch : product-engine
---
 indra/newview/llviewermenu.cpp                     | 11 +++++++++++
 indra/newview/skins/default/xui/en/menu_viewer.xml |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3a6aed01cef..7bdec010eea 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5330,6 +5330,16 @@ class LLWorldCreateLandmark : public view_listener_t
 	}
 };
 
+class LLWorldPlaceProfile : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
+
+		return true;
+	}
+};
+
 void handle_look_at_selection(const LLSD& param)
 {
 	const F32 PADDING_FACTOR = 1.75f;
@@ -7739,6 +7749,7 @@ void initialize_menus()
 	commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL));
 	view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
 	view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
+	view_listener_t::addMenu(new LLWorldPlaceProfile(), "World.PlaceProfile");
 	view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation");
 	view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
 	view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway");
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index ac31636ed2f..551e49daf58 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -251,6 +251,13 @@
            layout="topleft"
            name="Land"
            tear_off="true">
+        <menu_item_call
+         label="Place Profile"
+         layout="topleft"
+         name="Place Profile">
+            <menu_item_call.on_click
+             function="World.PlaceProfile" />
+        </menu_item_call>
         <menu_item_call
          label="About Land"
          layout="topleft"
-- 
GitLab