Skip to content
Snippets Groups Projects
Commit 3d74daa8 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Start to mark code that we modified in certain places..

parent a13568d2
No related branches found
No related tags found
No related merge requests found
...@@ -151,6 +151,7 @@ class LLChatHistoryHeader: public LLPanel ...@@ -151,6 +151,7 @@ class LLChatHistoryHeader: public LLPanel
{ {
mAvatarNameCacheConnection.disconnect(); mAvatarNameCacheConnection.disconnect();
} }
// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
auto menu = mPopupMenuHandleAvatar.get(); auto menu = mPopupMenuHandleAvatar.get();
if (menu) if (menu)
{ {
...@@ -163,6 +164,7 @@ class LLChatHistoryHeader: public LLPanel ...@@ -163,6 +164,7 @@ class LLChatHistoryHeader: public LLPanel
menu->die(); menu->die();
mPopupMenuHandleObject.markDead(); mPopupMenuHandleObject.markDead();
} }
// [/AL:SE]
} }
BOOL handleMouseUp(S32 x, S32 y, MASK mask) BOOL handleMouseUp(S32 x, S32 y, MASK mask)
...@@ -553,6 +555,38 @@ class LLChatHistoryHeader: public LLPanel ...@@ -553,6 +555,38 @@ class LLChatHistoryHeader: public LLPanel
BOOL postBuild() 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)); setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this)); setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this));
...@@ -846,6 +880,9 @@ class LLChatHistoryHeader: public LLPanel ...@@ -846,6 +880,9 @@ class LLChatHistoryHeader: public LLPanel
void showObjectContextMenu(S32 x,S32 y) void showObjectContextMenu(S32 x,S32 y)
{ {
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleObject.get(); LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleObject.get();
// if(menu)
// LLMenuGL::showPopup(this, menu, x, y);
// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
if (!menu) if (!menu)
{ {
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
...@@ -869,11 +906,13 @@ class LLChatHistoryHeader: public LLPanel ...@@ -869,11 +906,13 @@ class LLChatHistoryHeader: public LLPanel
{ {
LLMenuGL::showPopup(this, menu, x, y); LLMenuGL::showPopup(this, menu, x, y);
} }
// [/AL:SE]
} }
void showAvatarContextMenu(S32 x,S32 y) void showAvatarContextMenu(S32 x,S32 y)
{ {
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleAvatar.get(); LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandleAvatar.get();
// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
if (!menu) if (!menu)
{ {
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
...@@ -894,6 +933,7 @@ class LLChatHistoryHeader: public LLPanel ...@@ -894,6 +933,7 @@ class LLChatHistoryHeader: public LLPanel
LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL; LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL;
} }
} }
// [/AL:SE]
if(menu) if(menu)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment