From 72c4c63b95dea739323496b6bb1bc6dd40a91bc0 Mon Sep 17 00:00:00 2001 From: Beeks Date: Tue, 21 Sep 2010 14:53:36 -0400 Subject: [PATCH] Adjustments to IMs - Got "Announce incoming IMs" working. Group name can now be shown in the local chat notifications for IMs. "IM Received" changes to "New IM" for length. Signed-off-by: Beeks --- indra/newview/app_settings/settings.xml | 22 +++++++++++++++++++ indra/newview/ascentprefssys.cpp | 12 +++++----- indra/newview/llimview.cpp | 16 ++++++++++++-- indra/newview/lloverlaybar.cpp | 6 ++--- .../en-us/panel_preferences_ascent_system.xml | 13 ++++++----- 5 files changed, 52 insertions(+), 17 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 02a2f6a73..610b2b92d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13,6 +13,28 @@ Value 1 + OptionShowGroupNameInChatIM + + Comment + Show group name in IM notification + Persist + 1 + Type + Boolean + Value + 1 + + AscentInstantMessageAnnounceIncoming + + Comment + Start IM window as soon as the person starts typing + Persist + 1 + Type + Boolean + Value + 1 + AscentShowLookAt Comment diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 6ea23c3c4..73aaca900 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -257,7 +257,7 @@ void LLPrefsAscentSysImpl::refresh() combo->setCurrentByIndex(mDateFormat); } - childSetValue("seconds_in_chat_and_ims_check", mEnableOOCAutoClose); + childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") ); @@ -268,10 +268,9 @@ void LLPrefsAscentSysImpl::refresh() childSetValue("AscentInstantMessageResponseMuted", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted")); childSetValue("AscentInstantMessageResponseAnyone", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone")); childSetValue("AscentInstantMessageShowResponded", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded")); - childSetValue("AscentInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowOnTyping")); + childSetValue("AscentInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")); childSetValue("AscentInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat" )); childSetValue("AscentInstantMessageResponseItem", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem")); - childSetValue("AscentInstantMessageAnnounceIncoming", gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")); //Save Performance -------------------------------------------------------------------- @@ -385,8 +384,9 @@ void LLPrefsAscentSysImpl::apply() //Missing the echo/log option. gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check")); gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check")); - gSavedSettings.setBOOL("AscentAllowMUpose", childGetValue("allow_mu_pose_check")); - gSavedSettings.setBOOL("AscentAutoCloseOOC", childGetValue("close_ooc_check")); + gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean()); + gSavedSettings.setBOOL("AscentAllowMUpose", childGetValue("allow_mu_pose_check").asBoolean()); + gSavedSettings.setBOOL("AscentAutoCloseOOC", childGetValue("close_ooc_check").asBoolean()); //gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link"). ); LLComboBox* combo = getChild("time_format_combobox"); @@ -437,7 +437,7 @@ 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")); + gSavedSettings.setBOOL("SecondsInChatAndIMs", childGetValue("seconds_in_chat_and_ims_check").asBoolean()); gSavedPerAccountSettings.setString("AscentInstantMessageResponse", childGetValue("im_response").asString()); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 08e274bed..e926c2dab 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1540,8 +1540,20 @@ public: message_params["region_id"].asUUID(), ll_vector3_from_sd(message_params["position"]), true); - - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + LLGroupData group_data; + gAgent.getGroupData(session_id, group_data); + std::string prepend_msg; + if (gAgent.isInGroup(session_id)&& gSavedSettings.getBOOL("OptionShowGroupNameInChatIM")) + { + prepend_msg = "["; + prepend_msg += group_data.mName; + prepend_msg += "] "; + } + else + { + prepend_msg = std::string("IM: "); + } + chat.mText = prepend_msg + name + separator_string + saved + message.substr(message_offset); LLFloaterChat::addChat(chat, TRUE, is_this_agent); //K now we want to accept the invitation diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index 39f2b1324..c786c9710 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -155,7 +155,7 @@ bool updateChatVisible(const LLSD &data) BOOL LLOverlayBar::postBuild() { - childSetAction("IM Received",onClickIMReceived,this); + childSetAction("New IM",onClickIMReceived,this); childSetAction("Set Not Busy",onClickSetNotBusy,this); childSetAction("Mouselook",onClickMouselook,this); childSetAction("Stand Up",onClickStandUp,this); @@ -167,7 +167,7 @@ BOOL LLOverlayBar::postBuild() setFocusRoot(TRUE); mBuilt = true; - mOriginalIMLabel = getChild("IM Received")->getLabelSelected(); + mOriginalIMLabel = getChild("New IM")->getLabelSelected(); layoutButtons(); @@ -242,7 +242,7 @@ void LLOverlayBar::refresh() BOOL im_received = gIMMgr->getIMReceived(); int unread_count = gIMMgr->getIMUnreadCount(); - LLButton* button = getChild("IM Received"); + LLButton* button = getChild("New IM"); if ((button && button->getVisible() != im_received) || (button && button->getVisible())) 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 e8070ec5c..a9d40c95b 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 @@ -77,7 +77,7 @@ tool_tip="Adds features deemed too dangerous for normal use. These features can wreak havoc or do bad things if misused - Mostly to yourself or your belongings. If you're sure, activate the checkbox below as well." mouse_opaque="true" name="power_user_check" radio_style="false" width="400" /> - -