From ab0fb9f8391cf55c2c95ff848c42d155eec217ca Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 20 Apr 2022 15:35:21 +0200 Subject: [PATCH] Restore online status in profiles --- indra/newview/llpanelprofile.cpp | 17 +++++++++++++++++ indra/newview/llpanelprofile.h | 2 +- .../xui/en/panel_profile_secondlife.xml | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 045932a52e..6856efa17c 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -844,6 +844,11 @@ BOOL LLPanelProfileSecondLife::postBuild() mSeeOnMapToggle = getChild("allow_to_see_on_map"); mEditObjectsToggle = getChild("allow_edit_my_objects"); + // Undo LL dumb-down junk + mStatusText = getChild("status"); + mStatusText->setVisible(FALSE); + // + mShowInSearchCombo->setCommitCallback([this](LLUICtrl*, void*) { onShowInSearchCallback(); }, nullptr); mGroupList->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { LLPanelProfileSecondLife::openGroupProfile(); }); mGroupList->setReturnCallback([this](LLUICtrl*, const LLSD&) { LLPanelProfileSecondLife::openGroupProfile(); }); @@ -950,6 +955,8 @@ void LLPanelProfileSecondLife::resetData() mSeeOnMapToggle->setToggleState(false); mEditObjectsToggle->setToggleState(false); childSetVisible("permissions_panel", false); + + mStatusText->setVisible(FALSE); // Undo LL dumb-down junk } void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data) @@ -1307,6 +1314,16 @@ void LLPanelProfileSecondLife::updateOnlineStatus() void LLPanelProfileSecondLife::processOnlineStatus(bool online) { + // Undo LL dumb-down junk + mStatusText->setVisible(isGrantedToSeeOnlineStatus()); + + std::string status = getString(online ? "status_online" : "status_offline"); + + mStatusText->setValue(status); + mStatusText->setColor(online ? + LLUIColorTable::instance().getColor("StatusUserOnline") : + LLUIColorTable::instance().getColor("StatusUserOffline")); + // } void LLPanelProfileSecondLife::setLoaded() diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 904215d3a3..0ce6603446 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -178,6 +178,7 @@ private: group_map_t mGroups; void openGroupProfile(); + LLTextBox* mStatusText; // Undo LL dumb-down junk LLGroupList* mGroupList; LLComboBox* mShowInSearchCombo; LLIconCtrl* mSecondLifePic; @@ -189,7 +190,6 @@ private: LLButton* mSeeOnlineToggle; LLButton* mSeeOnMapToggle; LLButton* mEditObjectsToggle; - LLMenuButton* mOverflowButton; // Gear button LLHandle mFloaterPermissionsHandle; diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml index 3eb1038a83..f8d762b41a 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml @@ -9,6 +9,14 @@ follows="all" layout="topleft" > + +Online + + +Offline + Born on: [REG_DATE] @@ -147,6 +155,7 @@ Account: [ACCTTYPE] follows="left|top|right" layout="topleft" translate="false" + icon_positioning="left" use_ellipses="true" /> + +