# Conflicts:
#	indra/newview/skins/default/textures/textures.xml
#	indra/newview/skins/default/xui/en/panel_profile_classifieds.xml
#	indra/newview/skins/default/xui/en/panel_profile_picks.xml
#	indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
master
Ansariel 2022-05-13 10:46:20 +02:00
commit c6568e81a4
17 changed files with 410 additions and 188 deletions

View File

@ -74,10 +74,10 @@ public:
void decrementNumberOfPicks() { --mNumberOfPicks; }
private:
void onServerRespond(LLAvatarPicks* picks);
private:
/**
* Sets number of Picks.
*/

View File

@ -421,6 +421,8 @@ LLGroupListItem::LLGroupListItem(bool for_agent, bool show_icons)
mGroupIcon(NULL),
mGroupNameBox(NULL),
mInfoBtn(NULL),
mProfileBtn(NULL),
mVisibilityBtn(NULL),
mGroupID(LLUUID::null),
mForAgent(for_agent)
{
@ -455,7 +457,11 @@ BOOL LLGroupListItem::postBuild()
mInfoBtn = getChild<LLButton>("info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLGroupListItem::onInfoBtnClick, this));
childSetAction("profile_btn", boost::bind(&LLGroupListItem::onProfileBtnClick, this));
mProfileBtn = getChild<LLButton>("profile_btn");
mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); });
mVisibilityBtn = getChild<LLButton>("visibility_btn");
mVisibilityBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onVisibilityBtnClick(); });
return TRUE;
}
@ -474,7 +480,11 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask)
if (mGroupID.notNull()) // don't show the info button for the "none" group
{
mInfoBtn->setVisible(true);
getChildView("profile_btn")->setVisible( true);
mProfileBtn->setVisible(true);
if (mForAgent)
{
mVisibilityBtn->setVisible(true);
}
}
LLPanel::onMouseEnter(x, y, mask);
@ -484,7 +494,8 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
getChildView("hovered_icon")->setVisible( false);
mInfoBtn->setVisible(false);
getChildView("profile_btn")->setVisible( false);
mVisibilityBtn->setVisible(false);
mProfileBtn->setVisible(false);
LLPanel::onMouseLeave(x, y, mask);
}
@ -574,6 +585,17 @@ void LLGroupListItem::onProfileBtnClick()
LLGroupActions::show(mGroupID);
}
void LLGroupListItem::onVisibilityBtnClick()
{
LLGroupData agent_gdatap;
if (gAgent.getGroupData(mGroupID, agent_gdatap))
{
bool new_visibility = !agent_gdatap.mListInProfile;
gAgent.setUserGroupFlags(mGroupID, agent_gdatap.mAcceptNotices, new_visibility);
setVisibleInProfile(new_visibility);
}
}
void LLGroupListItem::changed(LLGroupChange gc)
{
LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID);

View File

@ -123,11 +123,14 @@ private:
void setBold(bool bold);
void onInfoBtnClick();
void onProfileBtnClick();
void onVisibilityBtnClick();
LLTextBox* mGroupNameBox;
LLUUID mGroupID;
LLGroupIconCtrl* mGroupIcon;
LLButton* mInfoBtn;
LLButton* mInfoBtn;
LLButton* mProfileBtn;
LLButton* mVisibilityBtn;
std::string mGroupName;
bool mForAgent;

View File

@ -119,6 +119,12 @@ void LLPanelProfileTab::setApplyProgress(bool started)
indicator->stop();
}
}
LLPanel* panel = findChild<LLPanel>("indicator_stack");
if (panel)
{
panel->setVisible(started);
}
}
LLPanelProfilePropertiesProcessorTab::LLPanelProfilePropertiesProcessorTab()

View File

@ -219,6 +219,8 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
LLPanelProfilePicks *panel_picks = dynamic_cast<LLPanelProfilePicks*>(panel);
if (panel_picks)
{
// Refresh pick limit before processing
LLAgentPicksInfo::getInstance()->onServerRespond(&avatar_picks);
panel_picks->processProperties(&avatar_picks);
}
@ -839,7 +841,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
mGroupList = getChild<LLGroupList>("group_list");
mShowInSearchCombo = getChild<LLComboBox>("show_in_search");
mSecondLifePic = getChild<LLIconCtrl>("2nd_life_pic");
mSecondLifePicLayout = getChild<LLPanel>("image_stack");
mSecondLifePicLayout = getChild<LLPanel>("image_panel");
mDescriptionEdit = getChild<LLTextEditor>("sl_description_edit");
mNotesSnippet = getChild<LLTextEditor>("notes_snippet");
mAgentActionMenuButton = getChild<LLMenuButton>("agent_actions_menu");
@ -1018,6 +1020,11 @@ void LLPanelProfileSecondLife::onAvatarNameCache(const LLUUID& agent_id, const L
getChild<LLUICtrl>("user_name")->setValue(av_name.getAccountName());
}
void LLPanelProfileSecondLife::setNotesSnippet(std::string &notes)
{
mNotesSnippet->setValue(notes);
}
void LLPanelProfileSecondLife::setProfileImageUploading(bool loading)
{
LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("image_upload_indicator");
@ -1111,6 +1118,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data)
LLTextBox* partner_text_ctrl = getChild<LLTextBox>("partner_link");
if (avatar_data->partner_id.notNull())
{
childSetVisible("partner_layout", TRUE);
LLStringUtil::format_map_t args;
args["[LINK]"] = LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString();
std::string partner_text = getString("partner_text", args);
@ -1118,7 +1126,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data)
}
else
{
partner_text_ctrl->setText(getString("no_partner_text"));
childSetVisible("partner_layout", FALSE);
}
}
@ -1442,7 +1450,7 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata)
{
LLAvatarActions::startCall(agent_id);
}
else if (item_name == "callog")
else if (item_name == "chat_history")
{
LLAvatarActions::viewChatHistory(agent_id);
}
@ -1552,7 +1560,7 @@ bool LLPanelProfileSecondLife::onEnableMenu(const LLSD& userdata)
{
return mVoiceStatus;
}
else if (item_name == "callog")
else if (item_name == "chat_history")
{
return LLLogChat::isTranscriptExist(agent_id);
}
@ -1893,6 +1901,12 @@ void LLPanelProfileFirstLife::onOpen(const LLSD& key)
{
LLPanelProfileTab::onOpen(key);
if (!getSelfProfile())
{
// Otherwise as the only focusable element it will be selected
mDescriptionEdit->setTabStop(FALSE);
}
resetData();
}
@ -2066,24 +2080,6 @@ void LLPanelProfileNotes::onOpen(const LLSD& key)
resetData();
}
void LLPanelProfileNotes::onCommitNotes()
{
std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP);
if (getIsLoaded())
{
if (!cap_url.empty())
{
std::string notes = mNotesEditor->getValue().asString();
LLCoros::instance().launch("putAgentUserInfoCoro",
boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", notes)));
}
else
{
LL_WARNS() << "Failed to update notes, no cap found" << LL_ENDL;
}
}
}
void LLPanelProfileNotes::setNotesText(const std::string &text)
{
mSaveChanges->setEnabled(FALSE);
@ -2106,6 +2102,20 @@ void LLPanelProfileNotes::onSaveNotesChanges()
{
LLCoros::instance().launch("putAgentUserInfoCoro",
boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", mCurrentNotes)));
LLFloater* floater_profile = LLFloaterReg::findInstance("profile", LLSD().with("id", getAvatarId()));
if (!floater_profile)
{
return;
}
LLPanel* panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel);
if (panel_sl)
{
panel_sl->setNotesSnippet(mCurrentNotes);
}
}
else
{

View File

@ -100,6 +100,7 @@ public:
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
void setNotesSnippet(std::string &notes);
void setProfileImageUploading(bool loading);
void setProfileImageUploaded(const LLUUID &image_asset_id);
@ -316,7 +317,6 @@ public:
/*virtual*/ void updateData();
protected:
void onCommitNotes();
void setNotesText(const std::string &text);
void onSetNotesDirty();
void onSaveNotesChanges();

View File

@ -216,7 +216,8 @@ void LLPanelProfileClassifieds::onOpen(const LLSD& key)
resetData();
if (getSelfProfile())
bool own_profile = getSelfProfile();
if (own_profile)
{
mNewButton->setVisible(TRUE);
mNewButton->setEnabled(FALSE);
@ -224,6 +225,9 @@ void LLPanelProfileClassifieds::onOpen(const LLSD& key)
mDeleteButton->setVisible(TRUE);
mDeleteButton->setEnabled(FALSE);
}
childSetVisible("buttons_header", own_profile);
}
void LLPanelProfileClassifieds::selectClassified(const LLUUID& classified_id, bool edit)

View File

@ -144,7 +144,8 @@ void LLPanelProfilePicks::onOpen(const LLSD& key)
resetData();
if (getSelfProfile())
bool own_profile = getSelfProfile();
if (own_profile)
{
mNewButton->setVisible(TRUE);
mNewButton->setEnabled(FALSE);
@ -152,6 +153,8 @@ void LLPanelProfilePicks::onOpen(const LLSD& key)
mDeleteButton->setVisible(TRUE);
mDeleteButton->setEnabled(FALSE);
}
childSetVisible("buttons_header", own_profile);
}
void LLPanelProfilePicks::selectPick(const LLUUID& pick_id)

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

View File

@ -601,6 +601,9 @@ with the same filename but different name
<texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" />
<texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" />
<texture name="Profile_Search_Visibility_Dark" file_name="icons/Profile_Search_Visibility_Dark.png" preload="true"/>
<texture name="Profile_Search_Visibility_Light" file_name="icons/Profile_Search_Visibility_Light.png" preload="true"/>
<texture name="Music_Off" file_name="icons/Music_Off.png" preload="true" />
<texture name="Music_Over" file_name="icons/Music_Over.png" preload="true" />
<texture name="Music_Press" file_name="icons/Music_Press.png" preload="true" />

View File

@ -23,7 +23,7 @@
use_ellipses="true"
width="380"
wrap="true">
The name you give your avatar is called your Display Name. You can change it once a week.
Your display name is what other people see above your head. It is different from your login name. You can change it once a week.
</text>
<text
type="string"

View File

@ -53,12 +53,26 @@
text_color="ScrollUnselectedColor"
use_ellipses="true"
/>
<button
name="visibility_btn"
tool_tip="Toogle visibility in profile"
top_delta="-1"
left_pad="3"
right="-53"
height="14"
width="20"
follows="right"
image_pressed="Profile_Search_Visibility_Dark"
image_unselected="Profile_Search_Visibility_Light"
tab_stop="false"
visible="false"
/>
<button
name="info_btn"
tool_tip="More info"
top_delta="-2"
top_delta="-1"
left_pad="3"
right="-31"
right="-30"
height="16"
width="16"
follows="right"

View File

@ -13,66 +13,130 @@
name="no_classifieds"
value="No Classifieds"
/>
<loading_indicator
name="progress_indicator"
top="20"
right="-10"
height="23"
width="23"
follows="top|right"
layout="topleft"
visible="false"
/>
<button
name="new_btn"
label="New..."
tool_tip="Create a new classified at the current location"
enabled="false"
top="25"
left="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="false"
/>
<button
name="delete_btn"
label="Delete..."
tool_tip="Delete currently selected classified"
enabled="false"
left_pad="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="false"
/>
<tab_container
name="tab_classifieds"
top="50"
bottom="-21"
left="4"
right="-4"
<layout_stack
name="main_stack"
top="0"
left="0"
right="-1"
bottom="-1"
follows="all"
layout="topleft"
animate="false"
orientation="vertical">
<layout_panel
name="buttons_header"
follows="all"
layout="topleft"
halign="left"
tab_position="left"
tab_width="85"
use_ellipses="true"
/>
<text
name="classifieds_panel_text"
top="60"
left="20"
width="300"
height="200"
height="50"
auto_resize="false"
user_resize="false">
<button
name="new_btn"
label="New..."
tool_tip="Create a new classified at the current location"
enabled="false"
top="25"
left="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="true"
/>
<button
name="delete_btn"
label="Delete..."
tool_tip="Delete currently selected classified"
enabled="false"
left_pad="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="true"
/>
</layout_panel>
<layout_panel
name="main_body"
follows="all"
layout="topleft"
halign="left"
mouse_opaque="false"
wrap="true"
>
Loading...
</text>
height="430"
auto_resize="true"
user_resize="false">
<tab_container
name="tab_classifieds"
top="0"
bottom="-21"
left="4"
right="-4"
follows="all"
layout="topleft"
halign="left"
tab_position="left"
tab_width="85"
use_ellipses="true"
/>
<layout_stack
name="indicator_stack"
top="220"
left="0"
right="-1"
height="28"
follows="top|left|right"
layout="topleft"
animate="false"
orientation="horizontal">
<layout_panel
name="indicator_spacer_left"
follows="all"
layout="topleft"
width="100"
auto_resize="true"
user_resize="false">
</layout_panel>
<layout_panel
name="buttons_header"
follows="all"
layout="topleft"
width="25"
auto_resize="false"
user_resize="false">
<loading_indicator
name="progress_indicator"
top="1"
left="1"
height="23"
width="23"
follows="top|left"
layout="topleft"
visible="false"
/>
</layout_panel>
<layout_panel
name="indicator_spacer_right"
follows="all"
layout="topleft"
width="100"
auto_resize="true"
user_resize="false">
</layout_panel>
</layout_stack>
<text
name="classifieds_panel_text"
top="250"
left="110"
right="-110"
height="25"
follows="left|top|right"
layout="topleft"
halign="center"
mouse_opaque="false"
wrap="true"
>
Loading...
</text>
</layout_panel>
</layout_stack>
</panel>

View File

@ -13,78 +13,142 @@
name="no_picks"
value="No Picks"
/>
<loading_indicator
name="progress_indicator"
top="20"
right="-10"
height="23"
width="23"
follows="top|right"
layout="topleft"
visible="false"
/>
<text
name="Tell everyone about your favorite places in Second Life."
top="5"
left="5"
right="-5"
height="16"
follows="left|top|right"
layout="topleft"
halign="center"
>
Tell everyone about your favorite places in [GRID].
</text>
<button
name="new_btn"
label="New..."
tool_tip="Create a new pick at the current location"
enabled="false"
top_pad="4"
left="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="false"
/>
<button
name="delete_btn"
label="Delete..."
tool_tip="Delete currently selected pick"
enabled="false"
left_pad="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="false"
/>
<tab_container
name="tab_picks"
top="50"
bottom="-5"
left="4"
right="-4"
tab_width="150"
<layout_stack
name="main_stack"
top="0"
left="0"
right="-1"
bottom="-1"
follows="all"
layout="topleft"
animate="false"
orientation="vertical">
<layout_panel
name="buttons_header"
follows="all"
layout="topleft"
halign="left"
tab_position="left"
use_ellipses="true"
height="50"
auto_resize="false"
user_resize="false">
<text
name="header_text"
top="5"
left="5"
right="-5"
height="16"
follows="left|top|right"
layout="topleft"
halign="center"
>
Tell everyone about your favorite places in [GRID].
</text>
<button
name="new_btn"
label="New..."
tool_tip="Create a new pick at the current location"
enabled="false"
top_pad="4"
left="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="false"
/>
<text
name="picks_panel_text"
top="55"
left="20"
right="-20"
height="100"
follows="left|top|right"
<button
name="delete_btn"
label="Delete..."
tool_tip="Delete currently selected pick"
enabled="false"
left_pad="5"
height="20"
width="70"
follows="left|top"
layout="topleft"
visible="false"
/>
</layout_panel>
<layout_panel
name="main_body"
follows="all"
layout="topleft"
halign="left"
mouse_opaque="false"
wrap="true"
height="430"
auto_resize="true"
user_resize="false">
<tab_container
name="tab_picks"
top="0"
bottom="-5"
left="4"
right="-4"
tab_width="150"
follows="all"
layout="topleft"
halign="left"
tab_position="left"
use_ellipses="true"
/>
<layout_stack
name="indicator_stack"
top="220"
left="0"
right="-1"
height="28"
follows="top|left|right"
layout="topleft"
animate="false"
orientation="horizontal">
<layout_panel
name="indicator_spacer_left"
follows="all"
layout="topleft"
width="100"
auto_resize="true"
user_resize="false">
</layout_panel>
<layout_panel
name="buttons_header"
follows="all"
layout="topleft"
width="25"
auto_resize="false"
user_resize="false">
<loading_indicator
name="progress_indicator"
top="1"
left="1"
height="23"
width="23"
follows="top|left"
layout="topleft"
visible="false"
/>
</layout_panel>
<layout_panel
name="indicator_spacer_right"
follows="all"
layout="topleft"
width="100"
auto_resize="true"
user_resize="false">
</layout_panel>
</layout_stack>
<text
name="picks_panel_text"
top="250"
left="100"
right="-100"
height="25"
follows="left|top|right"
layout="topleft"
halign="center"
mouse_opaque="false"
wrap="true"
>
Loading...
</text>
</text>
</layout_panel>
</layout_stack>
</panel>

View File

@ -22,9 +22,6 @@ Offline
Born on: [REG_DATE]
([AGE])
</string>
<string
name="no_partner_text"
value="Partner: None" />
<string
name="partner_text"
value="Partner: [LINK]" />
@ -118,7 +115,7 @@ Account: [ACCTTYPE]
value="(loading...)"
font="SansSerifBigLarge"
top="0"
left="2"
left="10"
right="-1"
height="20"
follows="left|top|right"
@ -128,7 +125,7 @@ Account: [ACCTTYPE]
name="user_name"
value="(loading...)"
top_pad="0"
left="2"
left_delta="0"
right="-1"
height="16"
follows="left|top|right"
@ -147,35 +144,65 @@ Account: [ACCTTYPE]
name="user_age"
value="(loading...)"
top_pad="0"
left="2"
left_delta="0"
right="-1"
height="30"
follows="left|top|right"
layout="topleft"/>
<text
type="string"
name="partner_link"
value="Partner: (loading...)"
<layout_stack
name="partner_stack"
top_pad="0"
left="2"
left_delta="0"
right="-1"
height="16"
height="64"
follows="left|top|right"
layout="topleft"
translate="false"
icon_positioning="left"
use_ellipses="true" />
animate="false"
orientation="vertical">
<layout_panel
name="partner_layout"
follows="all"
layout="topleft"
height="16"
auto_resize="false"
user_resize="false"
visible="false">
<text
type="string"
name="partner_link"
value="Partner: (loading...)"
top="0"
left="0"
right="-1"
height="16"
follows="left|top|right"
layout="topleft"
translate="false"
icon_positioning="left
use_ellipses="true"
visible="true"/>
</layout_panel>
<layout_panel
name="account_layout"
follows="all"
layout="topleft"
height="48"
auto_resize="false"
user_resize="false">
<text
name="account_info"
value="Account: (loading...)"
top="15"
left="0"
right="-1"
height="45"
follows="left|top|right"
layout="topleft"/>
</layout_panel>
</layout_stack>
<text
name="account_info"
value="Account: (loading...)"
top_pad="0"
left="2"
right="-1"
height="45"
follows="left|top|right"
layout="topleft"/>
<loading_indicator
name="progress_indicator"
@ -190,7 +217,7 @@ Account: [ACCTTYPE]
<menu_button
layout="topleft"
follows="left|bottom"
left="2"
left="10"
bottom="-1"
height="25"
width="140"
@ -416,7 +443,9 @@ Account: [ACCTTYPE]
h_pad="2"
max_length="1000"
parse_urls="true"
word_wrap="true"/>
word_wrap="true"
use_ellipses="true"
allow_scroll="false"/>
</layout_panel>
<layout_panel

View File

@ -1302,8 +1302,8 @@ If you continue to receive this message, please contact Second Life support for
<string name="NoPicksText">You haven't created any Picks. Click the New button to create a Pick.</string>
<string name="NoClassifiedsText">You haven't created any Classifieds. Click the New button to create a Classified.</string>
<string name="NoAvatarPicksClassifiedsText">User has no picks or classifieds</string>
<string name="NoAvatarPicksText">User has no picks</string>
<string name="NoAvatarClassifiedsText">User has no classifieds</string>
<string name="NoAvatarPicksText">This person has no picks</string>
<string name="NoAvatarClassifiedsText">This person has no classifieds</string>
<string name="PicksClassifiedsLoadingText">Loading...</string>
<!-- FS:KC legacy profiles -->
<string name="NoPicksText">You haven't created any Picks.</string>