diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-03-29 10:57:29 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-03-29 10:58:18 +0300 |
commit | cd61dbe6eea8d9a7e4bdb594179bafc24a504146 (patch) | |
tree | 56c9e93149ccaa87c1bffa1f10ba38f1ae3fea5c | |
parent | 43fcf86b3b8863fa6f9eb00d0a18aca0a3d675ff (diff) |
SL-17084 Remove 'interests' tab
'Legacy interests' are obsolete
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 162 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.h | 37 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_profile.xml | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_profile_interests.xml | 250 |
4 files changed, 0 insertions, 457 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index d202f62910..156d2671f4 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -75,7 +75,6 @@ static LLPanelInjector<LLPanelProfileSecondLife> t_panel_profile_secondlife("panel_profile_secondlife"); static LLPanelInjector<LLPanelProfileWeb> t_panel_web("panel_profile_web"); -static LLPanelInjector<LLPanelProfileInterests> t_panel_interests("panel_profile_interests"); static LLPanelInjector<LLPanelProfilePicks> t_panel_picks("panel_profile_picks"); static LLPanelInjector<LLPanelProfileFirstLife> t_panel_firstlife("panel_profile_firstlife"); static LLPanelInjector<LLPanelProfileNotes> t_panel_notes("panel_profile_notes"); @@ -83,7 +82,6 @@ static LLPanelInjector<LLPanelProfile> t_panel_profile("panel_profile") static const std::string PANEL_SECONDLIFE = "panel_profile_secondlife"; static const std::string PANEL_WEB = "panel_profile_web"; -static const std::string PANEL_INTERESTS = "panel_profile_interests"; static const std::string PANEL_PICKS = "panel_profile_picks"; static const std::string PANEL_CLASSIFIEDS = "panel_profile_classifieds"; static const std::string PANEL_FIRSTLIFE = "panel_profile_firstlife"; @@ -1354,162 +1352,6 @@ void LLPanelProfileWeb::updateButtons() LLPanelProfileTab::updateButtons(); } -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -static const S32 WANT_CHECKS = 8; -static const S32 SKILL_CHECKS = 6; - -LLPanelProfileInterests::LLPanelProfileInterests() - : LLPanelProfileTab() -{ -} - -LLPanelProfileInterests::~LLPanelProfileInterests() -{ -} - -void LLPanelProfileInterests::onOpen(const LLSD& key) -{ - LLPanelProfileTab::onOpen(key); - - resetData(); -} - -BOOL LLPanelProfileInterests::postBuild() -{ - mWantToEditor = getChild<LLLineEditor>("want_to_edit"); - mSkillsEditor = getChild<LLLineEditor>("skills_edit"); - mLanguagesEditor = getChild<LLLineEditor>("languages_edit"); - - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - std::string check_name = llformat("chk%d", i); - mWantChecks[i] = getChild<LLCheckBoxCtrl>(check_name); - } - - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - std::string check_name = llformat("schk%d", i); - mSkillChecks[i] = getChild<LLCheckBoxCtrl>(check_name); - } - - return TRUE; -} - - -void LLPanelProfileInterests::processProperties(void* data, EAvatarProcessorType type) -{ - if (APT_INTERESTS_INFO == type) - { - const LLInterestsData* interests_data = static_cast<const LLInterestsData*>(data); - if (interests_data && getAvatarId() == interests_data->avatar_id) - { - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - if (interests_data->want_to_mask & (1<<i)) - { - mWantChecks[i]->setValue(TRUE); - } - else - { - mWantChecks[i]->setValue(FALSE); - } - } - - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - if (interests_data->skills_mask & (1<<i)) - { - mSkillChecks[i]->setValue(TRUE); - } - else - { - mSkillChecks[i]->setValue(FALSE); - } - } - - mWantToEditor->setText(interests_data->want_to_text); - mSkillsEditor->setText(interests_data->skills_text); - mLanguagesEditor->setText(interests_data->languages_text); - - updateButtons(); - } - } -} - -void LLPanelProfileInterests::resetData() -{ - mWantToEditor->setValue(LLStringUtil::null); - mSkillsEditor->setValue(LLStringUtil::null); - mLanguagesEditor->setValue(LLStringUtil::null); - - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - mWantChecks[i]->setValue(FALSE); - } - - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - mSkillChecks[i]->setValue(FALSE); - } -} - -void LLPanelProfileInterests::apply() -{ - if (getIsLoaded() && getSelfProfile()) - { - LLInterestsData interests_data = LLInterestsData(); - - interests_data.want_to_mask = 0; - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - if (mWantChecks[i]->getValue().asBoolean()) - { - interests_data.want_to_mask |= (1 << i); - } - } - - interests_data.skills_mask = 0; - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - if (mSkillChecks[i]->getValue().asBoolean()) - { - interests_data.skills_mask |= (1 << i); - } - } - - interests_data.want_to_text = mWantToEditor->getText(); - interests_data.skills_text = mSkillsEditor->getText(); - interests_data.languages_text = mLanguagesEditor->getText(); - - LLAvatarPropertiesProcessor::getInstance()->sendInterestsInfoUpdate(&interests_data); - } - -} - -void LLPanelProfileInterests::updateButtons() -{ - LLPanelProfileTab::updateButtons(); - - if (getSelfProfile() && !getEmbedded()) - { - mWantToEditor->setEnabled(TRUE); - mSkillsEditor->setEnabled(TRUE); - mLanguagesEditor->setEnabled(TRUE); - - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - mWantChecks[i]->setEnabled(TRUE); - } - - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - mSkillChecks[i]->setEnabled(TRUE); - } - } -} ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -1945,7 +1787,6 @@ void LLPanelProfile::onOpen(const LLSD& key) mTabContainer = getChild<LLTabContainer>("panel_profile_tabs"); mPanelSecondlife = findChild<LLPanelProfileSecondLife>(PANEL_SECONDLIFE); mPanelWeb = findChild<LLPanelProfileWeb>(PANEL_WEB); - mPanelInterests = findChild<LLPanelProfileInterests>(PANEL_INTERESTS); mPanelPicks = findChild<LLPanelProfilePicks>(PANEL_PICKS); mPanelClassifieds = findChild<LLPanelProfileClassifieds>(PANEL_CLASSIFIEDS); mPanelFirstlife = findChild<LLPanelProfileFirstLife>(PANEL_FIRSTLIFE); @@ -1953,7 +1794,6 @@ void LLPanelProfile::onOpen(const LLSD& key) mPanelSecondlife->onOpen(avatar_id); mPanelWeb->onOpen(avatar_id); - mPanelInterests->onOpen(avatar_id); mPanelPicks->onOpen(avatar_id); mPanelClassifieds->onOpen(avatar_id); mPanelFirstlife->onOpen(avatar_id); @@ -1961,7 +1801,6 @@ void LLPanelProfile::onOpen(const LLSD& key) mPanelSecondlife->setEmbedded(getEmbedded()); mPanelWeb->setEmbedded(getEmbedded()); - mPanelInterests->setEmbedded(getEmbedded()); mPanelPicks->setEmbedded(getEmbedded()); mPanelClassifieds->setEmbedded(getEmbedded()); mPanelFirstlife->setEmbedded(getEmbedded()); @@ -2006,7 +1845,6 @@ void LLPanelProfile::apply() mPanelWeb->apply(&mAvatarData); mPanelSecondlife->apply(&mAvatarData); - mPanelInterests->apply(); mPanelPicks->apply(); mPanelNotes->apply(); mPanelClassifieds->apply(); diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index beec2f91c8..e87de9f96f 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -40,7 +40,6 @@ // class LLPanelProfileSecondLife; // class LLPanelProfileWeb; -// class LLPanelProfileInterests; // class LLPanelProfilePicks; // class LLPanelProfileFirstLife; // class LLPanelProfileNotes; @@ -264,41 +263,6 @@ private: }; /** -* Panel for displaying Avatar's interests. -*/ -class LLPanelProfileInterests - : public LLPanelProfileTab -{ -public: - LLPanelProfileInterests(); - /*virtual*/ ~LLPanelProfileInterests(); - - /*virtual*/ void onOpen(const LLSD& key); - - /*virtual*/ BOOL postBuild(); - - /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); - - void resetData(); - - /** - * Saves changes. - */ - virtual void apply(); - -protected: - /*virtual*/ void updateButtons(); - -private: - LLCheckBoxCtrl* mWantChecks[8]; - LLCheckBoxCtrl* mSkillChecks[6]; - LLLineEditor* mWantToEditor; - LLLineEditor* mSkillsEditor; - LLLineEditor* mLanguagesEditor; -}; - - -/** * Panel for displaying Avatar's first life related info. */ class LLPanelProfileFirstLife @@ -436,7 +400,6 @@ private: LLPanelProfileSecondLife* mPanelSecondlife; LLPanelProfileWeb* mPanelWeb; - LLPanelProfileInterests* mPanelInterests; LLPanelProfilePicks* mPanelPicks; LLPanelProfileClassifieds* mPanelClassifieds; LLPanelProfileFirstLife* mPanelFirstlife; diff --git a/indra/newview/skins/default/xui/en/floater_profile.xml b/indra/newview/skins/default/xui/en/floater_profile.xml index 1b56f65cc0..dede8bc0a6 100644 --- a/indra/newview/skins/default/xui/en/floater_profile.xml +++ b/indra/newview/skins/default/xui/en/floater_profile.xml @@ -51,14 +51,6 @@ help_topic="profile_web_tab" /> <panel - name="panel_profile_interests" - label="Interests" - layout="topleft" - class="panel_profile_interests" - filename="panel_profile_interests.xml" - help_topic="profile_interests_tab" - /> - <panel name="panel_profile_picks" label="Picks" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_profile_interests.xml b/indra/newview/skins/default/xui/en/panel_profile_interests.xml deleted file mode 100644 index 0359b0bc4b..0000000000 --- a/indra/newview/skins/default/xui/en/panel_profile_interests.xml +++ /dev/null @@ -1,250 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - name="panel_profile_interests" - label="Interests" - top="0" - left="0" - height="480" - width="420" - follows="all" - layout="topleft" -> - <loading_indicator - name="progress_indicator" - top="5" - right="-10" - height="23" - width="23" - follows="top|right" - layout="topleft" - visible="false" - /> - <text - name="I Want To:" - top="10" - left="4" - height="16" - width="70" - follows="left|top" - layout="topleft" - halign="right" - > - I Want To: - </text> - <check_box - name="chk0" - label="Build" - enabled="false" - top_delta="0" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk1" - label="Explore" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk2" - label="Meet" - enabled="false" - top_pad="5" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk6" - label="Be Hired" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk3" - label="Group" - enabled="false" - top_pad="5" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk4" - label="Buy" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk5" - label="Sell" - enabled="false" - top_pad="5" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="chk7" - label="Hire" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <line_editor - name="want_to_edit" - enabled="false" - top_pad="10" - left="76" - height="18" - width="330" - follows="left|top|right" - layout="topleft" - text_pad_left="4" - max_length_bytes="254" - > - (loading...) - </line_editor> - - <text - name="Skills:" - top_pad="20" - left="4" - height="16" - width="70" - follows="left|top" - layout="topleft" - halign="right" - > - Skills: - </text> - <check_box - name="schk0" - label="Textures" - enabled="false" - top_delta="0" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="schk1" - label="Architecture" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <!-- The next two are out of order on purpose due to legacy ordering --> - <check_box - name="schk3" - label="Modeling" - enabled="false" - top_pad="5" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="schk2" - label="Event Planning" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="schk4" - label="Scripting" - enabled="false" - top_pad="5" - left="75" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <check_box - name="schk5" - label="Custom Characters" - enabled="false" - left_pad="80" - height="16" - width="90" - follows="left|top" - layout="topleft" - /> - <line_editor - name="skills_edit" - enabled="false" - top_pad="10" - left="76" - height="18" - width="330" - follows="left|top|right" - layout="topleft" - text_pad_left="4" - max_length_bytes="254" - > - (loading...) - </line_editor> - - <text - name="Languages:" - top_pad="20" - left="4" - height="16" - width="70" - follows="left|top" - layout="topleft" - halign="right" - > - Languages: - </text> - <line_editor - name="languages_edit" - enabled="false" - top_delta="-1" - left="76" - height="18" - width="330" - follows="left|top|right" - layout="topleft" - text_pad_left="4" - max_length_bytes="254" - > - (loading...) - </line_editor> -</panel> |