summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rw-r--r--indra/newview/llconversationview.cpp52
1 files changed, 24 insertions, 28 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 1abebc996b..ec55768673 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -57,7 +57,7 @@ public:
: conversation(conv)
{}
- virtual void onChange(EStatusType status, const std::string &channelURI, bool proximal)
+ virtual void onChange(EStatusType status, const LLSD& channelInfo, bool proximal)
{
conversation->showVoiceIndicator(conversation
&& status != STATUS_JOINING
@@ -98,10 +98,7 @@ LLConversationViewSession::~LLConversationViewSession()
if (mVoiceClientObserver)
{
- if (LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
- }
+ LLVoiceClient::removeObserver(mVoiceClientObserver);
delete mVoiceClientObserver;
}
@@ -206,7 +203,7 @@ bool LLConversationViewSession::isHighlightActive()
return (mFlashStateOn ? (mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : true) : mIsCurSelection);
}
-BOOL LLConversationViewSession::postBuild()
+bool LLConversationViewSession::postBuild()
{
LLFolderViewItem::postBuild();
@@ -259,16 +256,15 @@ BOOL LLConversationViewSession::postBuild()
icon->setVisible(true);
mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true);
mIsInActiveVoiceChannel = true;
- if(LLVoiceClient::instanceExists())
+
+ if (mVoiceClientObserver)
{
- if (mVoiceClientObserver)
- {
- LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
- delete mVoiceClientObserver;
- }
- mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
- LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver);
+ LLVoiceClient::removeObserver(mVoiceClientObserver);
+ delete mVoiceClientObserver;
}
+ mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
+ LLVoiceClient::addObserver(mVoiceClientObserver);
+
break;
}
default:
@@ -278,7 +274,7 @@ BOOL LLConversationViewSession::postBuild()
refresh(); // requires vmi
}
- return TRUE;
+ return true;
}
void LLConversationViewSession::draw()
@@ -286,7 +282,7 @@ void LLConversationViewSession::draw()
getViewModelItem()->update();
const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
- const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
+ const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
// Indicate that flash can start (moot operation if already started, done or not flashing)
startFlashing();
@@ -322,10 +318,10 @@ void LLConversationViewSession::draw()
LLView::draw();
}
-BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
{
//Will try to select a child node and then itself (if a child was not selected)
- BOOL result = LLFolderViewFolder::handleMouseDown(x, y, mask);
+ bool result = LLFolderViewFolder::handleMouseDown(x, y, mask);
//This node (conversation) was selected and a child (participant) was not
if(result && getRoot())
@@ -351,9 +347,9 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
return result;
}
-BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
{
- BOOL result = LLFolderViewFolder::handleMouseUp(x, y, mask);
+ bool result = LLFolderViewFolder::handleMouseUp(x, y, mask);
LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume");
LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice");
@@ -374,9 +370,9 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
return result;
}
-BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask )
+bool LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
- BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask);
+ bool result = LLFolderViewFolder::handleRightMouseDown(x, y, mask);
if(result)
{
@@ -446,7 +442,7 @@ void LLConversationViewSession::toggleCollapsedMode(bool is_collapsed)
mItemPanel->translate(mCollapsedMode ? -h_pad : h_pad, 0);
}
-void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
+void LLConversationViewSession::setVisibleIfDetached(bool visible)
{
// Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
// Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
@@ -616,7 +612,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti
addChild(outputMonitor);
}
-BOOL LLConversationViewParticipant::postBuild()
+bool LLConversationViewParticipant::postBuild()
{
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
@@ -640,7 +636,7 @@ BOOL LLConversationViewParticipant::postBuild()
LLFolderViewItem::postBuild();
refresh();
}
- return TRUE;
+ return true;
}
void LLConversationViewParticipant::draw()
@@ -653,7 +649,7 @@ void LLConversationViewParticipant::draw()
static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
- const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
+ const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
const LLFontGL* font = getLabelFontForStyle(mLabelStyle);
F32 right_x = 0;
@@ -765,9 +761,9 @@ void LLConversationViewParticipant::onInfoBtnClick()
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID));
}
-BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask )
{
- BOOL result = LLFolderViewItem::handleMouseDown(x, y, mask);
+ bool result = LLFolderViewItem::handleMouseDown(x, y, mask);
if(result && getRoot())
{