diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index e528e92a2..295b4180d 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -406,6 +406,17 @@ Value This is an autoresponse! + AutoresponseOnlyIfAway + + Comment + When true, enabled autoresponses (not busy responses) will only be sent while in away (or Fake Away) mode. Does not apply to autoresponses to muted persons, they don't need to know you're away. + Persist + 1 + Type + Boolean + Value + 0 + BusyModeResponse Comment diff --git a/indra/newview/llprefsvoice.cpp b/indra/newview/llprefsvoice.cpp index eddfd2408..86e39d07d 100644 --- a/indra/newview/llprefsvoice.cpp +++ b/indra/newview/llprefsvoice.cpp @@ -121,7 +121,7 @@ BOOL LLPrefsVoice::postBuild() getChild("set_voice_hotkey_button")->setCommitCallback(boost::bind(LLVoiceSetKeyDialog::start, this)); getChild("set_voice_middlemouse_button")->setCommitCallback(boost::bind(&LLView::setValue, getChildView("modifier_combo"), "MiddleMouse")); - getChild("set_voice_middlemouse_button")->setEnabled(!gSavedSettings.getBOOL("CmdLineDisableVoice") && gSavedSettings.getBOOL("EnableVoiceChat")); + getChildView("enable_voice_check")->setValue(!gSavedSettings.getBOOL("CmdLineDisableVoice") && gSavedSettings.getBOOL("EnableVoiceChat")); if (LLCheckBoxCtrl* check = findChild("enable_multivoice_check")) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 13cf64827..dbd630fb9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2294,9 +2294,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } // These bools are here because they would make mess of logic down below in IM_NOTHING_SPECIAL. - bool is_autorespond = !is_muted && (is_friend || !gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneFriendsOnly")) && gSavedPerAccountSettings.getBOOL("AutoresponseAnyone"); + bool autorespond_status = gAgent.getAFK() || !gSavedPerAccountSettings.getBOOL("AutoresponseOnlyIfAway") || gSavedSettings.getBOOL("FakeAway"); + bool is_autorespond = !is_muted && autorespond_status && (is_friend || !gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneFriendsOnly")) && gSavedPerAccountSettings.getBOOL("AutoresponseAnyone"); bool is_autorespond_muted = is_muted && gSavedPerAccountSettings.getBOOL("AutoresponseMuted"); - bool is_autorespond_nonfriends = !is_friend && !is_muted && gSavedPerAccountSettings.getBOOL("AutoresponseNonFriends"); + bool is_autorespond_nonfriends = !is_friend && !is_muted && autorespond_status && gSavedPerAccountSettings.getBOOL("AutoresponseNonFriends"); LLSD args; switch(dialog)