CHUI-580 : WIP : Protect callback connections passed to LLAvatarNameCache::get() where necessary
parent
0e4c3070cb
commit
6fe7144104
|
|
@ -1814,15 +1814,13 @@ void LLPostponedNotification::onGroupNameCache(const LLUUID& id,
|
|||
|
||||
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));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLPostponedNotification::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1832,6 +1832,7 @@ void LLScrollListCtrl::copyNameToClipboard(std::string id, bool is_group)
|
|||
{
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(LLUUID(id), &av_name);
|
||||
// Note: Will return an empty string if the avatar name was not cached for that id. Fine in that case.
|
||||
name = av_name.getUserName();
|
||||
}
|
||||
LLUrlAction::copyURLToClipboard(name);
|
||||
|
|
|
|||
|
|
@ -340,7 +340,8 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
|
|||
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
|
||||
// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
|
||||
//
|
||||
LLUrlEntryAgent::LLUrlEntryAgent()
|
||||
LLUrlEntryAgent::LLUrlEntryAgent() :
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/\\w+",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
|
|
@ -456,9 +457,11 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
|
|||
}
|
||||
else
|
||||
{
|
||||
LLAvatarNameCache::get(agent_id,
|
||||
boost::bind(&LLUrlEntryAgent::onAvatarNameCache,
|
||||
this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return LLTrans::getString("LoadingData");
|
||||
}
|
||||
|
|
@ -515,7 +518,8 @@ std::string LLUrlEntryAgent::getIcon(const std::string &url)
|
|||
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/(completename|displayname|username)
|
||||
// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/(completename|displayname|username)
|
||||
//
|
||||
LLUrlEntryAgentName::LLUrlEntryAgentName()
|
||||
LLUrlEntryAgentName::LLUrlEntryAgentName() :
|
||||
mAvatarNameCacheConnection()
|
||||
{}
|
||||
|
||||
void LLUrlEntryAgentName::onAvatarNameCache(const LLUUID& id,
|
||||
|
|
@ -554,9 +558,11 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
|
|||
}
|
||||
else
|
||||
{
|
||||
LLAvatarNameCache::get(agent_id,
|
||||
boost::bind(&LLUrlEntryAgentCompleteName::onAvatarNameCache,
|
||||
this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentCompleteName::onAvatarNameCache, this, _1, _2));
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return LLTrans::getString("LoadingData");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,6 +171,13 @@ class LLUrlEntryAgent : public LLUrlEntryBase
|
|||
{
|
||||
public:
|
||||
LLUrlEntryAgent();
|
||||
~LLUrlEntryAgent()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ std::string getIcon(const std::string &url);
|
||||
/*virtual*/ std::string getTooltip(const std::string &string) const;
|
||||
|
|
@ -181,6 +188,7 @@ protected:
|
|||
/*virtual*/ void callObservers(const std::string &id, const std::string &label, const std::string& icon);
|
||||
private:
|
||||
void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
///
|
||||
|
|
@ -192,6 +200,13 @@ class LLUrlEntryAgentName : public LLUrlEntryBase, public boost::signals2::track
|
|||
{
|
||||
public:
|
||||
LLUrlEntryAgentName();
|
||||
~LLUrlEntryAgentName()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ LLStyle::Params getStyle() const;
|
||||
protected:
|
||||
|
|
@ -199,6 +214,7 @@ protected:
|
|||
virtual std::string getName(const LLAvatarName& avatar_name) = 0;
|
||||
private:
|
||||
void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
|
|||
LLRecentPeople::instance().add(id);
|
||||
}
|
||||
|
||||
void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name)
|
||||
static void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name)
|
||||
{
|
||||
LLAvatarActions::requestFriendshipDialog(id, av_name.getCompleteName());
|
||||
}
|
||||
|
|
@ -195,8 +195,7 @@ void LLAvatarActions::startIM(const LLUUID& id)
|
|||
if (id.isNull())
|
||||
return;
|
||||
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&on_avatar_name_cache_start_im, _1, _2));
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2));
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -231,8 +230,7 @@ void LLAvatarActions::startCall(const LLUUID& id)
|
|||
{
|
||||
return;
|
||||
}
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&on_avatar_name_cache_start_call, _1, _2));
|
||||
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_call, _1, _2));
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -261,13 +261,12 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
|
|||
|
||||
void LLAvatarIconCtrl::fetchAvatarName()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
if (mAvatarId.notNull())
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,13 +143,12 @@ BOOL LLAvatarListItem::postBuild()
|
|||
|
||||
void LLAvatarListItem::fetchAvatarName()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
if (mAvatarId.notNull())
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -704,9 +704,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
|
|||
if(chat_notify)
|
||||
{
|
||||
// Look up the name of this agent for the notification
|
||||
LLAvatarNameCache::get(agent_id,
|
||||
boost::bind(&on_avatar_name_cache_notify,
|
||||
_1, _2, online, payload));
|
||||
LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload));
|
||||
}
|
||||
|
||||
mModifyMask |= LLFriendObserver::ONLINE;
|
||||
|
|
|
|||
|
|
@ -539,13 +539,12 @@ private:
|
|||
|
||||
void fetchAvatarName()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
if (mAvatarID.notNull())
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID,
|
||||
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,8 @@ void LLConversationLogFriendObserver::changed(U32 mask)
|
|||
/* LLConversationLog implementation */
|
||||
/************************************************************************/
|
||||
|
||||
LLConversationLog::LLConversationLog()
|
||||
LLConversationLog::LLConversationLog() :
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
LLControlVariable* ctrl = gSavedPerAccountSettings.getControl("LogInstantMessages").get();
|
||||
if (ctrl)
|
||||
|
|
@ -251,7 +252,11 @@ void LLConversationLog::createConversation(const LLIMModel::LLIMSession* session
|
|||
|
||||
if (LLIMModel::LLIMSession::P2P_SESSION == session->mSessionType)
|
||||
{
|
||||
LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session));
|
||||
}
|
||||
|
||||
notifyObservers();
|
||||
|
|
|
|||
|
|
@ -141,7 +141,14 @@ public:
|
|||
private:
|
||||
|
||||
LLConversationLog();
|
||||
|
||||
virtual ~LLConversationLog()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void enableLogging(bool enable);
|
||||
|
||||
/**
|
||||
|
|
@ -176,6 +183,7 @@ private:
|
|||
LLFriendObserver* mFriendObserver; // Observer of the LLAvatarTracker instance
|
||||
|
||||
boost::signals2::connection newMessageSignalConnection;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
class LLConversationLogObserver
|
||||
|
|
|
|||
|
|
@ -421,16 +421,15 @@ LLConversationItemParticipant::~LLConversationItemParticipant()
|
|||
|
||||
void LLConversationItemParticipant::fetchAvatarName()
|
||||
{
|
||||
// Disconnect any previous avatar name cache connection
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
// Request the avatar name from the cache
|
||||
llassert(getUUID().notNull());
|
||||
if (getUUID().notNull())
|
||||
{
|
||||
// Disconnect any previous avatar name cache connection
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(getUUID(), boost::bind(&LLConversationItemParticipant::onAvatarNameCache, this, _2));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class LLFloaterDisplayName : public LLFloater
|
|||
{
|
||||
public:
|
||||
LLFloaterDisplayName(const LLSD& key);
|
||||
virtual ~LLFloaterDisplayName() {};
|
||||
virtual ~LLFloaterDisplayName() { }
|
||||
/*virtual*/ BOOL postBuild();
|
||||
void onSave();
|
||||
void onReset();
|
||||
|
|
@ -58,8 +58,8 @@ private:
|
|||
const LLSD& content);
|
||||
};
|
||||
|
||||
LLFloaterDisplayName::LLFloaterDisplayName(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
LLFloaterDisplayName::LLFloaterDisplayName(const LLSD& key) :
|
||||
LLFloater(key)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -122,10 +122,6 @@ void LLFloaterDisplayName::onCacheSetName(bool success,
|
|||
LLSD args;
|
||||
args["DISPLAY_NAME"] = content["display_name"];
|
||||
LLNotificationsUtil::add("SetDisplayNameSuccess", args);
|
||||
|
||||
// Re-fetch my name, as it may have been sanitized by the service
|
||||
//LLAvatarNameCache::get(getAvatarId(),
|
||||
// boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@
|
|||
|
||||
LLFloaterInspect::LLFloaterInspect(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mDirty(FALSE)
|
||||
mDirty(FALSE),
|
||||
mOwnerNameCacheConnection(),
|
||||
mCreatorNameCacheConnection()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
|
||||
|
|
@ -67,6 +69,14 @@ BOOL LLFloaterInspect::postBuild()
|
|||
|
||||
LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
if (mOwnerNameCacheConnection.connected())
|
||||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
}
|
||||
if (mCreatorNameCacheConnection.connected())
|
||||
{
|
||||
mCreatorNameCacheConnection.disconnect();
|
||||
}
|
||||
if(!LLFloaterReg::instanceVisible("build"))
|
||||
{
|
||||
if(LLToolMgr::getInstance()->getBaseTool() == LLToolCompInspect::getInstance())
|
||||
|
|
@ -80,7 +90,6 @@ LLFloaterInspect::~LLFloaterInspect(void)
|
|||
{
|
||||
LLFloaterReg::showInstance("build", LLSD(), TRUE);
|
||||
}
|
||||
//sInstance = NULL;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onOpen(const LLSD& key)
|
||||
|
|
@ -167,15 +176,6 @@ LLUUID LLFloaterInspect::getSelectedUUID()
|
|||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr)
|
||||
{
|
||||
if (FloaterPtr)
|
||||
{
|
||||
LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr;
|
||||
floater->dirty();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::refresh()
|
||||
{
|
||||
LLUUID creator_id;
|
||||
|
|
@ -229,7 +229,11 @@ void LLFloaterInspect::refresh()
|
|||
else
|
||||
{
|
||||
owner_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
if (mOwnerNameCacheConnection.connected())
|
||||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
}
|
||||
mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::setDirty, this));
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::get(idCreator, &av_name))
|
||||
|
|
@ -239,7 +243,11 @@ void LLFloaterInspect::refresh()
|
|||
else
|
||||
{
|
||||
creator_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
if (mCreatorNameCacheConnection.connected())
|
||||
{
|
||||
mCreatorNameCacheConnection.disconnect();
|
||||
}
|
||||
mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::setDirty, this));
|
||||
}
|
||||
|
||||
row["id"] = obj->getObject()->getID();
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@ public:
|
|||
void onClickOwnerProfile();
|
||||
void onSelectObject();
|
||||
|
||||
static void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr);
|
||||
|
||||
LLScrollListCtrl* mObjectList;
|
||||
protected:
|
||||
// protected members
|
||||
|
|
@ -64,13 +62,14 @@ protected:
|
|||
bool mDirty;
|
||||
|
||||
private:
|
||||
void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name);
|
||||
|
||||
LLFloaterInspect(const LLSD& key);
|
||||
virtual ~LLFloaterInspect(void);
|
||||
// static data
|
||||
// static LLFloaterInspect* sInstance;
|
||||
|
||||
LLSafeHandle<LLObjectSelection> mObjectSelection;
|
||||
boost::signals2::connection mOwnerNameCacheConnection;
|
||||
boost::signals2::connection mCreatorNameCacheConnection;
|
||||
};
|
||||
|
||||
#endif //LL_LLFLOATERINSPECT_H
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
|
|||
mPicking( FALSE),
|
||||
mPosition(),
|
||||
mCopyrightWarningSeen( FALSE ),
|
||||
mResourceDatap(new LLResourceData())
|
||||
mResourceDatap(new LLResourceData()),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -187,6 +188,11 @@ BOOL LLFloaterReporter::postBuild()
|
|||
// virtual
|
||||
LLFloaterReporter::~LLFloaterReporter()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
// child views automatically deleted
|
||||
mObjectID = LLUUID::null;
|
||||
|
||||
|
|
@ -313,7 +319,11 @@ void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id)
|
|||
std::string avatar_link = LLSLURL("agent", mObjectID, "inspect").getSLURLString();
|
||||
getChild<LLUICtrl>("owner_name")->setValue(avatar_link);
|
||||
|
||||
LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
|
||||
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ private:
|
|||
std::list<LLMeanCollisionData*> mMCDList;
|
||||
std::string mDefaultSummary;
|
||||
LLResourceData* mResourceDatap;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ private:
|
|||
LLUUID mAuthorizedBuyer;
|
||||
bool mParcelSoldWithObjects;
|
||||
SelectionObserver mParcelSelectionObserver;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
|
||||
void updateParcelInfo();
|
||||
void refreshUI();
|
||||
|
|
@ -129,13 +130,18 @@ LLFloater* LLFloaterSellLand::buildFloater(const LLSD& key)
|
|||
LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mParcelSelectionObserver(this),
|
||||
mRegion(0)
|
||||
mRegion(0),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
|
||||
}
|
||||
|
||||
LLFloaterSellLandUI::~LLFloaterSellLandUI()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver);
|
||||
}
|
||||
|
||||
|
|
@ -230,8 +236,11 @@ void LLFloaterSellLandUI::updateParcelInfo()
|
|||
|
||||
if(mSellToBuyer)
|
||||
{
|
||||
LLAvatarNameCache::get(mAuthorizedBuyer,
|
||||
boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAuthorizedBuyer, boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,12 +81,14 @@ private:
|
|||
LLUUID mAvatarID;
|
||||
// Need avatar name information to spawn friend add request
|
||||
LLAvatarName mAvatarName;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
LLFloaterVoiceVolume::LLFloaterVoiceVolume(const LLSD& sd)
|
||||
: LLInspect(LLSD()) // single_instance, doesn't really need key
|
||||
, mAvatarID() // set in onOpen() *Note: we used to show partner's name but we dont anymore --angela 3rd Dec*
|
||||
, mAvatarName()
|
||||
, mAvatarNameCacheConnection()
|
||||
{
|
||||
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this);
|
||||
LLTransientFloater::init(this);
|
||||
|
|
@ -94,6 +96,10 @@ LLFloaterVoiceVolume::LLFloaterVoiceVolume(const LLSD& sd)
|
|||
|
||||
LLFloaterVoiceVolume::~LLFloaterVoiceVolume()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
LLTransientFloaterMgr::getInstance()->removeControlView(this);
|
||||
}
|
||||
|
||||
|
|
@ -126,8 +132,11 @@ void LLFloaterVoiceVolume::onOpen(const LLSD& data)
|
|||
getChild<LLUICtrl>("avatar_name")->setValue("");
|
||||
updateVolumeControls();
|
||||
|
||||
LLAvatarNameCache::get(mAvatarID,
|
||||
boost::bind(&LLFloaterVoiceVolume::onAvatarNameCache, this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID, boost::bind(&LLFloaterVoiceVolume::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
|
||||
void LLFloaterVoiceVolume::updateVolumeControls()
|
||||
|
|
|
|||
|
|
@ -253,7 +253,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
|
|||
mTextIMPossible(true),
|
||||
mOtherParticipantIsAvatar(true),
|
||||
mStartCallOnInitialize(false),
|
||||
mStartedAsIMCall(voice)
|
||||
mStartedAsIMCall(voice),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
// set P2P type by default
|
||||
mSessionType = P2P_SESSION;
|
||||
|
|
@ -334,9 +335,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
|
|||
// history files have consistent (English) names in different locales.
|
||||
if (isAdHocSessionType() && IM_SESSION_INVITE == mType)
|
||||
{
|
||||
LLAvatarNameCache::get(mOtherParticipantID,
|
||||
boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache,
|
||||
this, _2));
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mOtherParticipantID,boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache,this, _2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -450,6 +449,11 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
|
|||
|
||||
LLIMModel::LLIMSession::~LLIMSession()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
delete mSpeakers;
|
||||
mSpeakers = NULL;
|
||||
|
||||
|
|
@ -2056,7 +2060,8 @@ BOOL LLOutgoingCallDialog::postBuild()
|
|||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) :
|
||||
LLCallDialog(payload)
|
||||
LLCallDialog(payload),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -2126,9 +2131,11 @@ BOOL LLIncomingCallDialog::postBuild()
|
|||
else
|
||||
{
|
||||
// Get the full name information
|
||||
LLAvatarNameCache::get(caller_id,
|
||||
boost::bind(&LLIncomingCallDialog::onAvatarNameCache,
|
||||
this, _1, _2, call_type));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(caller_id, boost::bind(&LLIncomingCallDialog::onAvatarNameCache, this, _1, _2, call_type));
|
||||
}
|
||||
|
||||
setIcon(session_id, caller_id);
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ public:
|
|||
void onAdHocNameCache(const LLAvatarName& av_name);
|
||||
|
||||
static LLUUID generateHash(const std::set<LLUUID>& sorted_uuids);
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -547,7 +548,14 @@ class LLIncomingCallDialog : public LLCallDialog
|
|||
{
|
||||
public:
|
||||
LLIncomingCallDialog(const LLSD& payload);
|
||||
|
||||
~LLIncomingCallDialog()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
|
|
@ -564,6 +572,8 @@ private:
|
|||
const LLAvatarName& av_name,
|
||||
const std::string& call_type);
|
||||
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
|
||||
/*virtual*/ void onLifetimeExpired();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ private:
|
|||
// an in-flight request for avatar properties from LLAvatarPropertiesProcessor
|
||||
// is represented by this object
|
||||
LLFetchAvatarData* mPropertiesRequest;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -140,7 +141,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
|
|||
: LLInspect( LLSD() ), // single_instance, doesn't really need key
|
||||
mAvatarID(), // set in onOpen() *Note: we used to show partner's name but we dont anymore --angela 3rd Dec*
|
||||
mAvatarName(),
|
||||
mPropertiesRequest(NULL)
|
||||
mPropertiesRequest(NULL),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
// can't make the properties request until the widgets are constructed
|
||||
// as it might return immediately, so do it in onOpen.
|
||||
|
|
@ -151,6 +153,10 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
|
|||
|
||||
LLInspectAvatar::~LLInspectAvatar()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
// clean up any pending requests so they don't call back into a deleted
|
||||
// view
|
||||
delete mPropertiesRequest;
|
||||
|
|
@ -226,9 +232,11 @@ void LLInspectAvatar::requestUpdate()
|
|||
|
||||
getChild<LLUICtrl>("avatar_icon")->setValue(LLSD(mAvatarID) );
|
||||
|
||||
LLAvatarNameCache::get(mAvatarID,
|
||||
boost::bind(&LLInspectAvatar::onAvatarNameCache,
|
||||
this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarID,boost::bind(&LLInspectAvatar::onAvatarNameCache,this, _1, _2));
|
||||
}
|
||||
|
||||
void LLInspectAvatar::processAvatarData(LLAvatarData* data)
|
||||
|
|
|
|||
|
|
@ -4713,9 +4713,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
|
|||
if (item && (item->getCreatorUUID() != gAgent.getID()) &&
|
||||
(!item->getCreatorUUID().isNull()))
|
||||
{
|
||||
std::string callingcard_name;
|
||||
gCacheName->getFullName(item->getCreatorUUID(), callingcard_name);
|
||||
// IDEVO
|
||||
std::string callingcard_name = LLCacheName::getDefaultName();
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
|
|||
mNameColumnIndex(p.name_column.column_index),
|
||||
mNameColumn(p.name_column.column_name),
|
||||
mAllowCallingCardDrop(p.allow_calling_card_drop),
|
||||
mShortNames(p.short_names)
|
||||
mShortNames(p.short_names),
|
||||
mAvatarNameCacheConnection()
|
||||
{}
|
||||
|
||||
// public
|
||||
|
|
@ -327,9 +328,13 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
|
|||
else
|
||||
{
|
||||
// ...schedule a callback
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&LLNameListCtrl::onAvatarNameCache,
|
||||
this, _1, _2, item->getHandle()));
|
||||
// This is not correct and will likely lead to partially populated lists in cases where avatar names are not cached.
|
||||
// *TODO : Change this to have 2 callbacks : one callback per list item and one for the whole list.
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, item->getHandle()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,13 @@ public:
|
|||
|
||||
protected:
|
||||
LLNameListCtrl(const Params&);
|
||||
virtual ~LLNameListCtrl()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
friend class LLUICtrlFactory;
|
||||
public:
|
||||
// Add a user to the list by name. It will be added, the name
|
||||
|
|
@ -154,6 +161,7 @@ private:
|
|||
std::string mNameColumn;
|
||||
BOOL mAllowCallingCardDrop;
|
||||
bool mShortNames; // display name only, no SLID
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,13 +79,18 @@ LLPanelGroupGeneral::LLPanelGroupGeneral()
|
|||
mCtrlReceiveNotices(NULL),
|
||||
mCtrlListGroup(NULL),
|
||||
mActiveTitleLabel(NULL),
|
||||
mComboActiveTitle(NULL)
|
||||
mComboActiveTitle(NULL),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LLPanelGroupGeneral::~LLPanelGroupGeneral()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPanelGroupGeneral::postBuild()
|
||||
|
|
@ -728,9 +733,12 @@ void LLPanelGroupGeneral::updateMembers()
|
|||
else
|
||||
{
|
||||
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
|
||||
LLAvatarNameCache::get(mMemberProgress->first,
|
||||
boost::bind(&LLPanelGroupGeneral::onNameCache,
|
||||
this, mUdpateSessionID, member, _1, _2));
|
||||
// *TODO : Use a callback per member, not for the panel group.
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, mUdpateSessionID, member, _1, _2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -770,8 +778,7 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
|
|||
|
||||
void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLUUID& id, const LLAvatarName& av_name)
|
||||
{
|
||||
if (!member
|
||||
|| update_id != mUdpateSessionID)
|
||||
if (!member || update_id != mUdpateSessionID)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ private:
|
|||
LLComboBox *mComboMature;
|
||||
|
||||
LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ public:
|
|||
void (*mCloseCallback)(void* data);
|
||||
|
||||
void* mCloseCallbackUserData;
|
||||
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -102,12 +104,17 @@ LLPanelGroupInvite::impl::impl(const LLUUID& group_id):
|
|||
mGroupName( NULL ),
|
||||
mConfirmedOwnerInvite( false ),
|
||||
mCloseCallback( NULL ),
|
||||
mCloseCallbackUserData( NULL )
|
||||
mCloseCallbackUserData( NULL ),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelGroupInvite::impl::~impl()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupInvite::impl::addUsers(const std::vector<std::string>& names,
|
||||
|
|
@ -380,8 +387,24 @@ void LLPanelGroupInvite::impl::callbackAddUsers(const uuid_vec_t& agent_ids, voi
|
|||
std::vector<std::string> names;
|
||||
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
|
||||
{
|
||||
LLAvatarNameCache::get(agent_ids[i],
|
||||
boost::bind(&LLPanelGroupInvite::impl::onAvatarNameCache, _1, _2, user_data));
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(agent_ids[i], &av_name))
|
||||
{
|
||||
LLPanelGroupInvite::impl::onAvatarNameCache(agent_ids[i], av_name, user_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
impl* selfp = (impl*) user_data;
|
||||
if (selfp)
|
||||
{
|
||||
if (selfp->mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
selfp->mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
// *TODO : Add a callback per avatar name being fetched.
|
||||
selfp->mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_ids[i],boost::bind(&LLPanelGroupInvite::impl::onAvatarNameCache, _1, _2, user_data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -473,8 +496,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
|
|||
if (!LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
// actually it should happen, just in case
|
||||
LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(
|
||||
&LLPanelGroupInvite::addUserCallback, this, _1, _2));
|
||||
//LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
|
||||
// for this special case!
|
||||
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// removed id will be added in callback
|
||||
|
|
|
|||
|
|
@ -743,13 +743,18 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
|
|||
mChanged(FALSE),
|
||||
mPendingMemberUpdate(FALSE),
|
||||
mHasMatch(FALSE),
|
||||
mNumOwnerAdditions(0)
|
||||
mNumOwnerAdditions(0),
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
mUdpateSessionID = LLUUID::null;
|
||||
}
|
||||
|
||||
LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
if (mMembersList)
|
||||
{
|
||||
gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName());
|
||||
|
|
@ -1678,8 +1683,12 @@ void LLPanelGroupMembersSubTab::updateMembers()
|
|||
else
|
||||
{
|
||||
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
|
||||
LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache,
|
||||
this, mUdpateSessionID, mMemberProgress->second, _1, _2));
|
||||
// *TODO : Add one callback per fetched avatar name
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, mUdpateSessionID, mMemberProgress->second, _1, _2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ protected:
|
|||
U32 mNumOwnerAdditions;
|
||||
|
||||
LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab
|
||||
|
|
|
|||
|
|
@ -79,13 +79,18 @@ LLPanelPlaceProfile::LLPanelPlaceProfile()
|
|||
mForSalePanel(NULL),
|
||||
mYouAreHerePanel(NULL),
|
||||
mSelectedParcelID(-1),
|
||||
mAccordionCtrl(NULL)
|
||||
mAccordionCtrl(NULL),
|
||||
mAvatarNameCacheConnection()
|
||||
{}
|
||||
|
||||
// virtual
|
||||
LLPanelPlaceProfile::~LLPanelPlaceProfile()
|
||||
{
|
||||
gIdleCallbacks.deleteFunction(&LLPanelPlaceProfile::updateYouAreHereBanner, this);
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -499,9 +504,11 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
|
|||
std::string parcel_owner =
|
||||
LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString();
|
||||
mParcelOwner->setText(parcel_owner);
|
||||
LLAvatarNameCache::get(region->getOwner(),
|
||||
boost::bind(&LLPanelPlaceInfo::onAvatarNameCache,
|
||||
_1, _2, mRegionOwnerText));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText));
|
||||
}
|
||||
|
||||
if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus())
|
||||
|
|
@ -523,9 +530,11 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
|
|||
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
|
||||
if(auth_buyer_id.notNull())
|
||||
{
|
||||
LLAvatarNameCache::get(auth_buyer_id,
|
||||
boost::bind(&LLPanelPlaceInfo::onAvatarNameCache,
|
||||
_1, _2, mSaleToText));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText));
|
||||
|
||||
// Show sales info to a specific person or a group he belongs to.
|
||||
if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id))
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class LLPanelPlaceProfile : public LLPanelPlaceInfo
|
|||
public:
|
||||
LLPanelPlaceProfile();
|
||||
/*virtual*/ ~LLPanelPlaceProfile();
|
||||
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
/*virtual*/ void resetLocation();
|
||||
|
|
@ -116,6 +116,8 @@ private:
|
|||
LLTextEditor* mResaleText;
|
||||
LLTextBox* mSaleToText;
|
||||
LLAccordionCtrl* mAccordionCtrl;
|
||||
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELPLACEPROFILE_H
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ void LLPathfindingObject::fetchOwnerName()
|
|||
mHasOwnerName = LLAvatarNameCache::get(mOwnerUUID, &mOwnerName);
|
||||
if (!mHasOwnerName)
|
||||
{
|
||||
disconnectAvatarNameCacheConnection();
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mOwnerUUID, boost::bind(&LLPathfindingObject::handleAvatarNameFetch, this, _1, _2));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -972,24 +972,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
|
|||
|| !existing_inspector->getVisible()
|
||||
|| existing_inspector->getKey()["avatar_id"].asUUID() != hover_object->getID())
|
||||
{
|
||||
// IDEVO: try to get display name + username
|
||||
// Try to get display name + username
|
||||
std::string final_name;
|
||||
std::string full_name;
|
||||
if (!gCacheName->getFullName(hover_object->getID(), full_name))
|
||||
{
|
||||
LLNameValue* firstname = hover_object->getNVPair("FirstName");
|
||||
LLNameValue* lastname = hover_object->getNVPair("LastName");
|
||||
if (firstname && lastname)
|
||||
{
|
||||
full_name = LLCacheName::buildFullName(
|
||||
firstname->getString(), lastname->getString());
|
||||
}
|
||||
else
|
||||
{
|
||||
full_name = LLTrans::getString("TooltipPerson");
|
||||
}
|
||||
}
|
||||
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(hover_object->getID(), &av_name))
|
||||
{
|
||||
|
|
@ -997,7 +981,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
|
|||
}
|
||||
else
|
||||
{
|
||||
final_name = full_name;
|
||||
final_name = LLTrans::getString("TooltipPerson");;
|
||||
}
|
||||
|
||||
// *HACK: We may select this object, so pretend it was clicked
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ namespace LLViewerDisplayName
|
|||
sNameChangedSignal.connect(cb);
|
||||
}
|
||||
|
||||
void doNothing() { }
|
||||
}
|
||||
|
||||
class LLSetDisplayNameResponder : public LLHTTPClient::Responder
|
||||
|
|
@ -139,9 +140,9 @@ public:
|
|||
LLUUID agent_id = gAgent.getID();
|
||||
// Flush stale data
|
||||
LLAvatarNameCache::erase( agent_id );
|
||||
// Queue request for new data
|
||||
LLAvatarName ignored;
|
||||
LLAvatarNameCache::get( agent_id, &ignored );
|
||||
// Queue request for new data: nothing to do on callback though...
|
||||
// Note: no need to disconnect the callback as it never gets out of scope
|
||||
LLAvatarNameCache::get(agent_id, boost::bind(&LLViewerDisplayName::doNothing));
|
||||
// Kill name tag, as it is wrong
|
||||
LLVOAvatar::invalidateNameTag( agent_id );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2254,7 +2254,7 @@ static std::string clean_name_from_task_im(const std::string& msg,
|
|||
return msg;
|
||||
}
|
||||
|
||||
void notification_display_name_callback(const LLUUID& id,
|
||||
static void notification_display_name_callback(const LLUUID& id,
|
||||
const LLAvatarName& av_name,
|
||||
const std::string& name,
|
||||
LLSD& substitutions,
|
||||
|
|
@ -2278,7 +2278,7 @@ protected:
|
|||
};
|
||||
|
||||
// Callback for name resolution of a god/estate message
|
||||
void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string message)
|
||||
static void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string message)
|
||||
{
|
||||
LLSD args;
|
||||
args["NAME"] = av_name.getCompleteName();
|
||||
|
|
@ -3212,12 +3212,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
args["NAME"] = name;
|
||||
LLSD payload;
|
||||
payload["from_id"] = from_id;
|
||||
LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback,
|
||||
_1,
|
||||
_2,
|
||||
"FriendshipAccepted",
|
||||
args,
|
||||
payload));
|
||||
LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback,_1,_2,"FriendshipAccepted",args,payload));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -5651,11 +5646,9 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
|
|||
_1, _2, _3,
|
||||
notification, final_args, payload));
|
||||
}
|
||||
else {
|
||||
LLAvatarNameCache::get(name_id,
|
||||
boost::bind(&money_balance_avatar_notify,
|
||||
_1, _2,
|
||||
notification, final_args, payload));
|
||||
else
|
||||
{
|
||||
LLAvatarNameCache::get(name_id, boost::bind(&money_balance_avatar_notify, _1, _2, notification, final_args, payload));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3193,8 +3193,9 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
|||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(getID(), &av_name))
|
||||
{
|
||||
// ...call this function back when the name arrives and force a rebuild
|
||||
LLAvatarNameCache::get(getID(),boost::bind(&LLVOAvatar::clearNameTag, this));
|
||||
// Force a rebuild at next idle
|
||||
// Note: do not connect a callback on idle().
|
||||
clearNameTag();
|
||||
}
|
||||
|
||||
// Might be blank if name not available yet, that's OK
|
||||
|
|
|
|||
|
|
@ -316,7 +316,9 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
|||
mCaptureBufferRecording(false),
|
||||
mCaptureBufferRecorded(false),
|
||||
mCaptureBufferPlaying(false),
|
||||
mPlayRequestCount(0)
|
||||
mPlayRequestCount(0),
|
||||
|
||||
mAvatarNameCacheConnection()
|
||||
{
|
||||
mSpeakerVolume = scale_speaker_volume(0);
|
||||
|
||||
|
|
@ -349,6 +351,10 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
|
|||
|
||||
LLVivoxVoiceClient::~LLVivoxVoiceClient()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
|
|
@ -6192,9 +6198,11 @@ void LLVivoxVoiceClient::notifyFriendObservers()
|
|||
|
||||
void LLVivoxVoiceClient::lookupName(const LLUUID &id)
|
||||
{
|
||||
LLAvatarNameCache::get(id,
|
||||
boost::bind(&LLVivoxVoiceClient::onAvatarNameCache,
|
||||
this, _1, _2));
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLVivoxVoiceClient::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
|
||||
void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id,
|
||||
|
|
|
|||
|
|
@ -641,6 +641,7 @@ protected:
|
|||
void lookupName(const LLUUID &id);
|
||||
void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
|
||||
void avatarNameResolved(const LLUUID &id, const std::string &name);
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
|
||||
/////////////////////////////
|
||||
// Voice fonts
|
||||
|
|
|
|||
Loading…
Reference in New Issue