[Feature Request] Open Muted List Profiles via Double Click
This commit is contained in:
@@ -40,7 +40,9 @@
|
|||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
|
|
||||||
// project include
|
// project include
|
||||||
|
#include "llavataractions.h"
|
||||||
#include "llfloateravatarpicker.h"
|
#include "llfloateravatarpicker.h"
|
||||||
|
#include "llgroupactions.h"
|
||||||
#include "llmutelist.h"
|
#include "llmutelist.h"
|
||||||
#include "llnamelistctrl.h"
|
#include "llnamelistctrl.h"
|
||||||
|
|
||||||
@@ -185,6 +187,22 @@ LLFloaterMute::LLFloaterMute(const LLSD& seed)
|
|||||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mute.xml", NULL, FALSE);
|
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()
|
BOOL LLFloaterMute::postBuild()
|
||||||
{
|
{
|
||||||
childSetCommitCallback("mutes", boost::bind(&LLFloaterMute::updateButtons, this));
|
childSetCommitCallback("mutes", boost::bind(&LLFloaterMute::updateButtons, this));
|
||||||
@@ -199,6 +217,7 @@ BOOL LLFloaterMute::postBuild()
|
|||||||
|
|
||||||
mMuteList = getChild<LLNameListCtrl>("mutes");
|
mMuteList = getChild<LLNameListCtrl>("mutes");
|
||||||
mMuteList->setCommitOnSelectionChange(TRUE);
|
mMuteList->setCommitOnSelectionChange(TRUE);
|
||||||
|
mMuteList->setDoubleClickCallback(boost::bind(&LLFloaterMute::showProfile, this));
|
||||||
|
|
||||||
LLMuteList::getInstance()->addObserver(this);
|
LLMuteList::getInstance()->addObserver(this);
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ private:
|
|||||||
void onPickUser(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
|
void onPickUser(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
|
||||||
static void onClickMuteByName(void*);
|
static void onClickMuteByName(void*);
|
||||||
static void callbackMuteByName(const std::string& text, void*);
|
static void callbackMuteByName(const std::string& text, void*);
|
||||||
|
void showProfile() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LLNameListCtrl* mMuteList;
|
LLNameListCtrl* mMuteList;
|
||||||
|
|||||||
Reference in New Issue
Block a user