Merge branch 'curlthreading2' into curlthreading3

This commit is contained in:
Aleric Inglewood
2012-09-19 04:14:25 +02:00
49 changed files with 980 additions and 740 deletions

View File

@@ -35,7 +35,9 @@
#include "llfloateractivespeakers.h"
#include "llagent.h"
#include "llvoavatar.h"
#include "llappviewer.h"
#include "llimview.h"
#include "llsdutil.h"
#include "llfloateravatarinfo.h"
#include "lluictrlfactory.h"
#include "llviewercontrol.h"
@@ -44,12 +46,10 @@
#include "lltextbox.h"
#include "llmutelist.h"
#include "llviewerobjectlist.h"
#include "llvoavatar.h"
#include "llimpanel.h" // LLVoiceChannel
#include "llsdutil.h"
#include "llimview.h"
#include "llviewerwindow.h"
#include "llworld.h"
#include "llappviewer.h"
// [RLVa:KB]
#include "rlvhandler.h"
@@ -90,9 +90,7 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy
mDisplayName = name;
mLegacyName = name;
}
gVoiceClient->setUserVolume(id, LLMuteList::getInstance()->getSavedResidentVolume(id));
mActivityTimer.reset(SPEAKER_TIMEOUT);
}
@@ -104,7 +102,7 @@ void LLSpeaker::lookupName()
// [/Ansariel: Display name support]
}
//static
//static
// [Ansariel: Display name support]
void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data)
// [/Ansariel: Display name support]
@@ -122,12 +120,12 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_
case 2 : speaker_ptr->mDisplayName = avatar_name.mDisplayName; break;
default : speaker_ptr->mDisplayName = avatar_name.getLegacyName(); break;
}
// Also set the legacy name. We will need it to initiate a new
// IM session.
speaker_ptr->mLegacyName = LLCacheName::cleanFullName(avatar_name.getLegacyName());
// [/Ansariel: Display name support]
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g
// TODO-RLVa: this seems to get called per frame which is very likely an LL bug that will eventuall get fixed
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
@@ -500,7 +498,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
}
LLColor4 icon_color;
if (speakerp->mStatus == LLSpeaker::STATUS_MUTED)
{
icon_cell->setValue(mute_icon_image);
@@ -605,7 +603,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
speaking_status_cell->setValue(speaking_order_sort_string);
}
}
// we potentially modified the sort order by touching the list items
mSpeakerList->setSorted(FALSE);
@@ -860,25 +858,25 @@ void LLPanelActiveSpeakers::onModeratorMuteVoice(LLUICtrl* ctrl, void* user_data
if ( gIMMgr )
{
//403 == you're not a mod
//should be disabled if you're not a moderator
LLFloaterIMPanel* floaterp;
floaterp = gIMMgr->findFloaterBySession(mSessionID);
if ( floaterp )
{
//403 == you're not a mod
//should be disabled if you're not a moderator
if ( 403 == status )
{
floaterp->showSessionEventError(
"mute",
"not_a_moderator");
"not_a_mod_error");
}
else
{
floaterp->showSessionEventError(
"mute",
"generic");
"generic_request_error");
}
}
}
@@ -925,25 +923,25 @@ void LLPanelActiveSpeakers::onModeratorMuteText(LLUICtrl* ctrl, void* user_data)
if ( gIMMgr )
{
//403 == you're not a mod
//should be disabled if you're not a moderator
LLFloaterIMPanel* floaterp;
floaterp = gIMMgr->findFloaterBySession(mSessionID);
if ( floaterp )
{
//403 == you're not a mod
//should be disabled if you're not a moderator
if ( 403 == status )
{
floaterp->showSessionEventError(
"mute",
"not_a_moderator");
"not_a_mod_error");
}
else
{
floaterp->showSessionEventError(
"mute",
"generic");
"generic_request_error");
}
}
}
@@ -1194,6 +1192,9 @@ void LLSpeakerMgr::updateSpeakerList()
const LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
{
//In some conditions map causes crash if it is empty(Windows only), adding check (EK)
if (mSpeakers.size() == 0)
return NULL;
speaker_map_t::iterator found_it = mSpeakers.find(speaker_id);
if (found_it == mSpeakers.end())
{