Merge branch 'rlva/feature/redirchat-typing-anim' into rlva/development
commit
c18e207bcf
|
|
@ -255,10 +255,21 @@
|
|||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaShowRedirectChatTyping</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Sends typing start messages (and optionally plays the typing animation) when @redirchat restricted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaSplitRedirectChat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Splits long nearby chat lines across multiple messages when @redir* restricted.</string>
|
||||
<string>Splits long nearby chat lines across multiple messages when @redir* restricted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -1992,6 +1992,13 @@ BOOL LLAgent::needsRenderHead()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLAgent::startTyping()
|
||||
{
|
||||
// [RLVa:KB] - @redirchat
|
||||
if (!RlvActions::canSendTypingStart())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
mTypingTimer.reset();
|
||||
|
||||
if (getRenderState() & AGENT_STATE_TYPING)
|
||||
|
|
|
|||
|
|
@ -479,11 +479,7 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
|
|||
|
||||
S32 length = raw_text.length();
|
||||
|
||||
// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
|
||||
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
|
||||
// RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional?
|
||||
if ( (length > 0) && (raw_text[0] != '/') && (!RlvActions::hasBehaviour(RLV_BHVR_REDIRCHAT)) )
|
||||
// [/RLVa:KB]
|
||||
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
|
||||
{
|
||||
gAgent.startTyping();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -476,10 +476,7 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke()
|
|||
|
||||
S32 length = raw_text.length();
|
||||
|
||||
// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
|
||||
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
|
||||
if ( (length > 0) && (raw_text[0] != '/') && (!RlvActions::hasBehaviour(RLV_BHVR_REDIRCHAT)) )
|
||||
// [/RLVa:KB]
|
||||
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
|
||||
{
|
||||
gAgent.startTyping();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,6 +188,15 @@ bool RlvActions::canSendIM(const LLUUID& idRecipient)
|
|||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) || (!gRlvHandler.isException(RLV_BHVR_SENDIMTO, idRecipient)) ) );
|
||||
}
|
||||
|
||||
// Handles: @redirchat
|
||||
bool RlvActions::canSendTypingStart()
|
||||
{
|
||||
// The CHAT_TYPE_START indicator can be sent if:
|
||||
// - nearby chat isn't being redirected
|
||||
// - the user specifically indicated that they want to show typing under @redirchat
|
||||
return !RlvHandler::instance().hasBehaviour(RLV_BHVR_REDIRCHAT) || gSavedSettings.get<bool>(RLV_SETTING_SHOWREDIRECTCHATTYPING);
|
||||
}
|
||||
|
||||
bool RlvActions::canStartIM(const LLUUID& idRecipient, bool fIgnoreOpen)
|
||||
{
|
||||
// User can start an IM session with "recipient" (could be an agent or a group) if:
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ public:
|
|||
*/
|
||||
static bool canSendIM(const LLUUID& idRecipient);
|
||||
|
||||
/*
|
||||
* Returns true if the viewer can inform the region about the user's (nearby chat) typing
|
||||
*/
|
||||
static bool canSendTypingStart();
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to start a - P2P or group - conversation with the specified UUID (or if the session already exists, unless 'ignore open' is specified)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@ enum ERlvAttachGroupType
|
|||
#define RLV_SETTING_HIDELOCKEDATTACH "RLVaHideLockedAttachments"
|
||||
#define RLV_SETTING_HIDELOCKEDINVENTORY "RLVaHideLockedInventory"
|
||||
#define RLV_SETTING_LOGINLASTLOCATION "RLVaLoginLastLocation"
|
||||
#define RLV_SETTING_SHOWREDIRECTCHATTYPING "RLVaShowRedirectChatTyping"
|
||||
#define RLV_SETTING_SHAREDINVAUTORENAME "RLVaSharedInvAutoRename"
|
||||
#define RLV_SETTING_SHOWASSERTIONFAIL "RLVaShowAssertionFailures"
|
||||
#define RLV_SETTING_SPLITREDIRECTCHAT "RLVaSplitRedirectChat"
|
||||
|
|
|
|||
|
|
@ -1657,6 +1657,16 @@
|
|||
function="ToggleControl"
|
||||
parameter="RestrainedLoveShowEllipsis" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Show Redirected Chat Typing"
|
||||
name="Show Redirected Chat Typing">
|
||||
<menu_item_check.on_check
|
||||
function="CheckControl"
|
||||
parameter="RLVaShowRedirectChatTyping" />
|
||||
<menu_item_check.on_click
|
||||
function="ToggleControl"
|
||||
parameter="RLVaShowRedirectChatTyping" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Split Long Redirected Chat"
|
||||
name="Split Long Redirected Chat">
|
||||
|
|
|
|||
Loading…
Reference in New Issue