From 70a0dbe8f8466438e12a45e70d0f901b9324f228 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 20 Nov 2009 22:57:59 +0200 Subject: Renamed classes and files for "Me" task panel for better readability. Renamed files: - indra/newview/llpanelmeprofile.{cpp,h} to llpanelme.{cpp,h} - panel_me_profile.xml to panel_me.xml - panel_profile_user.xml to panel_my_profile.xml Renamed classes: - LLPanelAvatarMeProfile to LLPanelMyProfile - LLPanelMeProfile to LLPanelMe - LLPanelMeProfileEdit to LLPanelMyProfileEdit --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelavatar.cpp') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 2254684f21..146be0df7f 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -119,7 +119,7 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, static LLDefaultChildRegistry::Register r("drop_target"); static LLRegisterPanelClassWrapper t_panel_profile("panel_profile"); -static LLRegisterPanelClassWrapper t_panel_me_profile("panel_me_profile"); +static LLRegisterPanelClassWrapper t_panel_my_profile("panel_my_profile"); static LLRegisterPanelClassWrapper t_panel_notes("panel_notes"); //----------------------------------------------------------------------------- @@ -585,19 +585,19 @@ void LLPanelAvatarProfile::onOverflowButtonClicked() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLPanelAvatarMeProfile::LLPanelAvatarMeProfile() +LLPanelMyProfile::LLPanelMyProfile() : LLPanelAvatarProfile() { } -BOOL LLPanelAvatarMeProfile::postBuild() +BOOL LLPanelMyProfile::postBuild() { LLPanelAvatarProfile::postBuild(); mStatusCombobox = getChild("status_combo"); - childSetCommitCallback("status_combo", boost::bind(&LLPanelAvatarMeProfile::onStatusChanged, this), NULL); - childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelAvatarMeProfile::onStatusMessageChanged, this), NULL); + childSetCommitCallback("status_combo", boost::bind(&LLPanelMyProfile::onStatusChanged, this), NULL); + childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelMyProfile::onStatusMessageChanged, this), NULL); resetControls(); resetData(); @@ -605,12 +605,12 @@ BOOL LLPanelAvatarMeProfile::postBuild() return TRUE; } -void LLPanelAvatarMeProfile::onOpen(const LLSD& key) +void LLPanelMyProfile::onOpen(const LLSD& key) { LLPanelProfileTab::onOpen(key); } -void LLPanelAvatarMeProfile::processProfileProperties(const LLAvatarData* avatar_data) +void LLPanelMyProfile::processProfileProperties(const LLAvatarData* avatar_data) { fillCommonData(avatar_data); @@ -621,7 +621,7 @@ void LLPanelAvatarMeProfile::processProfileProperties(const LLAvatarData* avatar fillAccountStatus(avatar_data); } -void LLPanelAvatarMeProfile::fillStatusData(const LLAvatarData* avatar_data) +void LLPanelMyProfile::fillStatusData(const LLAvatarData* avatar_data) { std::string status; if (gAgent.getAFK()) @@ -640,7 +640,7 @@ void LLPanelAvatarMeProfile::fillStatusData(const LLAvatarData* avatar_data) mStatusCombobox->setValue(status); } -void LLPanelAvatarMeProfile::resetControls() +void LLPanelMyProfile::resetControls() { childSetVisible("status_panel", false); childSetVisible("profile_buttons_panel", false); @@ -650,7 +650,7 @@ void LLPanelAvatarMeProfile::resetControls() childSetVisible("profile_me_buttons_panel", true); } -void LLPanelAvatarMeProfile::onStatusChanged() +void LLPanelMyProfile::onStatusChanged() { LLSD::String status = mStatusCombobox->getValue().asString(); @@ -672,7 +672,7 @@ void LLPanelAvatarMeProfile::onStatusChanged() } } -void LLPanelAvatarMeProfile::onStatusMessageChanged() +void LLPanelMyProfile::onStatusMessageChanged() { updateData(); } -- cgit v1.2.3 From 67c832d94b53fb5d32ec27eebf7f57b668e899db Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 20 Nov 2009 14:39:46 -0800 Subject: EXT-1743 People inspectors should show Age, not Date born --- indra/newview/llpanelavatar.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelavatar.cpp') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 2254684f21..03401d934f 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -38,6 +38,7 @@ #include "llavatarconstants.h" // AVATAR_ONLINE #include "llcallingcard.h" #include "llcombobox.h" +#include "lldateutil.h" // ageFromDate() #include "llimview.h" #include "lltexteditor.h" #include "lltexturectrl.h" @@ -466,8 +467,11 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) //remove avatar id from cache to get fresh info LLAvatarIconIDCache::getInstance()->remove(avatar_data->avatar_id); - - childSetValue("register_date", avatar_data->born_on ); + LLStringUtil::format_map_t args; + args["[REG_DATE]"] = avatar_data->born_on; + args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now()); + std::string register_date = getString("RegisterDateFormat", args); + childSetValue("register_date", register_date ); childSetValue("sl_description_edit", avatar_data->about_text); childSetValue("fl_description_edit",avatar_data->fl_about_text); childSetValue("2nd_life_pic", avatar_data->image_id); -- cgit v1.2.3 From 52c27b99b839cccab09b61c5b02ced2e9df0a04b Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 20 Nov 2009 17:52:17 -0500 Subject: EXT-829 share button in people panel is inactive First pass at getting share buttons in the three places we need them: person's profile IM window people panel Only UI changes so far, functionality in a future checkin. Will be reviewed before pushing. --HG-- branch : avatar-pipeline --- indra/newview/llpanelavatar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llpanelavatar.cpp') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 2254684f21..7f4a22aaf7 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -339,6 +339,7 @@ BOOL LLPanelAvatarProfile::postBuild() LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this)); + registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this)); mProfileMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -525,6 +526,11 @@ void LLPanelAvatarProfile::pay() LLAvatarActions::pay(getAvatarId()); } +void LLPanelAvatarProfile::share() +{ + LLAvatarActions::share(getAvatarID()); +} + void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url) { LLWeb::loadURL(url); -- cgit v1.2.3 From 98c184619b62e1d0e4e0f40613449a643604eba9 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 23 Nov 2009 11:32:30 -0500 Subject: EXT-829 share button in profile inactive Pass number 2 - re-enabled share button in the locations where it should exist and disabled it in others. Next pass will be making all buttons functional. Will be post-reviewed before pushing --HG-- branch : avatar-pipeline --- indra/newview/llpanelavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelavatar.cpp') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 7f4a22aaf7..a822897c7e 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -528,7 +528,7 @@ void LLPanelAvatarProfile::pay() void LLPanelAvatarProfile::share() { - LLAvatarActions::share(getAvatarID()); + LLAvatarActions::share(getAvatarId()); } void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url) -- cgit v1.2.3 From c227f93b1a6f89847242261f634079d4d6bfbf08 Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Tue, 24 Nov 2009 20:27:56 +0200 Subject: Fixed minor bug EXT-2745 (Contents of Groups field duplicates after IM session has been started) --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'indra/newview/llpanelavatar.cpp') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 03401d934f..ed1d93db78 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -359,7 +359,7 @@ void LLPanelAvatarProfile::onOpen(const LLSD& key) { LLPanelProfileTab::onOpen(key); - mGroups.erase(); + mGroups.clear(); //Disable "Add Friend" button for friends. childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId())); @@ -391,7 +391,7 @@ void LLPanelAvatarProfile::resetControls() void LLPanelAvatarProfile::resetData() { - mGroups.erase(); + mGroups.clear(); childSetValue("2nd_life_pic",LLUUID::null); childSetValue("real_world_pic",LLUUID::null); childSetValue("online_status",LLStringUtil::null); @@ -443,23 +443,29 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g // Group properties may arrive in two callbacks, we need to save them across // different calls. We can't do that in textbox as textbox may change the text. - std::string groups = mGroups; LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin(); const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end(); - if(groups.empty() && it_end != it) - { - groups = (*it).group_name; - ++it; - } for(; it_end != it; ++it) { LLAvatarGroups::LLGroupData group_data = *it; - groups += ", "; - groups += group_data.group_name; + + // Check if there is no duplicates for this group + if (std::find(mGroups.begin(), mGroups.end(), group_data.group_name) == mGroups.end()) + mGroups.push_back(group_data.group_name); + } + + // Creating string, containing group list + std::string groups = ""; + for (group_list_t::const_iterator it = mGroups.begin(); it != mGroups.end(); ++it) + { + if (it != mGroups.begin()) + groups += ", "; + + groups += *it; } - mGroups = groups; - childSetValue("sl_groups",mGroups); + + childSetValue("sl_groups", groups); } void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) -- cgit v1.2.3