Fix Issue 931: When viewing the profile of a muted avatar, the Mute button should be changed to Unmute

This commit is contained in:
Lirusaito
2013-07-10 07:35:50 -04:00
parent 742ccdcf0c
commit 7e874d7d56
3 changed files with 3 additions and 36 deletions

View File

@@ -520,7 +520,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
getChild<LLUICtrl>("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
getChild<LLUICtrl>("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
childSetAction("Mute", LLPanelAvatar::onClickMute, pa);
getChild<LLUICtrl>("Mute")->setCommitCallback(boost::bind(LLAvatarActions::toggleBlock, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
getChild<LLUICtrl>("Offer Teleport...")->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::offerTeleport), boost::bind(&LLPanelAvatar::getAvatarID, pa)));
@@ -1727,26 +1727,6 @@ void LLPanelAvatar::onClickGetKey(void *userdata)
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(agent_id.asString()));
}
//-----------------------------------------------------------------------------
// onClickMute()
//-----------------------------------------------------------------------------
void LLPanelAvatar::onClickMute(void *userdata)
{
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
LLUUID agent_id = self->getAvatarID();
LLFloaterMute::showInstance();
if (LLAvatarActions::isBlocked(agent_id))
{
LLFloaterMute::getInstance()->selectMute(agent_id);
}
else
{
LLAvatarActions::toggleBlock(agent_id);
}
}
// static
void LLPanelAvatar::onClickOK(void *userdata)
{

View File

@@ -40,23 +40,11 @@
#include "llavatarpropertiesprocessor.h"
class LLAvatarName;
class LLButton;
class LLCheckBoxCtrl;
class LLDropTarget;
class LLInventoryItem;
class LLLineEditor;
class LLNameEditor;
class LLPanelAvatar;
class LLScrollListCtrl;
class LLTabContainer;
class LLTextBox;
class LLTextEditor;
class LLTextureCtrl;
class LLUICtrl;
class LLViewerTexture;
class LLViewerObject;
class LLMessageSystem;
class LLIconCtrl;
class LLMediaCtrl;
class LLPanelPick;
@@ -328,7 +316,6 @@ public:
static void onClickGetKey(void *userdata);
static void onClickOK( void *userdata);
static void onClickCancel( void *userdata);
static void onClickMute( void *userdata);
private:
void enableOKIfReady();

View File

@@ -183,8 +183,8 @@
label="Instant Message..." label_selected="Instant Message..."
left_delta="71" mouse_opaque="true" name="Instant Message..."
tool_tip="Instant Message (IM)" width="140" />
<button bottom="-470" ffont="SansSerif" halign="center" height="20" label="Mute"
label_selected="Mute" left_delta="141" mouse_opaque="true" name="Mute"
<button bottom="-470" font="SansSerifSmall" halign="center" height="20" label="(Un)Mute"
left_delta="141" mouse_opaque="true" name="Mute"
width="60" />
<button bottom="-470" font="SansSerif" halign="center" height="20" label="Invite to Group"
label_selected="Invite to Group" left_delta="61" mouse_opaque="true"