SL-17084 Remove 'interests' tab

'Legacy interests' are obsolete
meow-7.2.2
Andrey Kleshchev 2022-03-29 10:57:29 +03:00
parent 43fcf86b3b
commit cd61dbe6ee
4 changed files with 0 additions and 457 deletions

View File

@ -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();

View File

@ -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;

View File

@ -50,14 +50,6 @@
filename="panel_profile_web.xml"
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"

View File

@ -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>