Support chats have build in every message, cool. This is optional.

This commit is contained in:
Lirusaito
2019-03-23 03:40:20 -04:00
parent 8946aa9ee5
commit c16fa02558
3 changed files with 20 additions and 2 deletions

View File

@@ -59,6 +59,7 @@
#include "llstylemap.h"
#include "lltrans.h"
#include "lluictrlfactory.h"
#include "llversioninfo.h"
#include "llviewerobjectlist.h"
#include "llviewertexteditor.h"
#include "llviewerstats.h"
@@ -333,7 +334,6 @@ LLFloaterIMPanel::LLFloaterIMPanel(
static LLCachedControl<bool> concise("UseConciseGroupChatButtons");
xml_filename = concise ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml";
bool support = boost::starts_with(mLogLabel, LLTrans::getString("SHORT_APP_NAME") + ' ');
// Singu Note: We could make a button feature for dumping Help->About contents for support, too.
mSessionType = support ? SUPPORT_SESSION : GROUP_SESSION;
}
else
@@ -564,11 +564,21 @@ BOOL LLFloaterIMPanel::postBuild()
mSpeakerPanel->refreshSpeakers();
}
if (mSessionType == P2P_SESSION)
switch (mSessionType)
{
case P2P_SESSION:
{
getChild<LLUICtrl>("mute_btn")->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickMuteVoice, this));
getChild<LLUICtrl>("speaker_volume")->setCommitCallback(boost::bind(&LLVoiceClient::setUserVolume, LLVoiceClient::getInstance(), mOtherParticipantUUID, _2));
}
break;
case SUPPORT_SESSION:
getChildView("Support Check")->setVisible(true);
// Singu Note: We could make a button feature for dumping Help->About contents for support, too.
break;
default:
break;
}
setDefaultBtn("send_btn");
@@ -1353,6 +1363,12 @@ void LLFloaterIMPanel::onSendMsg()
}
// [/RLVa:KB]
if (mSessionType == SUPPORT_SESSION && getChildView("Support Check")->getValue())
{
static const auto version = llformat(" (%d) ", LLVersionInfo::getBuild());
utf8_text.insert(action ? 3 : 0, action ? version.substr(0, version.size()-1) : version.substr(1));
}
if ( mSessionInitialized )
{
// Split messages that are too long, same code like in llimpanel.cpp

View File

@@ -17,6 +17,7 @@
<button bottom_delta="0" follows="left|top" height="20" left_delta="80" width="50" toggle="true" name="ding_btn" label="Ding">
<button.commit_callback function="FlipDing"/>
</button>
<check_box name="Support Check" label="Send Build" tool_tip="Uncheck to stop sending build number" follows="left|top" bottom_delta="0" left_delta="50" visible="false" initial_value="true"/>
<button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>

View File

@@ -15,6 +15,7 @@
<button bottom_delta="0" follows="right|top" height="20" left_delta="80" width="50" toggle="true" name="ding_btn" label="Ding">
<button.commit_callback function="FlipDing"/>
</button>
<check_box name="Support Check" label="#" tool_tip="Uncheck to stop sending build number" follows="right|top" bottom_delta="0" left_delta="50" visible="false" initial_value="true"/>
<button bottom_delta="0" enabled="false" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" toggle="true" left="420" name="toggle_active_speakers_btn" right="450" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>