merging in latest changes

master
Gilbert Gonzales 2012-11-06 17:56:47 -08:00
commit 8d9aec9278
15 changed files with 179 additions and 62 deletions

View File

@ -331,3 +331,9 @@ fba99f381b8d4ad1b7b42fa4993b29998d95be18 DRTVWR-179
f7cbd60a3f57ff1101157eeb79ea21e8898bedae DRTVWR-235
baf97f06ae17223614c5e31aa42e71d87cff07fe DRTVWR-236
18498afcdb835d6fc4d36ed935347d3b65307bad 3.4.1-beta11
b2f21e3442542283a80e7eaebae9f833e5a927b6 DRTVWR-237
853a202426398cb0b7676aa498603a25d8ad20fb 3.4.1-beta12
853a202426398cb0b7676aa498603a25d8ad20fb 3.4.1-beta12
b6b68f3c2c6dd04ad88bd0575aad67bf87a9c108 3.4.1-beta12
b6b68f3c2c6dd04ad88bd0575aad67bf87a9c108 3.4.1-beta12
3f9be82de642d468c5fc272cb9d96b46b5498402 3.4.1-beta12

View File

@ -3,6 +3,7 @@
# Please refer to:
# https://wiki.secondlife.com/wiki/Automated_Build_System
# Global setting for now...
Darwin.symbolfiles = "newview/Release/secondlife-symbols-darwin.tar.bz2"
CYGWIN.symbolfiles = "newview/Release/secondlife-symbols-windows.tar.bz2"

View File

@ -1787,22 +1787,18 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification)
return s;
}
//static
void LLPostponedNotification::lookupName(LLPostponedNotification* thiz,
const LLUUID& id,
void LLPostponedNotification::lookupName(const LLUUID& id,
bool is_group)
{
if (is_group)
{
gCacheName->getGroup(id,
boost::bind(&LLPostponedNotification::onGroupNameCache,
thiz, _1, _2, _3));
this, _1, _2, _3));
}
else
{
LLAvatarNameCache::get(id,
boost::bind(&LLPostponedNotification::onAvatarNameCache,
thiz, _1, _2));
fetchAvatarName(id);
}
}
@ -1813,6 +1809,20 @@ void LLPostponedNotification::onGroupNameCache(const LLUUID& id,
finalizeName(full_name);
}
void LLPostponedNotification::fetchAvatarName(const LLUUID& id)
{
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
if (id.notNull())
{
mAvatarNameCacheConnection = LLAvatarNameCache::get(id,
boost::bind(&LLPostponedNotification::onAvatarNameCache, this, _1, _2));
}
}
void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name)
{

View File

@ -87,6 +87,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/type_traits.hpp>
#include <boost/signals2.hpp>
#include "llevents.h"
#include "llfunctorregistry.h"
@ -972,14 +973,15 @@ public:
thiz->mParams = params;
// Avoid header file dependency on llcachename.h
lookupName(thiz, id, is_group);
thiz->lookupName(id, is_group);
}
private:
static void lookupName(LLPostponedNotification* thiz, const LLUUID& id, bool is_group);
void lookupName(const LLUUID& id, bool is_group);
// only used for groups
void onGroupNameCache(const LLUUID& id, const std::string& full_name, bool is_group);
// only used for avatars
void fetchAvatarName(const LLUUID& id);
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
// used for both group and avatar names
void finalizeName(const std::string& name);
@ -990,8 +992,19 @@ private:
}
protected:
LLPostponedNotification() {}
virtual ~LLPostponedNotification() {}
LLPostponedNotification()
: mParams(),
mName(),
mAvatarNameCacheConnection()
{}
virtual ~LLPostponedNotification()
{
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
}
/**
* Abstract method provides possibility to modify notification parameters and
@ -1002,6 +1015,7 @@ protected:
LLNotification::Params mParams;
std::string mName;
boost::signals2::connection mAvatarNameCacheConnection;
};
// Stores only persistent notifications.

View File

@ -28,6 +28,8 @@
#include "llavatariconctrl.h"
#include <boost/signals2.hpp>
// viewer includes
#include "llagent.h"
#include "llavatarconstants.h"
@ -148,9 +150,13 @@ LLAvatarIconCtrl::Params::Params()
LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
: LLIconCtrl(p),
: LLIconCtrl(p),
LLAvatarPropertiesObserver(),
mAvatarId(),
mFullName(),
mDrawTooltip(p.draw_tooltip),
mDefaultIconName(p.default_icon_name)
mDefaultIconName(p.default_icon_name),
mAvatarNameCacheConnection()
{
mPriority = LLViewerFetchedTexture::BOOST_ICON;
@ -203,6 +209,11 @@ LLAvatarIconCtrl::~LLAvatarIconCtrl()
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this);
// Name callbacks will be automatically disconnected since LLUICtrl is trackable
}
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
}
//virtual
@ -245,9 +256,19 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
LLIconCtrl::setValue(value);
}
if (mAvatarId != LLUUID::null)
fetchAvatarName();
}
void LLAvatarIconCtrl::fetchAvatarName()
{
if (mAvatarNameCacheConnection.connected())
{
LLAvatarNameCache::get(mAvatarId, boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, this, _1, _2));
mAvatarNameCacheConnection.disconnect();
}
if (mAvatarId.notNull())
{
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, this, _1, _2));
}
}

View File

@ -27,6 +27,8 @@
#ifndef LL_LLAVATARICONCTRL_H
#define LL_LLAVATARICONCTRL_H
#include <boost/signals2.hpp>
#include "lliconctrl.h"
#include "llavatarpropertiesprocessor.h"
#include "llviewermenu.h"
@ -86,20 +88,24 @@ public:
// LLAvatarPropertiesProcessor observer trigger
virtual void processProperties(void* data, EAvatarProcessorType type);
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
const LLUUID& getAvatarId() const { return mAvatarId; }
const std::string& getFullName() const { return mFullName; }
void setDrawTooltip(bool value) { mDrawTooltip = value;}
protected:
LLUUID mAvatarId;
std::string mFullName;
bool mDrawTooltip;
std::string mDefaultIconName;
LLUUID mAvatarId;
std::string mFullName;
bool mDrawTooltip;
std::string mDefaultIconName;
bool updateFromCache();
private:
void fetchAvatarName();
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
boost::signals2::connection mAvatarNameCacheConnection;
};
#endif // LL_LLAVATARICONCTRL_H

View File

@ -27,6 +27,8 @@
#include "llviewerprecompiledheaders.h"
#include <boost/signals2.hpp>
#include "llavataractions.h"
#include "llavatarlistitem.h"
@ -59,7 +61,8 @@ LLAvatarListItem::Params::Params()
LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
: LLPanel(),
: LLPanel(),
LLFriendObserver(),
mAvatarIcon(NULL),
mAvatarName(NULL),
mLastInteractionTime(NULL),
@ -74,7 +77,8 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
mShowInfoBtn(true),
mShowProfileBtn(true),
mShowPermissions(false),
mHovered(false)
mHovered(false),
mAvatarNameCacheConnection()
{
if (not_from_ui_factory)
{
@ -87,7 +91,14 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
LLAvatarListItem::~LLAvatarListItem()
{
if (mAvatarId.notNull())
{
LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this);
}
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
}
BOOL LLAvatarListItem::postBuild()
@ -130,6 +141,19 @@ BOOL LLAvatarListItem::postBuild()
return TRUE;
}
void LLAvatarListItem::fetchAvatarName()
{
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
if (mAvatarId.notNull())
{
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2));
}
}
S32 LLAvatarListItem::notifyParent(const LLSD& info)
{
if (info.has("visibility_changed"))
@ -260,8 +284,7 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, b
mAvatarIcon->setValue(id);
// Set avatar name.
LLAvatarNameCache::get(id,
boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2));
fetchAvatarName();
}
}
@ -414,8 +437,7 @@ std::string LLAvatarListItem::getAvatarToolTip() const
void LLAvatarListItem::updateAvatarName()
{
LLAvatarNameCache::get(getAvatarId(),
boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2));
fetchAvatarName();
}
//== PRIVATE SECITON ==========================================================

View File

@ -27,6 +27,8 @@
#ifndef LL_LLAVATARLISTITEM_H
#define LL_LLAVATARLISTITEM_H
#include <boost/signals2.hpp>
#include "llpanel.h"
#include "lloutputmonitorctrl.h"
#include "llbutton.h"
@ -217,6 +219,9 @@ private:
/// true when the mouse pointer is hovering over this item
bool mHovered;
void fetchAvatarName();
boost::signals2::connection mAvatarNameCacheConnection;
static bool sStaticInitialized; // this variable is introduced to improve code readability
static S32 sLeftPadding; // padding to first left visible child (icon or name)

View File

@ -28,6 +28,8 @@
#include "llchathistory.h"
#include <boost/signals2.hpp>
#include "llavatarnamecache.h"
#include "llinstantmessage.h"
@ -110,7 +112,8 @@ public:
mFrom(),
mSessionID(),
mMinUserNameWidth(0),
mUserNameFont(NULL)
mUserNameFont(NULL),
mAvatarNameCacheConnection()
{}
static LLChatHistoryHeader* createInstance(const std::string& file_name)
@ -124,6 +127,11 @@ public:
{
// Detach the info button so that it doesn't get destroyed (EXT-8463).
hideInfoCtrl();
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
}
BOOL handleMouseUp(S32 x, S32 y, MASK mask)
@ -283,8 +291,7 @@ public:
// Start with blank so sample data from XUI XML doesn't
// flash on the screen
user_name->setValue( LLSD() );
LLAvatarNameCache::get(mAvatarID,
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
fetchAvatarName();
}
else if (chat.mChatStyle == CHAT_STYLE_HISTORY ||
mSourceType == CHAT_SOURCE_AGENT)
@ -416,31 +423,6 @@ public:
}
}
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
{
mFrom = av_name.mDisplayName;
LLTextBox* user_name = getChild<LLTextBox>("user_name");
user_name->setValue( LLSD(av_name.mDisplayName ) );
user_name->setToolTip( av_name.mUsername );
if (gSavedSettings.getBOOL("NameTagShowUsernames") &&
LLAvatarNameCache::useDisplayNames() &&
!av_name.mIsDisplayNameDefault)
{
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
style_params_name.color(userNameColor);
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
style_params_name.readonly_color(userNameColor);
user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name);
}
setToolTip( av_name.mUsername );
// name might have changed, update width
updateMinUserNameWidth();
}
protected:
static const S32 PADDING = 20;
@ -555,6 +537,45 @@ private:
user_name->reshape(user_rect.getWidth() + delta_pos_x, user_rect.getHeight());
}
void fetchAvatarName()
{
if (mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection.disconnect();
}
if (mAvatarID.notNull())
{
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID,
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
}
}
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
{
mFrom = av_name.mDisplayName;
LLTextBox* user_name = getChild<LLTextBox>("user_name");
user_name->setValue( LLSD(av_name.mDisplayName ) );
user_name->setToolTip( av_name.mUsername );
if (gSavedSettings.getBOOL("NameTagShowUsernames") &&
LLAvatarNameCache::useDisplayNames() &&
!av_name.mIsDisplayNameDefault)
{
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
style_params_name.color(userNameColor);
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
style_params_name.readonly_color(userNameColor);
user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name);
}
setToolTip( av_name.mUsername );
// name might have changed, update width
updateMinUserNameWidth();
}
protected:
LLHandle<LLView> mPopupMenuHandleAvatar;
LLHandle<LLView> mPopupMenuHandleObject;
@ -569,6 +590,9 @@ protected:
S32 mMinUserNameWidth;
const LLFontGL* mUserNameFont;
private:
boost::signals2::connection mAvatarNameCacheConnection;
};
LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL;

View File

@ -54,6 +54,7 @@ LLIMConversation::LLIMConversation(const LLSD& session_id)
, mInputEditor(NULL)
, mInputEditorTopPad(0)
, mRefreshTimer(new LLTimer())
, mIsHostAttached(false)
{
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);

View File

@ -331,6 +331,7 @@ void LLIMFloaterContainer::onExpandCollapseButtonClicked()
{
collapseConversationsPane(!mConversationsPane->isCollapsed());
}
selectConversation(mSelectedSession);
}
LLIMFloaterContainer* LLIMFloaterContainer::findInstance()

View File

@ -322,7 +322,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("upload_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptPreview>, "upload");
LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload");
LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);
LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>);
LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);

View File

@ -948,7 +948,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
std::vector<LLViewerObject*>::iterator idle_end = idle_list.begin()+idle_count;
if (gSavedSettings.getBOOL("FreezeTime"))
{
{
for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
iter != idle_end; iter++)
@ -969,14 +969,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
llassert(objectp->isActive());
objectp->idleUpdate(agent, world, frame_time);
}
}
//update flexible objects
LLVolumeImplFlexible::updateClass();
//update animated textures
LLViewerTextureAnim::updateClass();
}
}
@ -1401,9 +1401,9 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
mActiveObjects[idx]->setListIndex(idx);
}
mActiveObjects.pop_back();
mActiveObjects.pop_back();
}
}
}
void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
@ -1446,8 +1446,11 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
}
}
llassert(objectp->isActive() || objectp->getListIndex() == -1);
//post condition: if object is active, it must be on the active list
llassert(!active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) != mActiveObjects.end());
//post condition: if object is not active, it must not be on the active list
llassert(active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) == mActiveObjects.end());
}
void LLViewerObjectList::updateObjectCost(LLViewerObject* object)

View File

@ -129,6 +129,7 @@ public:
LLViewerObject *getSelectedObject(const U32 object_id);
inline S32 getNumObjects() { return (S32) mObjects.size(); }
inline S32 getNumActiveObjects() { return (S32) mActiveObjects.size(); }
void addToMap(LLViewerObject *objectp);
void removeFromMap(LLViewerObject *objectp);

View File

@ -563,6 +563,9 @@ public:
addText(xpos, ypos, llformat("%d Render Calls", gPipeline.mBatchCount));
ypos += y_inc;
addText(xpos, ypos, llformat("%d/%d Objects Active", gObjectList.getNumActiveObjects(), gObjectList.getNumObjects()));
ypos += y_inc;
addText(xpos, ypos, llformat("%d Matrix Ops", gPipeline.mMatrixOpCount));
ypos += y_inc;