Feature Request: Add Chat History to Group right click menus
This commit is contained in:
@@ -337,12 +337,21 @@ void LLPanelAvatarFirstLife::enableControls(BOOL self)
|
||||
void show_picture(const LLUUID& id, const std::string& name);
|
||||
static std::string profile_picture_title(const std::string& str) { return "Profile Picture: " + str; }
|
||||
static void show_partner_help() { LLNotificationsUtil::add("ClickPartnerHelpAvatar", LLSD(), LLSD(), boost::bind(LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL, _1, _2)); }
|
||||
void show_log_browser(const LLUUID& id)
|
||||
void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type)
|
||||
{
|
||||
void show_log_browser(const std::string& name, const std::string& id);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
show_log_browser(av_name.getLegacyName(), id.asString());
|
||||
std::string name;
|
||||
if (type == LFIDBearer::AVATAR)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
name = av_name.getLegacyName();
|
||||
}
|
||||
else // GROUP
|
||||
{
|
||||
gCacheName->getGroupName(id, name);
|
||||
}
|
||||
show_log_browser(name, id.asString());
|
||||
}
|
||||
BOOL LLPanelAvatarSecondLife::postBuild()
|
||||
{
|
||||
@@ -368,7 +377,7 @@ BOOL LLPanelAvatarSecondLife::postBuild()
|
||||
getChild<LLUICtrl>("GroupInvite_Button")->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::inviteToGroup), boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
|
||||
getChild<LLUICtrl>("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Log")->setCommitCallback(boost::bind(show_log_browser, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Log")->setCommitCallback(boost::bind(show_log_browser, boost::bind(&LLPanelAvatar::getAvatarID, pa), LFIDBearer::AVATAR));
|
||||
getChild<LLUICtrl>("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Mute"))
|
||||
{
|
||||
|
||||
@@ -9287,13 +9287,13 @@ bool can_show_web_profile()
|
||||
return !gSavedSettings.getString("WebProfileURL").empty();
|
||||
}
|
||||
|
||||
void show_log_browser(const LLUUID& id);
|
||||
void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type);
|
||||
class ListShowLog : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
for (const LLUUID& id : LFIDBearer::getActiveSelectedIDs())
|
||||
show_log_browser(id);
|
||||
show_log_browser(id, LFIDBearer::getActiveType());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Join Group" name="join_group">
|
||||
<on_click function="List.Join"/>
|
||||
<on_visible function="List.NotInGroup"/>
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<on_click function="List.Activate"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Join Group" name="join_group">
|
||||
<on_click function="List.Join"/>
|
||||
<on_visible function="List.NotInGroup"/>
|
||||
|
||||
Reference in New Issue
Block a user