Skip to content

Commit

Permalink
Add Log button to Profile, (and rightclick menus for lists) as per re…
Browse files Browse the repository at this point in the history
…quest.
  • Loading branch information
LiruMouse committed Apr 15, 2016
1 parent de95e07 commit 62e8400
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
8 changes: 8 additions & 0 deletions indra/newview/llpanelavatar.cpp
Expand Up @@ -330,6 +330,13 @@ 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 std::string& name, const std::string& id);
LLAvatarName av_name;
LLAvatarNameCache::get(id, &av_name);
show_log_browser(av_name->getLegacyName(), id.asString());
}
BOOL LLPanelAvatarSecondLife::postBuild()
{
childSetEnabled("born", FALSE);
Expand Down Expand Up @@ -359,6 +366,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>("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Mute"))
{
Expand Down
12 changes: 12 additions & 0 deletions indra/newview/llviewermenu.cpp
Expand Up @@ -9058,6 +9058,17 @@ class ListShare : public view_listener_t
}
};

class ListShowLog : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
void show_log_browser(const LLUUID& id)
for (const LLUUID& id : get_focused_list_ids_selected())
show_log_browser(id);
return true;
}
};

class ListShowProfile : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
Expand Down Expand Up @@ -9514,6 +9525,7 @@ void initialize_menus()
addMenu(new ListRequestFriendship(), "List.RequestFriendship");
addMenu(new ListRequestTeleport(), "List.RequestTeleport");
addMenu(new ListShare(), "List.Share");
addMenu(new ListShowLog(), "List.ListShowLog");
addMenu(new ListShowProfile(), "List.ShowProfile");
addMenu(new ListShowWebProfile(), "List.ShowWebProfile");
addMenu(new ListStartAdhocCall(), "List.StartAdhocCall");
Expand Down
4 changes: 4 additions & 0 deletions indra/newview/skins/default/xui/en-us/menu_avs_list.xml
Expand Up @@ -60,6 +60,10 @@
<on_click function="List.Share"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Chat History" name="Chat History">
<on_click function="List.ShowLog"/>
<on_enable function="List.EnableAnySelected"/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Mute/Unmute" name="Mute/Unmute">
<on_click function="List.ToggleMute"/>
Expand Down
4 changes: 4 additions & 0 deletions indra/newview/skins/default/xui/en-us/menu_radar.xml
Expand Up @@ -61,6 +61,10 @@
<on_click function="List.Share"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Chat History" name="Chat History">
<on_click function="List.ShowLog"/>
<on_enable function="List.EnableAnySelected"/>
</menu_item_call>
<menu_item_call label="Track/Untrack" name="Track/Untrack">
<on_click function="Radar.Track"/>
<on_enable function="List.EnableSingleSelected"/>
Expand Down
7 changes: 4 additions & 3 deletions indra/newview/skins/default/xui/en-us/panel_avatar.xml
Expand Up @@ -146,11 +146,12 @@
label_selected="Find on Map" left="24" mouse_opaque="true"
name="Find on Map" width="100" />
<button bottom="-452" font="SansSerif" halign="center" height="20"
label="Offer Teleport..." label_selected="Offer Teleport..."
left_delta="102" mouse_opaque="true" name="Offer Teleport..." width="140" />
label="Teleport..." label_selected="Teleport..."
left_delta="102" mouse_opaque="true" name="Offer Teleport..." width="80" />
<button bottom="-452" font="SansSerif" halign="center" height="20"
label="Add Friend..." label_selected="Add Friend..." left_delta="142"
label="Add Friend..." label_selected="Add Friend..." left_delta="82"
mouse_opaque="true" name="Add Friend..." width="130" />
<button label="Log" name="Log" bottom="-452" left_delta="132" height="20" width="56"/>
<button bottom="-470" font="SansSerif" halign="center" height="20" label="Pay..."
label_selected="Pay..." left="24" mouse_opaque="true" name="Pay..."
width="70" />
Expand Down

0 comments on commit 62e8400

Please sign in to comment.