summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index bb0dbc7ff0..cefd5c72e8 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -376,7 +376,7 @@ LLAgent::LLAgent() :
mShowAvatar(TRUE),
mFrameAgent(),
- mIsBusy(FALSE),
+ mIsDoNotDisturb(false),
mControlFlags(0x00000000),
mbFlagsDirty(FALSE),
@@ -1397,39 +1397,27 @@ BOOL LLAgent::getAFK() const
}
//-----------------------------------------------------------------------------
-// setBusy()
+// setDoNotDisturb()
//-----------------------------------------------------------------------------
-void LLAgent::setBusy()
+void LLAgent::setDoNotDisturb(bool pIsDotNotDisturb)
{
- sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_START);
- mIsBusy = TRUE;
- if (gBusyMenu)
- {
- gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy"));
- }
- LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(true);
-}
+ mIsDoNotDisturb = pIsDotNotDisturb;
+ EAnimRequest animRequest = (pIsDotNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP);
-//-----------------------------------------------------------------------------
-// clearBusy()
-//-----------------------------------------------------------------------------
-void LLAgent::clearBusy()
-{
- mIsBusy = FALSE;
- sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_STOP);
- if (gBusyMenu)
+ sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, animRequest);
+ if (gDoNotDisturbMenu)
{
- gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy"));
+ gDoNotDisturbMenu->setLabel(LLTrans::getString((pIsDotNotDisturb ? "AvatarSetAvailable" : "AvatarSetDoNotDisturb")));
}
- LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(false);
+ LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(pIsDotNotDisturb);
}
//-----------------------------------------------------------------------------
-// getBusy()
+// isDoNotDisturb()
//-----------------------------------------------------------------------------
-BOOL LLAgent::getBusy() const
+bool LLAgent::isDoNotDisturb() const
{
- return mIsBusy;
+ return mIsDoNotDisturb;
}