diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2009-10-19 01:45:44 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-19 01:45:44 +0000 |
| commit | 8103710c054ec6ea4a46f9732e569e543691184b (patch) | |
| tree | ac03dd6d385e3345c57eff0e1064a011597fe5d6 /indra/newview/llavatariconctrl.cpp | |
| parent | 4ee757b45d527699b094bf9422244171fdd7d693 (diff) | |
Merging revisions 2046-2068 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0, respecting ancestry
* Bugs: EXT-1414 EXT-1213 EXT-1539 EXT-1253 EXT-1446 EXT-1438 EXT-1233 EXT-1466 EXT-1446 EXT-1512 EXT-1231
* Dev: EXT-719 (landmarks) EXT-747 EXT-1446 EXT-1378 EXT-397 EXT-1476
* IM changes
Diffstat (limited to 'indra/newview/llavatariconctrl.cpp')
| -rw-r--r-- | indra/newview/llavatariconctrl.cpp | 56 |
1 files changed, 9 insertions, 47 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 3e411583ac..7ae1b5cd4a 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -181,16 +181,6 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) rect.setOriginAndSize(left, bottom, llavatariconctrl_symbol_size, llavatariconctrl_symbol_size); - LLIconCtrl::Params icparams; - icparams.name ("Status Symbol"); - icparams.follows.flags (FOLLOWS_RIGHT | FOLLOWS_BOTTOM); - icparams.rect (rect); - mStatusSymbol = LLUICtrlFactory::create<LLIconCtrl> (icparams); - mStatusSymbol->setValue("circle.tga"); - mStatusSymbol->setColor(LLColor4::grey); - - addChild(mStatusSymbol); - if (p.avatar_id.isProvided()) { LLSD value(p.avatar_id); @@ -239,16 +229,13 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) mAvatarId = value.asUUID(); // *BUG: This will return stale icons if a user changes their - // profile picture. Also, the online/offline tooltips will be - // out of date. However, otherwise we send too many upstream + // profile picture. However, otherwise we send too many upstream // AvatarPropertiesRequest messages. - // - // *TODO: Implement a timeout on the icon cache, perhaps a day?, - // and make the cache update if a user views the full-profile for - // an avatar. + + // to get fresh avatar icon use + // LLAvatarIconIDCache::getInstance()->remove(avatar_id); // Check if cache already contains image_id for that avatar - if (!updateFromCache()) { app->addObserver(mAvatarId, this); @@ -282,36 +269,6 @@ bool LLAvatarIconCtrl::updateFromCache() LLIconCtrl::setValue("default_profile_picture.j2c"); } - // Can only see online status of friends - if (LLAvatarTracker::instance().isBuddy(mAvatarId)) - { - if (LLAvatarTracker::instance().isBuddyOnline(mAvatarId)) - { - // Update color of status symbol and tool tip - mStatusSymbol->setColor(LLColor4::green); - if (mDrawTooltip) - { - setToolTip((LLStringExplicit)"Online"); - } - } - else - { - mStatusSymbol->setColor(LLColor4::grey); - if (mDrawTooltip) - { - setToolTip((LLStringExplicit)"Offline"); - } - } - } - else - { - // Not a buddy, no information - mStatusSymbol->setColor(LLColor4::grey); - if (mDrawTooltip) - { - setToolTip((LLStringExplicit)""); - } - } return true; } @@ -370,6 +327,11 @@ void LLAvatarIconCtrl::nameUpdatedCallback( { mFirstName = first; mLastName = last; + + if (mDrawTooltip) + { + setToolTip(mFirstName + " " + mLastName); + } } } |
