From 6d571fa8d1f9bbf73d5c2956585c33ec87201035 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 14 Jun 2009 03:05:02 -0700 Subject: Added IM preference for showing IMs in either main or local chat --- linden/indra/newview/app_settings/settings.xml | 11 +++ linden/indra/newview/llfloaterchat.cpp | 2 +- linden/indra/newview/llprefsim.cpp | 4 ++ .../default/xui/en-us/panel_preferences_im.xml | 82 ++++++++++++---------- 4 files changed, 62 insertions(+), 37 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 774a13b..5c76185 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -3911,6 +3911,17 @@ 1.0 + IMInChatConsole + + Comment + Show IMs in main chat + Persist + 1 + Type + Boolean + Value + 0 + IMInChatHistory Comment diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 8e9d489..5117b8d 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -386,7 +386,7 @@ void LLFloaterChat::addChat(const LLChat& chat, size = INSTANT_MSG_SIZE; } // We display anything if it's not an IM. If it's an IM, check pref... - if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatHistory") ) + if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatConsole") ) { gConsole->addLine(chat.mText, size, text_color); } diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 1af6e86..39619b7 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -96,6 +96,7 @@ BOOL LLPrefsIMImpl::postBuild() childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change")); // Don't enable this until we get personal data + childDisable("include_im_in_chat_console"); childDisable("include_im_in_chat_history"); childDisable("show_timestamps_check"); childDisable("friends_online_notify_checkbox"); @@ -114,6 +115,7 @@ BOOL LLPrefsIMImpl::postBuild() childSetText("busy_response", getString("log_in_to_change")); + childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole")); childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory")); childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps")); childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); @@ -163,6 +165,7 @@ void LLPrefsIMImpl::apply() gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response))); + gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean()); gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean()); gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean()); gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); @@ -234,6 +237,7 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e mOriginalHideOnlineStatus = true; } + childEnable("include_im_in_chat_console"); childEnable("include_im_in_chat_history"); childEnable("show_timestamps_check"); childEnable("friends_online_notify_checkbox"); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml index f0f79e4..ee00455 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml @@ -2,92 +2,102 @@ - - My Online Status: - - + - - IM Options: - - - log in to change - - + + log in to change + + - + Show IMs in: + + - + + - - + - Busy Mode Response: - - + - - Logging Options: - - + - - - - - - -