From 33ce919ab06dce92a8340cf9e25faf85bfc01f59 Mon Sep 17 00:00:00 2001 From: Beeks Date: Sat, 18 Sep 2010 23:47:30 -0400 Subject: [PATCH 1/2] Minor fix for auto-responder stuff. Signed-off-by: Beeks --- .../app_settings/settings_per_account.xml | 124 ++++++++++++++++++ indra/newview/llviewermessage.cpp | 7 +- 2 files changed, 127 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 61f8eda9a..50e3693db 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -13,6 +13,130 @@ + Responder.Settings + + Comment + New organization to the Auto-Respond settings for keeping clean + Persist + 1 + Type + LLSD + Value + + Message + This is an autoresponse! + + + AscentInstantMessageAnnounceIncoming + + Comment + Open a new IM tab when another person begins typing to you and announce that they are doing so. + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponse + + Comment + Auto response to instant messages + Persist + 1 + Type + String + Value + This is an autoresponse! + + AscentInstantMessageResponseAnyone + + Comment + Whether to auto-respond to anyone + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseFriends + + Comment + Whether to auto-respond to non-friends + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseItem + + Comment + Whether to send a item along with the autoresponse + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseItemData + + Comment + UUID + Persist + 1 + Type + String + Value + + + AscentInstantMessageResponseMuted + + Comment + Whether to auto-respond to muted people + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageResponseRepeat + + Comment + Whether to keep on resending the autoresponse every line they send + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageShowOnTyping + + Comment + Whether to perform the autorespond the moment they begin to type instead of waiting for a actual message + Persist + 1 + Type + Boolean + Value + 0 + + AscentInstantMessageShowResponded + + Comment + Whether to hide IMs entirely from those you have chosen to send autoresponses + Persist + 1 + Type + Boolean + Value + 0 + AscentFriendColor diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e34678042..a05e080b2 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1477,10 +1477,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) BOOL is_linden = LLMuteList::getInstance()->isLinden(name); BOOL is_owned_by_me = FALSE; - // - //chat.mMuted = is_muted && !is_linden; - chat.mMuted = is_muted; - // + LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id); + + chat.mMuted = is_muted && !is_linden; chat.mFromID = from_id; chat.mFromName = name; chat.mSourceType = (from_id.isNull() || (name == std::string(SYSTEM_FROM))) ? CHAT_SOURCE_SYSTEM : CHAT_SOURCE_AGENT; From 615b4896d1a163c710c40c5392f76423a3cad182 Mon Sep 17 00:00:00 2001 From: Beeks Date: Sun, 19 Sep 2010 00:22:23 -0400 Subject: [PATCH 2/2] Finishing touches for Auto-Responses. Signed-off-by: Beeks --- indra/newview/ascentprefssys.cpp | 37 ++++++++++++++++--- indra/newview/ascentprefsvan.cpp | 6 +-- .../en-us/panel_preferences_ascent_system.xml | 10 ++++- 3 files changed, 43 insertions(+), 10 deletions(-) diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 11fa26b94..6ea23c3c4 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -1,12 +1,12 @@ /** - * @file hbprefsinert.cpp - * @author Henri Beauchamp - * @brief Ascent Viewer preferences panel + * @file ascentprefssys.cpp + * @Ascent Viewer preferences panel * * $LicenseInfo:firstyear=2008&license=viewergpl$ * * Copyright (c) 2008, Henri Beauchamp. - * + * Rewritten in its entirety 2010 Hg Beeks. + * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 @@ -258,6 +258,22 @@ void LLPrefsAscentSysImpl::refresh() } childSetValue("seconds_in_chat_and_ims_check", mEnableOOCAutoClose); + + + LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") ); + LLWStringUtil::replaceChar(auto_response, '^', '\n'); + LLWStringUtil::replaceChar(auto_response, '%', ' '); + childSetText("im_response", wstring_to_utf8str(auto_response)); + childSetValue("AscentInstantMessageResponseFriends", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends")); + childSetValue("AscentInstantMessageResponseMuted", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted")); + childSetValue("AscentInstantMessageResponseAnyone", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone")); + childSetValue("AscentInstantMessageShowResponded", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded")); + childSetValue("AscentInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowOnTyping")); + childSetValue("AscentInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat" )); + childSetValue("AscentInstantMessageResponseItem", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem")); + childSetValue("AscentInstantMessageAnnounceIncoming", gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")); + + //Save Performance -------------------------------------------------------------------- childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin); childSetValue("enable_wind", mEnableLLWind); @@ -421,9 +437,20 @@ void LLPrefsAscentSysImpl::apply() gSavedSettings.setString("ShortTimeFormat", short_time); gSavedSettings.setString("LongTimeFormat", long_time); gSavedSettings.setString("TimestampFormat", timestamp); - gSavedSettings.setBOOL("SecondsInChatAndIMs", childGetValue("seconds_in_chat_and_ims_check")); + + gSavedPerAccountSettings.setString("AscentInstantMessageResponse", childGetValue("im_response").asString()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", childGetValue("AscentInstantMessageResponseMuted").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends", childGetValue("AscentInstantMessageResponseFriends").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", childGetValue("AscentInstantMessageResponseMuted").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone", childGetValue("AscentInstantMessageResponseAnyone").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded", childGetValue("AscentInstantMessageShowResponded").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping", childGetValue("AscentInstantMessageShowOnTyping").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", childGetValue("AscentInstantMessageResponseRepeat").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", childGetValue("AscentInstantMessageResponseItem").asBoolean()); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean()); + //Performance ---------------------------------------------------------------------------- gSavedSettings.setBOOL("FetchInventoryOnLogin", childGetValue("fetch_inventory_on_login_check")); gSavedSettings.setBOOL("WindEnabled", childGetValue("enable_wind")); diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 3e71b9046..641b76fe3 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -1,11 +1,11 @@ /** - * @file hbprefsinert.cpp - * @author Henri Beauchamp - * @brief Ascent Viewer preferences panel + * @file ascentprefsvan.cpp + * @Ascent Viewer preferences panel * * $LicenseInfo:firstyear=2008&license=viewergpl$ * * Copyright (c) 2008, Henri Beauchamp. + * Rewritten in its entirety 2010 Hg Beeks. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index f68a75d4d..02b03bd2b 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -108,8 +108,14 @@ tool_tip="IM partners will not see '______ is typing...' when you're responding." mouse_opaque="true" name="hide_typing_check" radio_style="false" width="400" /> + - -