From a7d1a4611fbb6006d280f144e8be99bc7b5fd0af Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 9 Jan 2013 10:19:41 -0500 Subject: [PATCH] Optionally, have IM buttons on the same line as the person's name. Adds UseConciseIMButtons. Adds floater_instant_message_concisebuttons.xml Adds Have buttons on the same line as name for IMs (Affects new IMs) checkbox to Adv. Chat's Chat UI tab. --- indra/newview/app_settings/settings.xml | 11 +++++++ indra/newview/ascentprefschat.cpp | 2 ++ indra/newview/llimpanel.cpp | 9 +++--- ...floater_instant_message_concisebuttons.xml | 31 +++++++++++++++++++ .../en-us/panel_preferences_ascent_chat.xml | 1 + 5 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 indra/newview/skins/default/xui/en-us/floater_instant_message_concisebuttons.xml diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f1e85ef46..670279129 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -760,6 +760,17 @@ Found in Advanced->Rendering->Info Displays Value 0 + UseConciseIMButtons + + Comment + Whether or not IMs use buttons concisely on the same line as the name of the receiver, changes apply to new IMs only. + Persist + 1 + Type + Boolean + Value + 0 + ConciseIMButtons ShowLocalChatFloaterBar Comment diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index e5c046084..467d0b40b 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -377,6 +377,7 @@ void LLPrefsAscentChat::refreshValues() mOtherChatsTornOff = gSavedSettings.getBOOL("OtherChatsTornOff"); mShowLocalChatFloaterBar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); mHorizButt = gSavedSettings.getBOOL("ContactsUseHorizontalButtons"); + mOneLineIMButt = gSavedSettings.getBOOL("UseConciseIMButtons"); mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); //Spam -------------------------------------------------------------------------------- @@ -602,6 +603,7 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("OtherChatsTornOff", mOtherChatsTornOff); gSavedSettings.setBOOL("ShowLocalChatFloaterBar", mShowLocalChatFloaterBar); gSavedSettings.setBOOL("ContactsUseHorizontalButtons", mHorizButt); + gSavedSettings.setBOOL("UseConciseIMButtons", mOneLineIMButt); gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm); //Spam -------------------------------------------------------------------------------- diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 2cbe64c02..65617418f 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1184,7 +1184,8 @@ void LLFloaterIMPanel::init(const std::string& session_label) // [Ansariel: Display name support] mProfileButtonEnabled = FALSE; // [/Ansariel: Display name support] - + + static LLCachedControl concisebuttons("UseConciseIMButtons"); std::string xml_filename; switch(mDialog) { @@ -1206,7 +1207,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_P2P_INVITE: - xml_filename = "floater_instant_message.xml"; + xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mSessionLabel, mOtherParticipantUUID); break; case IM_SESSION_CONFERENCE_START: @@ -1217,7 +1218,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) // just received text from another user case IM_NOTHING_SPECIAL: - xml_filename = "floater_instant_message.xml"; + xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionUUID); mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID); @@ -1227,7 +1228,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) break; default: llwarns << "Unknown session type" << llendl; - xml_filename = "floater_instant_message.xml"; + xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; break; } diff --git a/indra/newview/skins/default/xui/en-us/floater_instant_message_concisebuttons.xml b/indra/newview/skins/default/xui/en-us/floater_instant_message_concisebuttons.xml new file mode 100644 index 000000000..2f8858665 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_instant_message_concisebuttons.xml @@ -0,0 +1,31 @@ + + + Connecting... + Calling... + Connected, click End Call to hang up + Call ended + icn_voice-pvtfocus.tga + Instant Message with [NAME] + [NAME] is typing... + Starting session with [NAME], please wait. + Click here to instant message. + Text chat is not available for this call. + Inventory item offered +