CHUI-885 (View Profile,Send IM and Add friend are not functional in context menu for allowed or banned users of the parcel.)
parent
72af9ed2e3
commit
385de35b93
|
|
@ -1801,6 +1801,9 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
// (N.B. callbacks don't take const refs as id is local scope)
|
||||
bool is_group = (mContextMenuType == MENU_GROUP);
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
|
||||
registrar.add("Url.ShowProfile", boost::bind(&LLScrollListCtrl::showProfile, id, is_group));
|
||||
registrar.add("Url.SendIM", boost::bind(&LLScrollListCtrl::sendIM, id));
|
||||
registrar.add("Url.AddFriend", boost::bind(&LLScrollListCtrl::addFriend, id));
|
||||
registrar.add("Url.Execute", boost::bind(&LLScrollListCtrl::showNameDetails, id, is_group));
|
||||
registrar.add("Url.CopyLabel", boost::bind(&LLScrollListCtrl::copyNameToClipboard, id, is_group));
|
||||
registrar.add("Url.CopyUrl", boost::bind(&LLScrollListCtrl::copySLURLToClipboard, id, is_group));
|
||||
|
|
@ -1821,11 +1824,33 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::showNameDetails(std::string id, bool is_group)
|
||||
void LLScrollListCtrl::showProfile(std::string id, bool is_group)
|
||||
{
|
||||
// show the resident's profile or the group profile
|
||||
std::string sltype = is_group ? "group" : "agent";
|
||||
std::string slurl = "secondlife:///app/" + sltype + "/" + id + "/about";
|
||||
LLUrlAction::showProfile(slurl);
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::sendIM(std::string id)
|
||||
{
|
||||
// send im to the resident
|
||||
std::string slurl = "secondlife:///app/agent/" + id + "/about";
|
||||
LLUrlAction::sendIM(slurl);
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::addFriend(std::string id)
|
||||
{
|
||||
// add resident to friends list
|
||||
std::string slurl = "secondlife:///app/agent/" + id + "/about";
|
||||
LLUrlAction::addFriend(slurl);
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::showNameDetails(std::string id, bool is_group)
|
||||
{
|
||||
// open the resident's details or the group details
|
||||
std::string sltype = is_group ? "group" : "agent";
|
||||
std::string slurl = "secondlife:///app/" + sltype + "/" + id + "/about";
|
||||
LLUrlAction::clickAction(slurl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -430,6 +430,9 @@ private:
|
|||
BOOL setSort(S32 column, BOOL ascending);
|
||||
S32 getLinesPerPage();
|
||||
|
||||
static void showProfile(std::string id, bool is_group);
|
||||
static void sendIM(std::string id);
|
||||
static void addFriend(std::string id);
|
||||
static void showNameDetails(std::string id, bool is_group);
|
||||
static void copyNameToClipboard(std::string id, bool is_group);
|
||||
static void copySLURLToClipboard(std::string id, bool is_group);
|
||||
|
|
|
|||
Loading…
Reference in New Issue