From cd61dbe6eea8d9a7e4bdb594179bafc24a504146 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Mar 2022 10:57:29 +0300 Subject: SL-17084 Remove 'interests' tab 'Legacy interests' are obsolete --- indra/newview/llpanelprofile.cpp | 162 ------------- indra/newview/llpanelprofile.h | 37 --- .../skins/default/xui/en/floater_profile.xml | 8 - .../default/xui/en/panel_profile_interests.xml | 250 --------------------- 4 files changed, 457 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en/panel_profile_interests.xml (limited to 'indra/newview') 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 t_panel_profile_secondlife("panel_profile_secondlife"); static LLPanelInjector t_panel_web("panel_profile_web"); -static LLPanelInjector t_panel_interests("panel_profile_interests"); static LLPanelInjector t_panel_picks("panel_profile_picks"); static LLPanelInjector t_panel_firstlife("panel_profile_firstlife"); static LLPanelInjector t_panel_notes("panel_profile_notes"); @@ -83,7 +82,6 @@ static LLPanelInjector 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("want_to_edit"); - mSkillsEditor = getChild("skills_edit"); - mLanguagesEditor = getChild("languages_edit"); - - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - std::string check_name = llformat("chk%d", i); - mWantChecks[i] = getChild(check_name); - } - - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - std::string check_name = llformat("schk%d", i); - mSkillChecks[i] = getChild(check_name); - } - - return TRUE; -} - - -void LLPanelProfileInterests::processProperties(void* data, EAvatarProcessorType type) -{ - if (APT_INTERESTS_INFO == type) - { - const LLInterestsData* interests_data = static_cast(data); - if (interests_data && getAvatarId() == interests_data->avatar_id) - { - for (S32 i = 0; i < WANT_CHECKS; ++i) - { - if (interests_data->want_to_mask & (1<setValue(TRUE); - } - else - { - mWantChecks[i]->setValue(FALSE); - } - } - - for (S32 i = 0; i < SKILL_CHECKS; ++i) - { - if (interests_data->skills_mask & (1<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("panel_profile_tabs"); mPanelSecondlife = findChild(PANEL_SECONDLIFE); mPanelWeb = findChild(PANEL_WEB); - mPanelInterests = findChild(PANEL_INTERESTS); mPanelPicks = findChild(PANEL_PICKS); mPanelClassifieds = findChild(PANEL_CLASSIFIEDS); mPanelFirstlife = findChild(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; @@ -263,41 +262,6 @@ private: boost::signals2::connection mAvatarNameCacheConnection; }; -/** -* 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. */ @@ -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 @@ -50,14 +50,6 @@ filename="panel_profile_web.xml" help_topic="profile_web_tab" /> - - - - - I Want To: - - - - - - - - - - - (loading...) - - - - Skills: - - - - - - - - - - (loading...) - - - - Languages: - - - (loading...) - - -- cgit v1.2.3