diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-16 18:53:39 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-16 18:53:39 -0800 |
commit | a897e69ffc36b8159e89031c38846395b6551d0b (patch) | |
tree | 52e72530e30f9dd92ae94a70afa794a36a4bc79c /indra | |
parent | 2d9285cddb4a48fb766b21fac2705c8873e15f93 (diff) | |
parent | c6a0f0ae1dec5ef2f7657d8c1ca07d85c1fef55d (diff) |
merging in latest changes
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimview.cpp | 16 | ||||
-rwxr-xr-x | indra/newview/llviewermessage.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermessage.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 3 |
5 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 106811b7e0..2d2bd1f92e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -64,6 +64,7 @@ #include "lltoolbarview.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" +#include "message.h" const static std::string ADHOC_NAME_SUFFIX(" Conference"); @@ -2831,12 +2832,17 @@ void LLIMMgr::inviteToSession( if (voice_invite) { - if ( // if we are rejecting group calls - (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && notify_box_type == "VoiceInviteGroup") || - // or we're rejecting non-friend voice calls and this isn't a friend - (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)) - ) + bool isRejectGroupCall = (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && (notify_box_type == "VoiceInviteGroup")); + bool isRejectNonFriendCall = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)); + bool isRejectDoNotDisturb = gAgent.isDoNotDisturb(); + if (isRejectGroupCall || isRejectNonFriendCall || isRejectDoNotDisturb) { + if (isRejectDoNotDisturb && !isRejectGroupCall && !isRejectNonFriendCall) + { + LLSD args; + addSystemMessage(session_id, "you_auto_rejected_call", args); + send_do_not_disturb_message(gMessageSystem, caller_id, session_id); + } // silently decline the call LLIncomingCallDialog::processCallResponse(1, payload); return; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 56c9f81259..e21db146db 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -179,8 +179,6 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = FALSE // TeleportYourAgent }; -static void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id = LLUUID::null); - bool friendship_offer_callback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -3240,7 +3238,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } } -static void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id) +void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id) { if (gAgent.isDoNotDisturb()) { diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index b298f0060b..447fdeb9c7 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -152,6 +152,8 @@ void send_group_notice(const LLUUID& group_id, const std::string& message, const LLInventoryItem* item); +void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id = LLUUID::null); + void handle_lure(const LLUUID& invitee); void handle_lure(const uuid_vec_t& ids); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index bf2bfaf386..94307d2f93 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3695,6 +3695,7 @@ Do Not Disturb is on. You will not be notified of incoming communications. - Other residents will receive your Do Not Disturb response (set in Preferences > General). - Teleportation offers will be declined. +- Voice calls will be rejected. - Inventory offers will go to your Trash. <usetemplate ignoretext="I change my status to Do Not Disturb mode" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 8489e8ca0f..18b914c764 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3384,7 +3384,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="answered_call">Your call has been answered</string> <string name="you_started_call">You started a voice call</string> <string name="you_joined_call">You joined the voice call</string> - <string name="name_started_call">[NAME] started a voice call</string> + <string name="you_auto_rejected_call-im">You automatically rejected the voice call while 'Do Not Disturb' was on.</string> + <string name="name_started_call">[NAME] started a voice call</string> <string name="ringing-im"> Joining voice call... |