summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp121
1 files changed, 60 insertions, 61 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ce4a032b27..10fe740138 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -99,16 +99,16 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141
LLIMMgr* gIMMgr = NULL;
-BOOL LLSessionTimeoutTimer::tick()
+bool LLSessionTimeoutTimer::tick()
{
- if (mSessionId.isNull()) return TRUE;
+ if (mSessionId.isNull()) return true;
LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId);
if (session && !session->mSessionInitialized)
{
gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId);
}
- return TRUE;
+ return true;
}
@@ -206,26 +206,26 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
if (msg["source_type"].asInteger() == CHAT_SOURCE_OBJECT)
{
user_preferences = gSavedSettings.getString("NotificationObjectIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
}
else
{
- user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == TRUE))
+ user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
- }
+ }
}
}
- else if(session->isP2PSessionType())
+ else if (session->isP2PSessionType())
{
if (LLAvatarTracker::instance().isBuddy(participant_id))
{
user_preferences = gSavedSettings.getString("NotificationFriendIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -233,24 +233,24 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else
{
user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
- }
- }
+ }
+ }
}
- else if(session->isAdHocSessionType())
+ else if (session->isAdHocSessionType())
{
user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
- }
+ }
}
else if(session->isGroupSessionType())
{
user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == TRUE))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -300,8 +300,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else
{
store_dnd_message = true;
- }
-
+ }
}
// 2. Flash line item
@@ -708,7 +707,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
}
else
{
- //tick returns TRUE - timer will be deleted after the tick
+ //tick returns true - timer will be deleted after the tick
new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT);
}
@@ -925,7 +924,7 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from,
if (mSpeakers && from_id.notNull())
{
mSpeakers->speakerChatted(from_id);
- mSpeakers->setSpeakerTyping(from_id, FALSE);
+ mSpeakers->setSpeakerTyping(from_id, false);
}
}
@@ -1288,7 +1287,7 @@ bool LLIMModel::LLIMSession::isOutgoingAdHoc() const
bool LLIMModel::LLIMSession::isAdHoc()
{
- return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID, TRUE));
+ return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID, true));
}
bool LLIMModel::LLIMSession::isP2P()
@@ -1298,7 +1297,7 @@ bool LLIMModel::LLIMSession::isP2P()
bool LLIMModel::LLIMSession::isGroupChat()
{
- return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID, TRUE));
+ return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID, true));
}
LLUUID LLIMModel::LLIMSession::generateOutgoingAdHocHash() const
@@ -1755,7 +1754,7 @@ const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const
// TODO get rid of other participant ID
-void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing)
+void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, bool typing)
{
std::string name;
LLAgentUI::buildFullname(name);
@@ -1763,7 +1762,7 @@ void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id,
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
other_participant_id,
name,
@@ -1783,7 +1782,7 @@ void LLIMModel::sendLeaveSession(const LLUUID& session_id, const LLUUID& other_p
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
other_participant_id,
name,
@@ -1831,7 +1830,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
pack_instant_message(
gMessageSystem,
gAgent.getID(),
- FALSE,
+ false,
gAgent.getSessionID(),
other_participant_id,
name.c_str(),
@@ -1890,7 +1889,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
if (speaker_mgr)
{
speaker_mgr->speakerChatted(gAgentID);
- speaker_mgr->setSpeakerTyping(gAgentID, FALSE);
+ speaker_mgr->setSpeakerTyping(gAgentID, false);
}
}
@@ -1955,7 +1954,7 @@ void session_starter_helper(
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MessageBlock);
- msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addBOOLFast(_PREHASH_FromGroup, false);
msg->addUUIDFast(_PREHASH_ToAgentID, other_participant_id);
msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
msg->addU8Fast(_PREHASH_Dialog, im_type);
@@ -2109,7 +2108,7 @@ LLUUID LLIMMgr::computeSessionID(
}
}
- if (gAgent.isInGroup(session_id, TRUE) && (session_id != other_participant_id))
+ if (gAgent.isInGroup(session_id, true) && (session_id != other_participant_id))
{
LL_WARNS() << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << LL_ENDL;
}
@@ -2192,7 +2191,7 @@ LLIMMgr::onConfirmForceCloseError(
LLFloater* floater = LLFloaterIMSession::findInstance(session_id);
if ( floater )
{
- floater->closeFloater(FALSE);
+ floater->closeFloater(false);
}
return false;
}
@@ -2341,7 +2340,7 @@ LLCallDialog::LLCallDialog(const LLSD& payload)
mPayload(payload),
mLifetime(DEFAULT_LIFETIME)
{
- setAutoFocus(FALSE);
+ setAutoFocus(false);
// force docked state since this floater doesn't save it between recreations
setDocked(true);
}
@@ -2351,14 +2350,14 @@ LLCallDialog::~LLCallDialog()
LLUI::getInstance()->removePopup(this);
}
-BOOL LLCallDialog::postBuild()
+bool LLCallDialog::postBuild()
{
if (!LLDockableFloater::postBuild() || !gToolBarView)
- return FALSE;
+ return false;
dockToToolbarButton("speak");
- return TRUE;
+ return true;
}
void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName)
@@ -2432,7 +2431,7 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id)
{
bool participant_is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
- bool is_group = participant_is_avatar && gAgent.isInGroup(session_id, TRUE);
+ bool is_group = participant_is_avatar && gAgent.isInGroup(session_id, true);
LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon");
@@ -2621,13 +2620,13 @@ void LLOutgoingCallDialog::onCancel(void* user_data)
}
-BOOL LLOutgoingCallDialog::postBuild()
+bool LLOutgoingCallDialog::postBuild()
{
- BOOL success = LLCallDialog::postBuild();
+ bool success = LLCallDialog::postBuild();
childSetAction("Cancel", onCancel, this);
- setCanDrag(FALSE);
+ setCanDrag(false);
return success;
}
@@ -2675,14 +2674,14 @@ void LLIncomingCallDialog::onLifetimeExpired()
}
}
-BOOL LLIncomingCallDialog::postBuild()
+bool LLIncomingCallDialog::postBuild()
{
LLCallDialog::postBuild();
if (!mPayload.isMap() || mPayload.size() == 0)
{
LL_INFOS("IMVIEW") << "IncomingCall: invalid argument" << LL_ENDL;
- return TRUE;
+ return true;
}
LLUUID session_id = mPayload["session_id"].asUUID();
@@ -2692,14 +2691,14 @@ BOOL LLIncomingCallDialog::postBuild()
if (session_id.isNull() && caller_id.asUUID().isNull())
{
LL_INFOS("IMVIEW") << "IncomingCall: invalid ids" << LL_ENDL;
- return TRUE;
+ return true;
}
std::string notify_box_type = mPayload["notify_box_type"].asString();
if (!is_voice_call_type(notify_box_type))
{
LL_INFOS("IMVIEW") << "IncomingCall: notify_box_type was not provided" << LL_ENDL;
- return TRUE;
+ return true;
}
// init notification's lifetime
@@ -2710,7 +2709,7 @@ BOOL LLIncomingCallDialog::postBuild()
}
std::string call_type;
- if (gAgent.isInGroup(session_id, TRUE))
+ if (gAgent.isInGroup(session_id, true))
{
LLStringUtil::format_map_t args;
LLGroupData data;
@@ -2761,8 +2760,8 @@ BOOL LLIncomingCallDialog::postBuild()
bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup");
- setCanDrag(FALSE);
- return TRUE;
+ setCanDrag(false);
+ return true;
}
void LLIncomingCallDialog::setCallerName(const std::string& ui_title,
@@ -2881,7 +2880,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
case IM_SESSION_CONFERENCE_START:
case IM_SESSION_GROUP_START:
case IM_SESSION_INVITE:
- if (gAgent.isInGroup(session_id, TRUE))
+ if (gAgent.isInGroup(session_id, true))
{
LLGroupData data;
if (!gAgent.getGroupData(session_id, data)) break;
@@ -3056,7 +3055,7 @@ LLIMMgr::LLIMMgr()
LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLFloaterIMSession::sRemoveTypingIndicator, _1));
- gSavedPerAccountSettings.declareBOOL("FetchGroupChatHistory", TRUE, "Fetch recent messages from group chat servers when a group window opens", LLControlVariable::PERSIST_ALWAYS);
+ gSavedPerAccountSettings.declareBOOL("FetchGroupChatHistory", true, "Fetch recent messages from group chat servers when a group window opens", LLControlVariable::PERSIST_ALWAYS);
}
// Add a message to a session.
@@ -3170,7 +3169,7 @@ void LLIMMgr::addMessage(
}
//Play sound for new conversations
- if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == TRUE))
+ if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -3431,7 +3430,7 @@ void LLIMMgr::inviteToSession(
// voice invite question is different from default only for group call (EXT-7118)
std::string question_type = "VoiceInviteQuestionDefault";
- BOOL voice_invite = FALSE;
+ bool voice_invite = false;
bool is_linden = LLMuteList::isLinden(caller_name);
@@ -3439,21 +3438,21 @@ void LLIMMgr::inviteToSession(
{
//P2P is different...they only have voice invitations
notify_box_type = "VoiceInviteP2P";
- voice_invite = TRUE;
+ voice_invite = true;
}
- else if ( gAgent.isInGroup(session_id, TRUE) )
+ else if ( gAgent.isInGroup(session_id, true) )
{
//only really old school groups have voice invitations
notify_box_type = "VoiceInviteGroup";
question_type = "VoiceInviteQuestionGroup";
- voice_invite = TRUE;
+ voice_invite = true;
}
else if ( inv_type == INVITATION_TYPE_VOICE )
{
//else it's an ad-hoc
//and a voice ad-hoc
notify_box_type = "VoiceInviteAdHoc";
- voice_invite = TRUE;
+ voice_invite = true;
}
else if ( inv_type == INVITATION_TYPE_IMMEDIATE )
{
@@ -3542,7 +3541,7 @@ void LLIMMgr::inviteToSession(
}
else
{
- LLFloaterReg::showInstance("incoming_call", payload, FALSE);
+ LLFloaterReg::showInstance("incoming_call", payload, false);
}
// Add the caller to the Recent List here (at this point
@@ -3564,7 +3563,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarN
std::string notify_box_type = payload["notify_box_type"].asString();
- LLFloaterReg::showInstance("incoming_call", payload, FALSE);
+ LLFloaterReg::showInstance("incoming_call", payload, false);
}
//*TODO disconnects all sessions
@@ -3573,7 +3572,7 @@ void LLIMMgr::disconnectAllSessions()
//*TODO disconnects all IM sessions
}
-BOOL LLIMMgr::hasSession(const LLUUID& session_id)
+bool LLIMMgr::hasSession(const LLUUID& session_id)
{
return LLIMModel::getInstance()->findIMSession(session_id) != NULL;
}
@@ -3765,7 +3764,7 @@ bool LLIMMgr::endCall(const LLUUID& session_id)
if (im_session)
{
// need to update speakers' state
- im_session->mSpeakers->update(FALSE);
+ im_session->mSpeakers->update(false);
}
return true;
}
@@ -3883,15 +3882,15 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
void LLIMMgr::processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type)
{
- processIMTypingCore(from_id, im_type, TRUE);
+ processIMTypingCore(from_id, im_type, true);
}
void LLIMMgr::processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type)
{
- processIMTypingCore(from_id, im_type, FALSE);
+ processIMTypingCore(from_id, im_type, false);
}
-void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing)
+void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, bool typing)
{
LLUUID session_id = computeSessionID(im_type, from_id);
LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id);
@@ -4086,7 +4085,7 @@ public:
time_t timestamp =
(time_t) message_params["timestamp"].asInteger();
- BOOL is_do_not_disturb = gAgent.isDoNotDisturb();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
//don't return if user is muted b/c proper way to ignore a muted user who
//initiated an adhoc/group conference is to create then leave the session (see STORM-1731)