Merge viewer-legacy-profiles

master
Ansariel 2019-11-13 17:39:07 +01:00
commit 6786257512
8 changed files with 23 additions and 18 deletions

View File

@ -105,12 +105,14 @@ const U32 KICK_FLAGS_FREEZE = 1 << 0;
const U32 KICK_FLAGS_UNFREEZE = 1 << 1;
std::string getProfileURL(const std::string& agent_name)
std::string getProfileURL(const std::string& agent_name, bool feed_only)
{
// <FS:Ansariel> OpenSim support
//std::string url = "[WEB_PROFILE_URL][AGENT_NAME]";
//std::string url = "[WEB_PROFILE_URL][AGENT_NAME][FEED_ONLY]";
//LLSD subs;
//subs["WEB_PROFILE_URL"] = LLGridManager::getInstance()->getWebProfileURL();
//subs["AGENT_NAME"] = agent_name;
//subs["FEED_ONLY"] = feed_only ? "/?feed_only=true" : "";
std::string url;
LLSD subs;
@ -132,7 +134,8 @@ std::string getProfileURL(const std::string& agent_name)
else
#endif
{
url = "[WEB_PROFILE_URL][AGENT_NAME]";
url = "[WEB_PROFILE_URL][AGENT_NAME][FEED_ONLY]";
subs["FEED_ONLY"] = feed_only ? "/?feed_only=true" : "";
subs["WEB_PROFILE_URL"] = LLGridManager::getInstance()->getWebProfileURL();
}
// </FS:Ansariel>

View File

@ -38,7 +38,7 @@ class LLInventoryPanel;
class LLFloater;
class LLView;
std::string getProfileURL(const std::string& agent_name);
std::string getProfileURL(const std::string& agent_name, bool feed_only = false);
/**
* Friend-related actions (add, remove, offer teleport, etc)

View File

@ -160,7 +160,7 @@ void LLFloaterDisplayName::onCancel()
void LLFloaterDisplayName::onReset()
{
if (LLAvatarNameCache::getInstance()->hasNameLookupURL())
if (LLAvatarNameCache::getInstance()->hasNameLookupURL())
{
LLViewerDisplayName::set("",boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
}
@ -194,7 +194,7 @@ void LLFloaterDisplayName::onSave()
return;
}
if (LLAvatarNameCache::getInstance()->hasNameLookupURL())
if (LLAvatarNameCache::getInstance()->hasNameLookupURL())
{
LLViewerDisplayName::set(display_name_utf8,boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3));
}

View File

@ -1041,16 +1041,13 @@ void LLPanelProfileWeb::apply(LLAvatarData* data)
void LLPanelProfileWeb::updateData()
{
LLUUID avatar_id = getAvatarId();
if (!getIsLoading() && avatar_id.notNull())
if (!getIsLoading() && avatar_id.notNull() && !mURLWebProfile.empty())
{
setIsLoading();
if (!mURLWebProfile.empty())
{
mWebBrowser->setVisible(TRUE);
mPerformanceTimer.start();
mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML);
}
mWebBrowser->setVisible(TRUE);
mPerformanceTimer.start();
mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML);
}
}
@ -1068,17 +1065,14 @@ void LLPanelProfileWeb::onAvatarNameCache(const LLUUID& agent_id, const LLAvatar
LLStringUtil::replaceChar(username, ' ', '.');
}
mURLWebProfile = getProfileURL(username);
mURLWebProfile = getProfileURL(username, true);
if (mURLWebProfile.empty())
{
return;
}
//if the tab was opened before name was resolved, load the panel now
if (getIsLoading())
{
updateData();
}
updateData();
}
void LLPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl)

View File

@ -106,6 +106,7 @@
<button
name="cancel_btn"
label="Cancel"
tool_tip="Discard unsaved changes and close"
bottom_delta="0"
right="-10"
height="20"
@ -117,3 +118,4 @@
/>
</panel>
</floater>

View File

@ -26,6 +26,7 @@
<button
name="new_btn"
label="New..."
tool_tip="Create a new classified at the current location"
enabled="false"
top="25"
left="5"
@ -38,6 +39,7 @@
<button
name="delete_btn"
label="Delete..."
tool_tip="Delete currently selected classified"
enabled="false"
left_pad="5"
height="20"

View File

@ -38,6 +38,7 @@
<button
name="new_btn"
label="New..."
tool_tip="Create a new pick at the current location"
enabled="false"
top_pad="4"
left="5"
@ -50,6 +51,7 @@
<button
name="delete_btn"
label="Delete..."
tool_tip="Delete currently selected pick"
enabled="false"
left_pad="5"
height="20"

View File

@ -153,6 +153,7 @@
<!--mouse_opaque="true"-->
<menu_button
name="copy_btn"
tool_tip="Copy options"
height="16"
right="-2"
top="0"
@ -657,6 +658,7 @@
<check_box
name="show_in_search_checkbox"
label="Show in search"
tool_tip="Let people see you in search results"
enabled="false"
bottom="-30"
left="55"