Add "Show transcript" option to regular avatar SLURL context menu to keep it in sync with the specialized LLNameListCtrl version
parent
80d71f004c
commit
3a52b250e8
|
|
@ -35,6 +35,7 @@ enum EFSRegistrarFunctionActionType
|
|||
FS_RGSTR_ACT_ADD_FRIEND,
|
||||
FS_RGSTR_ACT_REMOVE_FRIEND,
|
||||
FS_RGSTR_ACT_SEND_IM,
|
||||
FS_RGSTR_ACT_VIEW_TRANSCRIPT,
|
||||
FS_RGSTR_ACT_ZOOM_IN,
|
||||
FS_RGSTR_ACT_OFFER_TELEPORT,
|
||||
FS_RGSTR_ACT_SHOW_PROFILE,
|
||||
|
|
|
|||
|
|
@ -1968,6 +1968,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
registrar.add("FS.TrackAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/track"));
|
||||
registrar.add("FS.AddToContactSet", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/addtocontactset")); // [FS:CR]
|
||||
registrar.add("FS.BlockAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/blockavatar"));
|
||||
registrar.add("FS.ViewLog", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/viewlog"));
|
||||
// </FS:Ansariel> Additional convenience options
|
||||
|
||||
// <FS:Ansariel> Add enable checks for menu items
|
||||
|
|
@ -1983,6 +1984,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
enable_registrar.add("FS.EnableRequestTeleport", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_ACT_REQUEST_TELEPORT));
|
||||
enable_registrar.add("FS.CheckIsAgentBlocked", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_CHK_AVATAR_BLOCKED));
|
||||
enable_registrar.add("FS.EnableBlockAvatar", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_CHK_IS_NOT_SELF));
|
||||
enable_registrar.add("FS.EnableViewLog", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, uuid, FS_RGSTR_ACT_VIEW_TRANSCRIPT));
|
||||
// </FS:Ansariel>
|
||||
|
||||
// create the context menu from the XUI file and display it
|
||||
|
|
|
|||
|
|
@ -2129,6 +2129,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
|
|||
registrar.add("FS.TrackAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/track"));
|
||||
registrar.add("FS.AddToContactSet", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/addtocontactset")); // [FS:CR]
|
||||
registrar.add("FS.BlockAvatar", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/blockavatar"));
|
||||
registrar.add("FS.ViewLog", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + target_id_str + "/viewlog"));
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> Add enable checks for menu items
|
||||
|
|
@ -2145,6 +2146,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
|
|||
enable_registrar.add("FS.EnableRequestTeleport", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_ACT_REQUEST_TELEPORT));
|
||||
enable_registrar.add("FS.CheckIsAgentBlocked", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_CHK_AVATAR_BLOCKED));
|
||||
enable_registrar.add("FS.EnableBlockAvatar", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_CHK_IS_NOT_SELF));
|
||||
enable_registrar.add("FS.EnableViewLog", boost::bind(&FSRegistrarUtils::checkIsEnabled, gFSRegistrarUtils, target_id, FS_RGSTR_ACT_VIEW_TRANSCRIPT));
|
||||
// </FS:Ansariel>
|
||||
|
||||
// create and return the context menu from the XUI file
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "llavatarnamecache.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "lllogchat.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llnotificationmanager.h"
|
||||
#include "llnotificationsutil.h" // <FS:CR> reportToNearbyChat
|
||||
|
|
@ -316,6 +317,10 @@ bool FSCommon::checkIsActionEnabled(const LLUUID& av_id, EFSRegistrarFunctionAct
|
|||
{
|
||||
return (!isSelf && RlvActions::canStartIM(av_id));
|
||||
}
|
||||
else if (action == FS_RGSTR_ACT_VIEW_TRANSCRIPT)
|
||||
{
|
||||
return (!isSelf && LLLogChat::isTranscriptExist(av_id));
|
||||
}
|
||||
else if (action == FS_RGSTR_ACT_ZOOM_IN)
|
||||
{
|
||||
return (!isSelf && LLAvatarActions::canZoomIn(av_id));
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "lllogchat.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
|
||||
|
|
@ -126,6 +127,15 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
if (verb == "viewlog")
|
||||
{
|
||||
if (gAgentID != target_id && LLLogChat::isTranscriptExist(target_id))
|
||||
{
|
||||
LLAvatarActions::viewChatHistory(target_id);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<context_menu name="Url Popup">
|
||||
<menu_item_call label="Profil anzeigen" name="show_agent"/>
|
||||
<menu_item_call label="IM senden" name="send_im"/>
|
||||
<menu_item_call label="Chatverlauf anzeigen..." name="chat_history"/>
|
||||
<menu_item_call label="Als Freund hinzufügen" name="add_friend"/>
|
||||
<menu_item_call label="Zu Kontakt-Set hinzufügen..." name="Add to Set"/>
|
||||
<menu_item_call label="Zoome auf Einwohner" name="zoom_agent"/>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,15 @@
|
|||
<menu_item_call.on_enable
|
||||
function="Url.EnableSendIM" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="View chat transcripts..."
|
||||
layout="topleft"
|
||||
name="chat_history">
|
||||
<menu_item_call.on_click
|
||||
function="FS.ViewLog"/>
|
||||
<menu_item_call.on_enable
|
||||
function="FS.EnableViewLog"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Add Friend..."
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue