CHUI-580 : WIP : Added disconnect of callbacks once they're called to prevent filling up the callback queue
parent
3d137bae5c
commit
c2d332a89c
|
|
@ -1827,6 +1827,8 @@ void LLPostponedNotification::fetchAvatarName(const LLUUID& id)
|
|||
void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
std::string name = av_name.getCompleteName();
|
||||
|
||||
// from PE merge - we should figure out if this is the right thing to do
|
||||
|
|
|
|||
|
|
@ -372,7 +372,9 @@ void LLUrlEntryAgent::callObservers(const std::string &id,
|
|||
void LLUrlEntryAgent::onAvatarNameCache(const LLUUID& id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
std::string label = av_name.getCompleteName();
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
std::string label = av_name.getCompleteName();
|
||||
|
||||
// received the agent name from the server - tell our observers
|
||||
callObservers(id.asString(), label, mIcon);
|
||||
|
|
@ -525,6 +527,8 @@ LLUrlEntryAgentName::LLUrlEntryAgentName() :
|
|||
void LLUrlEntryAgentName::onAvatarNameCache(const LLUUID& id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
std::string label = getName(av_name);
|
||||
// received the agent name from the server - tell our observers
|
||||
callObservers(id.asString(), label, mIcon);
|
||||
|
|
@ -562,7 +566,7 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
|
|||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentCompleteName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return LLTrans::getString("LoadingData");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,6 +313,8 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
|
|||
|
||||
void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
if (agent_id == mAvatarId)
|
||||
{
|
||||
// Most avatar icon controls are next to a UI element that shows
|
||||
|
|
|
|||
|
|
@ -459,6 +459,8 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin
|
|||
|
||||
void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
setAvatarName(av_name.getDisplayName());
|
||||
setAvatarToolTip(av_name.getUserName());
|
||||
|
||||
|
|
|
|||
|
|
@ -552,6 +552,8 @@ private:
|
|||
|
||||
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
mFrom = av_name.getDisplayName();
|
||||
|
||||
LLTextBox* user_name = getChild<LLTextBox>("user_name");
|
||||
|
|
|
|||
|
|
@ -518,5 +518,6 @@ void LLConversationLog::onNewMessageReceived(const LLSD& data)
|
|||
|
||||
void LLConversationLog::onAvatarNameCache(const LLUUID& participant_id, const LLAvatarName& av_name, const LLIMModel::LLIMSession* session)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
updateConversationName(session, av_name.getCompleteName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -446,6 +446,8 @@ void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
|
||||
void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
mName = av_name.getUserName();
|
||||
mDisplayName = av_name.getDisplayName();
|
||||
mNeedsRefresh = true;
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void LLFloaterInspect::refresh()
|
|||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
}
|
||||
mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::setDirty, this));
|
||||
mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::get(idCreator, &av_name))
|
||||
|
|
@ -247,7 +247,7 @@ void LLFloaterInspect::refresh()
|
|||
{
|
||||
mCreatorNameCacheConnection.disconnect();
|
||||
}
|
||||
mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::setDirty, this));
|
||||
mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetCreatorNameCallback, this));
|
||||
}
|
||||
|
||||
row["id"] = obj->getObject()->getID();
|
||||
|
|
@ -297,6 +297,18 @@ void LLFloaterInspect::dirty()
|
|||
setDirty();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onGetOwnerNameCallback()
|
||||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
setDirty();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onGetCreatorNameCallback()
|
||||
{
|
||||
mCreatorNameCacheConnection.disconnect();
|
||||
setDirty();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::draw()
|
||||
{
|
||||
if (mDirty)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ protected:
|
|||
bool mDirty;
|
||||
|
||||
private:
|
||||
void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name);
|
||||
void onGetOwnerNameCallback();
|
||||
void onGetCreatorNameCallback();
|
||||
|
||||
LLFloaterInspect(const LLSD& key);
|
||||
virtual ~LLFloaterInspect(void);
|
||||
|
|
|
|||
|
|
@ -328,6 +328,8 @@ void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id)
|
|||
|
||||
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
if (mObjectID == avatar_id)
|
||||
{
|
||||
mOwnerName = av_name.getCompleteName();
|
||||
|
|
|
|||
|
|
@ -246,6 +246,8 @@ void LLFloaterSellLandUI::updateParcelInfo()
|
|||
|
||||
void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
getChild<LLUICtrl>("sell_to_agent")->setValue(av_name.getCompleteName());
|
||||
getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.getUserName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,6 +199,8 @@ void LLFloaterVoiceVolume::onAvatarNameCache(
|
|||
const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
if (agent_id != mAvatarID)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
|
|||
|
||||
void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
if (!av_name.isValidName())
|
||||
{
|
||||
S32 separator_index = mName.rfind(" ");
|
||||
|
|
@ -2178,6 +2180,7 @@ void LLIncomingCallDialog::onAvatarNameCache(const LLUUID& agent_id,
|
|||
const LLAvatarName& av_name,
|
||||
const std::string& call_type)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
std::string title = av_name.getCompleteName();
|
||||
setCallerName(title, av_name.getCompleteName(), call_type);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,6 +269,8 @@ void LLInspectAvatar::onAvatarNameCache(
|
|||
const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
if (agent_id == mAvatarID)
|
||||
{
|
||||
getChild<LLUICtrl>("user_name")->setValue(av_name.getDisplayName());
|
||||
|
|
|
|||
|
|
@ -393,6 +393,8 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
|
|||
const LLAvatarName& av_name,
|
||||
LLHandle<LLNameListItem> item)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
std::string name;
|
||||
if (mShortNames)
|
||||
name = av_name.getDisplayName();
|
||||
|
|
|
|||
|
|
@ -777,6 +777,8 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
|
|||
|
||||
void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
if (!gdatap
|
||||
|
|
|
|||
|
|
@ -417,6 +417,10 @@ void LLPanelGroupInvite::impl::onAvatarNameCache(const LLUUID& agent_id,
|
|||
|
||||
if (selfp)
|
||||
{
|
||||
if (selfp->mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
selfp->mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
std::vector<std::string> names;
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(agent_id);
|
||||
|
|
|
|||
|
|
@ -1609,6 +1609,8 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
|
|||
|
||||
void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if (!gdatap
|
||||
|| gdatap->getMemberVersion() != update_id
|
||||
|
|
|
|||
|
|
@ -79,18 +79,13 @@ LLPanelPlaceProfile::LLPanelPlaceProfile()
|
|||
mForSalePanel(NULL),
|
||||
mYouAreHerePanel(NULL),
|
||||
mSelectedParcelID(-1),
|
||||
mAccordionCtrl(NULL),
|
||||
mAvatarNameCacheConnection()
|
||||
mAccordionCtrl(NULL)
|
||||
{}
|
||||
|
||||
// virtual
|
||||
LLPanelPlaceProfile::~LLPanelPlaceProfile()
|
||||
{
|
||||
gIdleCallbacks.deleteFunction(&LLPanelPlaceProfile::updateYouAreHereBanner, this);
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -504,11 +499,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
|
|||
std::string parcel_owner =
|
||||
LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString();
|
||||
mParcelOwner->setText(parcel_owner);
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText));
|
||||
LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText));
|
||||
}
|
||||
|
||||
if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus())
|
||||
|
|
@ -530,11 +521,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
|
|||
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
|
||||
if(auth_buyer_id.notNull())
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText));
|
||||
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))
|
||||
|
|
|
|||
|
|
@ -116,8 +116,6 @@ private:
|
|||
LLTextEditor* mResaleText;
|
||||
LLTextBox* mSaleToText;
|
||||
LLAccordionCtrl* mAccordionCtrl;
|
||||
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELPLACEPROFILE_H
|
||||
|
|
|
|||
|
|
@ -6208,6 +6208,7 @@ void LLVivoxVoiceClient::lookupName(const LLUUID &id)
|
|||
void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
std::string display_name = av_name.getDisplayName();
|
||||
avatarNameResolved(agent_id, display_name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue