From 3d74daa8c541d68f697f6606c4bf8c47991035c8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 5 Jan 2021 02:16:55 -0500
Subject: [PATCH] Start to mark code that we modified in certain places..

---
 indra/newview/llchathistory.cpp | 40 +++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 0ba11c439d7..dd25a228165 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -151,6 +151,7 @@ class LLChatHistoryHeader: public LLPanel
 		{
 			mAvatarNameCacheConnection.disconnect();
 		}
+// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
 		auto menu = mPopupMenuHandleAvatar.get();
 		if (menu)
 		{
@@ -163,6 +164,7 @@ class LLChatHistoryHeader: public LLPanel
 			menu->die();
 			mPopupMenuHandleObject.markDead();
 		}
+// [/AL:SE]
 	}
 
 	BOOL handleMouseUp(S32 x, S32 y, MASK mask)
@@ -553,6 +555,38 @@ class LLChatHistoryHeader: public LLPanel
 
 	BOOL postBuild()
 	{
+// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
+//		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+//		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar registrar_enable;
+//
+//		registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
+//		registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2));
+//		registrar_enable.add("AvatarIcon.Enable", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemEnabled, this, _2));
+//		registrar_enable.add("AvatarIcon.Visible", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemVisible, this, _2));
+//		registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
+//		registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2));
+//
+//		LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+//		if (menu)
+//		{
+//			mPopupMenuHandleAvatar = menu->getHandle();
+//		}
+//		else
+//		{
+//			LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL;
+//		}
+//
+//		menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+//		if (menu)
+//		{
+//			mPopupMenuHandleObject = menu->getHandle();
+//		}
+//		else
+//		{
+//			LL_WARNS() << " Failed to create menu_object_icon.xml" << LL_ENDL;
+//		}
+// [/AL:SE]
+
 		setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
 
 		setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this));
@@ -846,6 +880,9 @@ class LLChatHistoryHeader: public LLPanel
 	void showObjectContextMenu(S32 x,S32 y)
 	{
 		LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleObject.get();
+//		if(menu)
+//			LLMenuGL::showPopup(this, menu, x, y);
+// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
 		if (!menu)
 		{
 			LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -869,11 +906,13 @@ class LLChatHistoryHeader: public LLPanel
 		{
 			LLMenuGL::showPopup(this, menu, x, y);
 		}
+// [/AL:SE]
 	}
 	
 	void showAvatarContextMenu(S32 x,S32 y)
 	{
 		LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleAvatar.get();
+// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
 		if (!menu)
 		{
 			LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -894,6 +933,7 @@ class LLChatHistoryHeader: public LLPanel
 				LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL;
 			}
 		}
+// [/AL:SE]
 
 		if(menu)
 		{
-- 
GitLab