summaryrefslogtreecommitdiff
path: root/indra/newview/llimpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimpanel.cpp')
-rw-r--r--indra/newview/llimpanel.cpp82
1 files changed, 32 insertions, 50 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index de9e92fcdd..f3943345c7 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -504,7 +504,13 @@ void LLVoiceChannel::deactivate()
if (callStarted())
{
setState(STATE_HUNG_UP);
+ // mute the microphone if required when returning to the proximal channel
+ if (gSavedSettings.getBOOL("AutoDisengageMic") && sCurrentVoiceChannel == this)
+ {
+ gSavedSettings.setBOOL("PTTCurrentlyEnabled", true);
+ }
}
+
if (sCurrentVoiceChannel == this)
{
// default channel is proximal channel
@@ -523,11 +529,14 @@ void LLVoiceChannel::activate()
// deactivate old channel and mark ourselves as the active one
if (sCurrentVoiceChannel != this)
{
- if (sCurrentVoiceChannel)
+ // mark as current before deactivating the old channel to prevent
+ // activating the proximal channel between IM calls
+ LLVoiceChannel* old_channel = sCurrentVoiceChannel;
+ sCurrentVoiceChannel = this;
+ if (old_channel)
{
- sCurrentVoiceChannel->deactivate();
+ old_channel->deactivate();
}
- sCurrentVoiceChannel = this;
}
if (mState == STATE_NO_CHANNEL_INFO)
@@ -1282,6 +1291,7 @@ BOOL LLFloaterIMPanel::postBuild()
mHistoryEditor = getChild<LLViewerTextEditor>("im_history");
mHistoryEditor->setParseHTML(TRUE);
+ mHistoryEditor->setParseHighlights(TRUE);
if ( IM_SESSION_GROUP_START == mDialog )
{
@@ -1634,60 +1644,32 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL accepted = FALSE;
- switch(cargo_type)
+
+ if (mDialog == IM_NOTHING_SPECIAL)
{
- case DAD_CALLINGCARD:
- {
- accepted = dropCallingCard((LLInventoryItem*)cargo_data, drop);
- break;
- }
- case DAD_CATEGORY:
+ LLToolDragAndDrop::handleGiveDragAndDrop(mOtherParticipantUUID, mSessionUUID, drop,
+ cargo_type, cargo_data, accept);
+ }
+
+ // handle case for dropping calling cards (and folders of calling cards) onto invitation panel for invites
+ else if (isInviteAllowed())
+ {
+ *accept = ACCEPT_NO;
+
+ if (cargo_type == DAD_CALLINGCARD)
{
- accepted = dropCategory((LLInventoryCategory*)cargo_data, drop);
- break;
+ if (dropCallingCard((LLInventoryItem*)cargo_data, drop))
+ {
+ *accept = ACCEPT_YES_MULTI;
+ }
}
-
- // See stdenums.h
- case DAD_TEXTURE:
- case DAD_SOUND:
- // DAD_CALLINGCARD above
- case DAD_LANDMARK:
- case DAD_SCRIPT:
- case DAD_CLOTHING:
- case DAD_OBJECT:
- case DAD_NOTECARD:
- // DAD_CATEGORY above
- case DAD_BODYPART:
- case DAD_ANIMATION:
- case DAD_GESTURE:
+ else if (cargo_type == DAD_CATEGORY)
{
- if (mDialog == IM_NOTHING_SPECIAL)
+ if (dropCategory((LLInventoryCategory*)cargo_data, drop))
{
- // See LLDropTarget for similar code.
- LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
- if(gInventory.getItem(inv_item->getUUID())
- && LLToolDragAndDrop::isInventoryGiveAcceptable(inv_item))
- {
- accepted = true;
- if(drop)
- {
- LLToolDragAndDrop::giveInventory(mOtherParticipantUUID, inv_item, mSessionUUID);
- }
- }
+ *accept = ACCEPT_YES_MULTI;
}
- break;
}
- default:
- break;
- }
- if (accepted)
- {
- *accept = ACCEPT_YES_MULTI;
- }
- else
- {
- *accept = ACCEPT_NO;
}
return TRUE;
}