Permalink
Browse files

Add Log button to Profile, (and rightclick menus for lists) as per re…

…quest.
  • Loading branch information...
Lirusaito committed Apr 15, 2016
1 parent de95e07 commit 62e8400c3c4c11f0b78c5dee84584297334ae1d5
@@ -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);
@@ -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"))
{
@@ -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)
@@ -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");
@@ -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"/>
@@ -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"/>
@@ -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" />

0 comments on commit 62e8400

Please sign in to comment.