diff --git a/indra/newview/llfloatermute.cpp b/indra/newview/llfloatermute.cpp index cced63ab1..fe1890b92 100644 --- a/indra/newview/llfloatermute.cpp +++ b/indra/newview/llfloatermute.cpp @@ -40,7 +40,9 @@ #include "lluictrlfactory.h" // project include +#include "llavataractions.h" #include "llfloateravatarpicker.h" +#include "llgroupactions.h" #include "llmutelist.h" #include "llnamelistctrl.h" @@ -185,6 +187,22 @@ LLFloaterMute::LLFloaterMute(const LLSD& seed) LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mute.xml", NULL, FALSE); } +void LLFloaterMute::showProfile() const +{ + if (const auto item = mMuteList->getFirstSelected()) + { + const auto type = item->getColumn(0)->getValue().asString(); + if (type == mAvatarIcon->getName()) + { + LLAvatarActions::showProfile(item->getUUID()); + } + else if (type == mGroupIcon->getName()) + { + LLGroupActions::show(item->getUUID()); + } + } +} + BOOL LLFloaterMute::postBuild() { childSetCommitCallback("mutes", boost::bind(&LLFloaterMute::updateButtons, this)); @@ -199,6 +217,7 @@ BOOL LLFloaterMute::postBuild() mMuteList = getChild("mutes"); mMuteList->setCommitOnSelectionChange(TRUE); + mMuteList->setDoubleClickCallback(boost::bind(&LLFloaterMute::showProfile, this)); LLMuteList::getInstance()->addObserver(this); diff --git a/indra/newview/llfloatermute.h b/indra/newview/llfloatermute.h index 1a04ae198..b9a116528 100644 --- a/indra/newview/llfloatermute.h +++ b/indra/newview/llfloatermute.h @@ -72,6 +72,7 @@ private: void onPickUser(const uuid_vec_t& ids, const std::vector& names); static void onClickMuteByName(void*); static void callbackMuteByName(const std::string& text, void*); + void showProfile() const; private: LLNameListCtrl* mMuteList;