summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r--indra/newview/llfloaterimsession.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index b782515c14..5dd78fe1db 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -109,7 +109,7 @@ void LLFloaterIMSession::refresh()
if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState)
{
LL_DEBUGS("TypingMsgs") << "Send additional Start Typing packet" << LL_ENDL;
- LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
+ LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true);
mMeTypingTimer.reset();
}
@@ -333,7 +333,7 @@ void LLFloaterIMSession::initIMFloater()
// Disable input editor if session cannot accept text
if ( mSession && !mSession->mTextIMPossible )
{
- mInputEditor->setEnabled(FALSE);
+ mInputEditor->setEnabled(false);
mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label"));
}
@@ -345,9 +345,9 @@ void LLFloaterIMSession::initIMFloater()
}
//virtual
-BOOL LLFloaterIMSession::postBuild()
+bool LLFloaterIMSession::postBuild()
{
- BOOL result = LLFloaterIMSessionTab::postBuild();
+ bool result = LLFloaterIMSessionTab::postBuild();
mInputEditor->setMaxTextLength(1023);
mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
@@ -380,7 +380,7 @@ void LLFloaterIMSession::onAddButtonClicked()
{
LLView * button = findChild<LLView>("toolbar_panel")->findChild<LLButton>("add_btn");
LLFloater* root_floater = gFloaterView->getParentFloater(this);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), TRUE, TRUE, FALSE, root_floater->getName(), button);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), true, true, false, root_floater->getName(), button);
if (!picker)
{
return;
@@ -615,13 +615,13 @@ LLFloaterIMSession* LLFloaterIMSession::show(const LLUUID& session_id)
LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END;
if (floater_container)
{
- floater_container->addFloater(floater, TRUE, i_pt);
+ floater_container->addFloater(floater, true, i_pt);
}
}
floater->openFloater(floater->getKey());
- floater->setVisible(TRUE);
+ floater->setVisible(true);
return floater;
}
@@ -679,7 +679,7 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock)
}
}
-void LLFloaterIMSession::setMinimized(BOOL b)
+void LLFloaterIMSession::setMinimized(bool b)
{
bool wasMinimized = isMinimized();
LLFloaterIMSessionTab::setMinimized(b);
@@ -696,7 +696,7 @@ void LLFloaterIMSession::setMinimized(BOOL b)
}
}
-void LLFloaterIMSession::setVisible(BOOL visible)
+void LLFloaterIMSession::setVisible(bool visible)
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
@@ -732,7 +732,7 @@ void LLFloaterIMSession::setVisible(BOOL visible)
}
-BOOL LLFloaterIMSession::getVisible()
+bool LLFloaterIMSession::getVisible()
{
bool visible;
@@ -751,7 +751,7 @@ BOOL LLFloaterIMSession::getVisible()
}
else
{
- // getVisible() returns TRUE when Tabbed IM window is minimized.
+ // getVisible() returns true when Tabbed IM window is minimized.
visible = is_active && !im_container->isMinimized()
&& im_container->getVisible();
}
@@ -764,7 +764,7 @@ BOOL LLFloaterIMSession::getVisible()
return visible;
}
-void LLFloaterIMSession::setFocus(BOOL focus)
+void LLFloaterIMSession::setFocus(bool focus)
{
LLFloaterIMSessionTab::setFocus(focus);
@@ -792,8 +792,8 @@ bool LLFloaterIMSession::toggle(const LLUUID& session_id)
}
else if(floater && ((!floater->isDocked() || floater->getVisible()) && !floater->hasFocus()))
{
- floater->setVisible(TRUE);
- floater->setFocus(TRUE);
+ floater->setVisible(true);
+ floater->setFocus(true);
return true;
}
}
@@ -999,7 +999,7 @@ void LLFloaterIMSession::setTyping(bool typing)
if ( mTypingTimer.getElapsedTimeF32() > 1.f )
{
// Still typing, send 'start typing' notification
- LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
+ LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true);
mShouldSendTypingState = false;
mMeTypingTimer.reset();
}
@@ -1007,7 +1007,7 @@ void LLFloaterIMSession::setTyping(bool typing)
else
{
// Send 'stop typing' notification immediately
- LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE);
+ LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, false);
mShouldSendTypingState = false;
}
}
@@ -1017,12 +1017,12 @@ void LLFloaterIMSession::setTyping(bool typing)
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if (speaker_mgr)
{
- speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE);
+ speaker_mgr->setSpeakerTyping(gAgent.getID(), false);
}
}
}
-void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, BOOL typing)
+void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, bool typing)
{
LL_DEBUGS("TypingMsgs") << "typing=" << typing << LL_ENDL;
if ( typing )
@@ -1063,7 +1063,7 @@ void LLFloaterIMSession::processAgentListUpdates(const LLSD& body)
// process the moderator mutes
if (agent_id == gAgentID && agent_data.has("info") && agent_data["info"].has("mutes"))
{
- BOOL moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean();
+ bool moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean();
mInputEditor->setEnabled(!moderator_muted_text);
std::string label;
if (moderator_muted_text)
@@ -1108,7 +1108,7 @@ void LLFloaterIMSession::processSessionUpdate(const LLSD& session_update)
if ( false && session_update.has("moderated_mode") &&
session_update["moderated_mode"].has("voice") )
{
- BOOL voice_moderated = session_update["moderated_mode"]["voice"];
+ bool voice_moderated = session_update["moderated_mode"]["voice"];
const std::string session_label = LLIMModel::instance().getName(mSessionID);
if (voice_moderated)
@@ -1141,7 +1141,7 @@ void LLFloaterIMSession::draw()
}
// virtual
-BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
@@ -1164,7 +1164,7 @@ BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
cargo_type, cargo_data, accept);
}
- return TRUE;
+ return true;
}
bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop)
@@ -1187,21 +1187,21 @@ bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop)
return res;
}
-BOOL LLFloaterIMSession::isInviteAllowed() const
+bool LLFloaterIMSession::isInviteAllowed() const
{
return ( (IM_SESSION_CONFERENCE_START == mDialog)
|| (IM_SESSION_INVITE == mDialog && !gAgent.isInGroup(mSessionID))
|| mIsP2PChat);
}
-BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
+bool LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
{
LLViewerRegion* region = gAgent.getRegion();
bool is_region_exist = region != NULL;
if (is_region_exist)
{
- S32 count = ids.size();
+ auto count = ids.size();
if( isInviteAllowed() && (count > 0) )
{
@@ -1211,7 +1211,7 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
LLSD data;
data["params"] = LLSD::emptyArray();
- for (int i = 0; i < count; i++)
+ for (size_t i = 0; i < count; i++)
{
data["params"].append(ids[i]);
}
@@ -1275,7 +1275,7 @@ Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of t
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if ( speaker_mgr )
{
- speaker_mgr->setSpeakerTyping(from_id, TRUE);
+ speaker_mgr->setSpeakerTyping(from_id, true);
}
}
}
@@ -1292,7 +1292,7 @@ void LLFloaterIMSession::removeTypingIndicator(const LLUUID& from_id)
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if (speaker_mgr)
{
- speaker_mgr->setSpeakerTyping(from_id, FALSE);
+ speaker_mgr->setSpeakerTyping(from_id, false);
}
}
}