diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfloateravatarinfo.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llfloateravatarinfo.cpp')
-rw-r--r-- | linden/indra/newview/llfloateravatarinfo.cpp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/linden/indra/newview/llfloateravatarinfo.cpp b/linden/indra/newview/llfloateravatarinfo.cpp index b740a46..4abf493 100644 --- a/linden/indra/newview/llfloateravatarinfo.cpp +++ b/linden/indra/newview/llfloateravatarinfo.cpp | |||
@@ -114,13 +114,13 @@ LLFloaterAvatarInfo::LLFloaterAvatarInfo(const std::string& name, const LLRect & | |||
114 | 114 | ||
115 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_profile.xml", &factory_map); | 115 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_profile.xml", &factory_map); |
116 | 116 | ||
117 | |||
118 | if(mPanelAvatarp) | 117 | if(mPanelAvatarp) |
119 | { | 118 | { |
120 | mPanelAvatarp->selectTab(0); | 119 | mPanelAvatarp->selectTab(0); |
121 | } | 120 | } |
122 | 121 | ||
123 | gAvatarInfoInstances.addData(avatar_id, this); | 122 | gAvatarInfoInstances.addData(avatar_id, this); // must be done before callback below is called. |
123 | gCacheName->get(avatar_id, FALSE, callbackLoadAvatarName); | ||
124 | } | 124 | } |
125 | 125 | ||
126 | // virtual | 126 | // virtual |
@@ -175,7 +175,7 @@ void LLFloaterAvatarInfo::showFromObject( | |||
175 | LLFloaterAvatarInfo *floater = show(avatar_id); | 175 | LLFloaterAvatarInfo *floater = show(avatar_id); |
176 | if (floater) | 176 | if (floater) |
177 | { | 177 | { |
178 | floater->mPanelAvatarp->setAvatarID(avatar_id, "", ONLINE_STATUS_NO); | 178 | floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO); |
179 | floater->mPanelAvatarp->selectTabByName(tab_name); | 179 | floater->mPanelAvatarp->selectTabByName(tab_name); |
180 | } | 180 | } |
181 | } | 181 | } |
@@ -186,7 +186,7 @@ void LLFloaterAvatarInfo::showFromDirectory(const LLUUID &avatar_id) | |||
186 | LLFloaterAvatarInfo *floater = show(avatar_id); | 186 | LLFloaterAvatarInfo *floater = show(avatar_id); |
187 | if (floater) | 187 | if (floater) |
188 | { | 188 | { |
189 | floater->mPanelAvatarp->setAvatarID(avatar_id, "", ONLINE_STATUS_NO); | 189 | floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO); |
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
@@ -222,7 +222,7 @@ void LLFloaterAvatarInfo::showFromProfile(const LLUUID &avatar_id, LLRect rect) | |||
222 | avatar_id); | 222 | avatar_id); |
223 | floater->translate(rect.mLeft - floater->getRect().mLeft + 16, | 223 | floater->translate(rect.mLeft - floater->getRect().mLeft + 16, |
224 | rect.mTop - floater->getRect().mTop - 16); | 224 | rect.mTop - floater->getRect().mTop - 16); |
225 | floater->mPanelAvatarp->setAvatarID(avatar_id, "", ONLINE_STATUS_NO); | 225 | floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO); |
226 | } | 226 | } |
227 | if (floater) | 227 | if (floater) |
228 | { | 228 | { |
@@ -238,6 +238,23 @@ void LLFloaterAvatarInfo::showProfileCallback(S32 option, void *userdata) | |||
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | // static | ||
242 | void LLFloaterAvatarInfo::callbackLoadAvatarName(const LLUUID& id, | ||
243 | const std::string& first, | ||
244 | const std::string& last, | ||
245 | BOOL is_group, | ||
246 | void* data) | ||
247 | { | ||
248 | LLFloaterAvatarInfo *floater = gAvatarInfoInstances.getIfThere(id); | ||
249 | |||
250 | if (floater) | ||
251 | { | ||
252 | // Build a new title including the avatar name. | ||
253 | std::ostringstream title; | ||
254 | title << first << " " << last << " - " << floater->getTitle(); | ||
255 | floater->setTitle(title.str()); | ||
256 | } | ||
257 | } | ||
241 | 258 | ||
242 | //// virtual | 259 | //// virtual |
243 | void LLFloaterAvatarInfo::draw() | 260 | void LLFloaterAvatarInfo::draw() |
@@ -260,7 +277,7 @@ LLFloaterAvatarInfo* LLFloaterAvatarInfo::getInstance(const LLUUID &id) | |||
260 | void LLFloaterAvatarInfo::loadAsset() | 277 | void LLFloaterAvatarInfo::loadAsset() |
261 | { | 278 | { |
262 | if (mPanelAvatarp) { | 279 | if (mPanelAvatarp) { |
263 | mPanelAvatarp->setAvatarID(mAvatarID, "", mSuggestedOnlineStatus); | 280 | mPanelAvatarp->setAvatarID(mAvatarID, LLStringUtil::null, mSuggestedOnlineStatus); |
264 | mAssetStatus = PREVIEW_ASSET_LOADING; | 281 | mAssetStatus = PREVIEW_ASSET_LOADING; |
265 | } | 282 | } |
266 | } | 283 | } |