diff options
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 8a917a082c..73c4722b82 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -629,11 +629,11 @@ static void got_full_name_callback( LLHandle<LLPanel> profile_panel_handle, cons { if (profile_panel_handle.isDead() ) return; - LLPanelAvatarProfile* profile_panel = dynamic_cast<LLPanelAvatarProfile*>(profile_panel_handle.get());
- if ( ! profile_panel ) return;
+ LLPanelAvatarProfile* profile_panel = dynamic_cast<LLPanelAvatarProfile*>(profile_panel_handle.get()); + if ( ! profile_panel ) return; + + LLStringUtil::format_map_t args; - LLStringUtil::format_map_t args;
-
std::string name; if (LLAvatarNameCache::useDisplayNames()) { @@ -642,21 +642,21 @@ static void got_full_name_callback( LLHandle<LLPanel> profile_panel_handle, cons else { name = full_name; - }
-
- args["[NAME]"] = name;
-
- std::string linden_name = profile_panel->getString("name_text_args", args);
+ } + + args["[NAME]"] = name; + + std::string linden_name = profile_panel->getString("name_text_args", args); profile_panel->getChild<LLUICtrl>("name_descr_text")->setValue(linden_name); } void LLPanelAvatarProfile::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { - LLStringUtil::format_map_t args;
- args["[DISPLAY_NAME]"] = av_name.mDisplayName;
-
- std::string display_name = getString("display_name_text_args", args);
- getChild<LLUICtrl>("display_name_descr_text")->setValue(display_name);
+ LLStringUtil::format_map_t args; + args["[DISPLAY_NAME]"] = av_name.mDisplayName; + + std::string display_name = getString("display_name_text_args", args); + getChild<LLUICtrl>("display_name_descr_text")->setValue(display_name); } void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) @@ -672,23 +672,23 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) } // ask (asynchronously) for the avatar name - LLHandle<LLPanel> profile_panel_handle = getHandle();
- std::string full_name;
- if (gCacheName->getFullName(avatar_data->agent_id, full_name))
- {
- // name in cache, call callback directly
- got_full_name_callback( profile_panel_handle, full_name );
- }
- else
- {
- // not in cache, lookup name
- gCacheName->get(avatar_data->agent_id, false, boost::bind( got_full_name_callback, profile_panel_handle, _2 ));
- }
-
- // get display name
+ LLHandle<LLPanel> profile_panel_handle = getHandle(); + std::string full_name; + if (gCacheName->getFullName(avatar_data->agent_id, full_name)) + { + // name in cache, call callback directly + got_full_name_callback( profile_panel_handle, full_name ); + } + else + { + // not in cache, lookup name + gCacheName->get(avatar_data->agent_id, false, boost::bind( got_full_name_callback, profile_panel_handle, _2 )); + } + + // get display name LLAvatarNameCache::get(avatar_data->avatar_id, - boost::bind(&LLPanelAvatarProfile::onNameCache, this, _1, _2));
-
+ boost::bind(&LLPanelAvatarProfile::onNameCache, this, _1, _2)); + args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now()); std::string register_date = getString("RegisterDateFormat", args); getChild<LLUICtrl>("register_date")->setValue(register_date ); |