master
Ansariel 2022-08-10 19:09:12 +02:00
commit c5c8a70cc4
9 changed files with 95 additions and 17 deletions

View File

@ -137,6 +137,20 @@ bool LLFloaterProfile::isPickTabSelected()
return mPanelProfile->isPickTabSelected();
}
void LLFloaterProfile::refreshName()
{
if (!mNameCallbackConnection.connected())
{
mNameCallbackConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLFloaterProfile::onAvatarNameCache, this, _1, _2));
}
LLPanelProfileSecondLife *panel = findChild<LLPanelProfileSecondLife>("panel_profile_secondlife");
if (panel)
{
panel->refreshName();
}
}
void LLFloaterProfile::showClassified(const LLUUID& classified_id, bool edit)
{
mPanelProfile->showClassified(classified_id, edit);

View File

@ -49,6 +49,7 @@ public:
void createPick(const LLPickData &data);
void showPick(const LLUUID& pick_id = LLUUID::null);
bool isPickTabSelected();
void refreshName();
void showClassified(const LLUUID& classified_id = LLUUID::null, bool edit = false);

View File

@ -1059,6 +1059,14 @@ void LLPanelProfileSecondLife::updateData()
}
}
void LLPanelProfileSecondLife::refreshName()
{
if (!mAvatarNameCacheConnection.connected())
{
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCache, this, _1, _2));
}
}
void LLPanelProfileSecondLife::resetData()
{
resetLoading();
@ -2928,6 +2936,11 @@ void LLPanelProfile::updateData()
}
}
void LLPanelProfile::refreshName()
{
mPanelSecondlife->refreshName();
}
void LLPanelProfile::createPick(const LLPickData &data)
{
mTabContainer->selectTabPanel(mPanelPicks);

View File

@ -97,6 +97,7 @@ public:
* Sends update data request to server.
*/
void updateData() override;
void refreshName();
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
@ -395,6 +396,7 @@ public:
BOOL postBuild() override;
void updateData() override;
void refreshName();
void onOpen(const LLSD& key) override;

View File

@ -492,7 +492,6 @@ LLPanelProfilePick::LLPanelProfilePick()
, mRequestedId(LLUUID::null)
, mLocationChanged(false)
, mNewPick(false)
, mCurrentPickDescription("")
, mIsEditing(false)
{
}
@ -612,7 +611,6 @@ void LLPanelProfilePick::onDescriptionFocusReceived()
{
mIsEditing = true;
mPickDescription->setParseHTML(false);
setPickDesc(mCurrentPickDescription);
}
}
@ -647,7 +645,6 @@ void LLPanelProfilePick::processProperties(const LLPickData* pick_info)
setPickName(pick_info->name);
setPickDesc(pick_info->desc);
setPosGlobal(pick_info->pos_global);
mCurrentPickDescription = pick_info->desc;
// Send remote parcel info request to get parcel name and sim (region) name.
sendParcelInfoRequest();

View File

@ -249,8 +249,6 @@ protected:
bool mNewPick;
bool mIsEditing;
std::string mCurrentPickDescription;
void onDescriptionFocusReceived();
};

View File

@ -32,6 +32,8 @@
#include "fsradar.h"
#include "lggcontactsets.h"
#include "llagent.h"
#include "llfloaterprofile.h"
#include "llfloaterreg.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
#include "llvoavatar.h"
@ -223,12 +225,14 @@ class LLDisplayNameUpdate : public LLHTTPNode
}
else
{
FSRadar* radar = FSRadar::getInstance();
if (radar)
{
radar->updateName(agent_id);
}
FSRadar::getInstance()->updateName(agent_id);
}
LLFloaterProfile* profile_floater = dynamic_cast<LLFloaterProfile*>(LLFloaterReg::findInstance("profile", LLSD().with("id", agent_id)));
if (profile_floater)
{
profile_floater->refreshName();
}
}
};

View File

@ -119,10 +119,10 @@
tool_tip="Click to select an image"
top="0"
left="0"
height="197"
width="272"
height="161"
width="260"
layout="topleft"
follows="left|top|right"
follows="left|top"
image_name="spacer24.tga"
visible="false"
/>
@ -449,7 +449,7 @@
</layout_stack>
<panel
name="edit_panel"
top="180"
top="145"
left="0"
height="420"
width="320"

View File

@ -42,24 +42,56 @@
layout="topleft"
fallback_image="default_land_picture.j2c"
/>
<text
name="title_label"
top_pad="-15"
left="10"
height="15"
width="280"
follows="left|top"
layout="topleft"
font="SansSerifSmall"
font.style="BOLD"
length="1"
text_color="white"
type="string"
>
Title:
</text>
<line_editor
name="pick_name"
enabled="false"
top_pad="-15"
top_pad="2"
left="10"
height="20"
width="290"
follows="left|right|top"
layout="topleft"
/>
<text
name="description_label"
top_pad="10"
left="10"
height="15"
width="280"
follows="left|top"
layout="topleft"
font="SansSerifSmall"
font.style="BOLD"
length="1"
text_color="white"
type="string"
>
Description:
</text>
<text_editor
name="pick_desc"
trusted_content="false"
always_show_icons="true"
enabled="false"
top_pad="8"
top_pad="2"
left="10"
height="102"
height="45"
width="290"
follows="all"
layout="topleft"
@ -70,9 +102,26 @@
v_pad="3"
word_wrap="true"
/>
<text
name="location_label"
bottom="-25"
left="10"
height="15"
width="280"
follows="left|right|bottom"
layout="topleft"
font="SansSerifSmall"
font.style="BOLD"
length="1"
text_color="white"
type="string"
>
Location:
</text>
<line_editor
name="pick_location"
enabled="false"
bottom="-1"
left="10"
height="23"
width="290"