From ece92a1b7c97a20cc858d001642b505c83a26b88 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sat, 12 Jan 2013 14:42:55 -0500 Subject: [PATCH] Optionally, have group chat and conference buttons on title line. Adds UseConciseGroupChatButtons, and UseConciseConferenceButtons Adds "Buttons on group chat name line (Affects new group chats)" and "Buttons on conference title line (Affects new conferences)" checkboxes to Adv. Chat's Chat UI tab. Adds floater_instant_message_ad_hoc_concisebuttons.xml, floater_instant_message_group_concisebuttons.xml Brings panel_speaker_controls.xml's speakers_list down by 7 pixels, which is necessary because it is awkwardly high in old places as well, such as Local Chat. --- indra/newview/app_settings/settings.xml | 24 ++++++++++++++- indra/newview/ascentprefschat.cpp | 4 +++ indra/newview/ascentprefschat.h | 2 ++ indra/newview/llimpanel.cpp | 18 ++++++----- ..._instant_message_ad_hoc_concisebuttons.xml | 27 +++++++++++++++++ ...r_instant_message_group_concisebuttons.xml | 30 +++++++++++++++++++ .../en-us/panel_preferences_ascent_chat.xml | 4 ++- .../xui/en-us/panel_speaker_controls.xml | 2 +- 8 files changed, 100 insertions(+), 11 deletions(-) create mode 100644 indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml create mode 100644 indra/newview/skins/default/xui/en-us/floater_instant_message_group_concisebuttons.xml diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 670279129..5ac2fa00a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -770,7 +770,29 @@ Found in Advanced->Rendering->Info Displays Boolean Value 0 - ConciseIMButtons + + UseConciseGroupChatButtons + + Comment + Whether or not group chats use buttons concisely on the same line as the group name, changes apply to new group chats only. + Persist + 1 + Type + Boolean + Value + 0 + + UseConciseConferenceButtons + + Comment + Whether or not conferences use buttons concisely on the same line as the name of the conference, changes apply to new conferences only. + Persist + 1 + Type + Boolean + Value + 0 + ShowLocalChatFloaterBar Comment diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index 467d0b40b..dd8531965 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -378,6 +378,8 @@ void LLPrefsAscentChat::refreshValues() mShowLocalChatFloaterBar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); mHorizButt = gSavedSettings.getBOOL("ContactsUseHorizontalButtons"); mOneLineIMButt = gSavedSettings.getBOOL("UseConciseIMButtons"); + mOneLineGroupButt = gSavedSettings.getBOOL("UseConciseGroupChatButtons"); + mOneLineConfButt = gSavedSettings.getBOOL("UseConciseConferenceButtons"); mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); //Spam -------------------------------------------------------------------------------- @@ -604,6 +606,8 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("ShowLocalChatFloaterBar", mShowLocalChatFloaterBar); gSavedSettings.setBOOL("ContactsUseHorizontalButtons", mHorizButt); gSavedSettings.setBOOL("UseConciseIMButtons", mOneLineIMButt); + gSavedSettings.setBOOL("UseConciseGroupChatButtons", mOneLineGroupButt); + gSavedSettings.setBOOL("UseConciseConferenceButtons", mOneLineConfButt); gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm); //Spam -------------------------------------------------------------------------------- diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index d66297848..63cedf611 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -92,6 +92,8 @@ protected: bool mShowLocalChatFloaterBar; bool mHorizButt; bool mOneLineIMButt; + bool mOneLineGroupButt; + bool mOneLineConfButt; bool mOnlyComm; //Spam -------------------------------------------------------------------------------- diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 65617418f..1c9d70e4b 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1185,40 +1185,42 @@ void LLFloaterIMPanel::init(const std::string& session_label) mProfileButtonEnabled = FALSE; // [/Ansariel: Display name support] - static LLCachedControl concisebuttons("UseConciseIMButtons"); + static LLCachedControl concise_im("UseConciseIMButtons"); + static LLCachedControl concise_group("UseConciseGroupChatButtons"); + static LLCachedControl concise_conf("UseConciseConferenceButtons"); std::string xml_filename; switch(mDialog) { case IM_SESSION_GROUP_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); - xml_filename = "floater_instant_message_group.xml"; + xml_filename = concise_group ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml"; mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_INVITE: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); if (gAgent.isInGroup(mSessionUUID)) { - xml_filename = "floater_instant_message_group.xml"; + xml_filename = concise_group ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml"; } else // must be invite to ad hoc IM { - xml_filename = "floater_instant_message_ad_hoc.xml"; + xml_filename = concise_conf ? "floater_instant_message_ad_hoc_concisebuttons.xml" : "floater_instant_message_ad_hoc.xml"; } mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_P2P_INVITE: - xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mSessionLabel, mOtherParticipantUUID); break; case IM_SESSION_CONFERENCE_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); - xml_filename = "floater_instant_message_ad_hoc.xml"; + xml_filename = concise_conf ? "floater_instant_message_ad_hoc_concisebuttons.xml" : "floater_instant_message_ad_hoc.xml"; mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; // just received text from another user case IM_NOTHING_SPECIAL: - xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionUUID); mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID); @@ -1228,7 +1230,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) break; default: llwarns << "Unknown session type" << llendl; - xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; break; } diff --git a/indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml b/indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml new file mode 100644 index 000000000..bd0208d92 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml @@ -0,0 +1,27 @@ + + + Joining Voice Chat... + Connected, click End Call to hang up + Left Voice Chat + icn_voice-groupfocus.tga + Instant Message with [NAME] + [NAME] is typing... + Starting session with [NAME], please wait. + Click here to instant message. +