Skip to content

Commit

Permalink
Merge pull request #175 from cinderblocks/feature/Heretic_Refresh
Browse files Browse the repository at this point in the history
Feature/heretic refresh
  • Loading branch information
RyeMutt authored Jan 4, 2025
2 parents f74068a + 3e3a6ef commit f356367
Show file tree
Hide file tree
Showing 168 changed files with 1,951 additions and 1,272 deletions.
10 changes: 4 additions & 6 deletions indra/newview/llavatarpropertiesprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
#include "llavataractions.h" // for getProfileUrl
#include "lldate.h"
#include "lltrans.h"
#include "llui.h" // LLUI::getLanguage()
#include "message.h"
#include "llappviewer.h"

LLAvatarPropertiesProcessor::LLAvatarPropertiesProcessor()
{
Expand Down Expand Up @@ -119,7 +117,7 @@ void LLAvatarPropertiesProcessor::sendRequest(const LLUUID& avatar_id, EAvatarPr
// Try to send HTTP request if cap_url is available
if (type == APT_PROPERTIES)
{
std::string cap_url = gAgent.getRegionCapability("AgentProfile");
const std::string& cap_url = gAgent.getRegionCapability("AgentProfile");
if (!cap_url.empty())
{
initAgentProfileCapRequest(avatar_id, cap_url, type);
Expand Down Expand Up @@ -148,7 +146,7 @@ void LLAvatarPropertiesProcessor::sendGenericRequest(const LLUUID& avatar_id, EA
// indicate we're going to make a request
addPendingRequest(avatar_id, type);

std::vector<std::string> strings{ avatar_id.asString() };
const std::vector<std::string> strings{ avatar_id.asString() };
send_generic_message(method, strings);
}

Expand Down Expand Up @@ -328,7 +326,7 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
// TODO: SL-20163 Remove the "has" check when SRV-684 is done
// and the field "hide_age" is included to the http response
inst.mIsHideAgeSupportedByServer = result.has("hide_age");
avatar_data.hide_age = !inst.isHideAgeSupportedByServer() || result["hide_age"].asBoolean();
avatar_data.hide_age = inst.isHideAgeSupportedByServer() && result["hide_age"].asBoolean();
avatar_data.profile_url = getProfileURL(avatar_id.asString());
avatar_data.customer_type = result["customer_type"].asString();
avatar_data.notes = result["notes"].asString();
Expand Down Expand Up @@ -568,7 +566,7 @@ void LLAvatarPropertiesProcessor::processAvatarGroupsReply(LLMessageSystem* msg,
LL_DEBUGS("AvatarProperties") << "Received AvatarGroupsReply for " << avatar_id << LL_ENDL;
}

void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id, void* data, EAvatarProcessorType type)
void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id, void* data, EAvatarProcessorType type) const
{
// Copy the map (because observers may delete themselves when updated?)
LLAvatarPropertiesProcessor::observer_multimap_t observers = mObservers;
Expand Down
41 changes: 20 additions & 21 deletions indra/newview/llavatarpropertiesprocessor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file llavatarpropertiesprocessor.h
* @brief LLAvatatIconCtrl base class
* @brief LLAvatarPropertiesProcessor class description
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
Expand Down Expand Up @@ -34,12 +34,12 @@
#include <map>

// For Flags in AvatarPropertiesReply
const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified
constexpr U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
constexpr U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
constexpr U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
constexpr U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
constexpr U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
constexpr U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified

/*
*TODO Vadim: This needs some refactoring:
Expand Down Expand Up @@ -253,7 +253,7 @@ struct LLAvatarClassifiedInfo
class LLAvatarPropertiesObserver
{
public:
virtual ~LLAvatarPropertiesObserver() {}
virtual ~LLAvatarPropertiesObserver() = default;
virtual void processProperties(void* data, EAvatarProcessorType type) = 0;
};

Expand All @@ -279,29 +279,29 @@ class LLAvatarPropertiesProcessor
void sendAvatarClassifiedsRequest(const LLUUID& avatar_id);

// Duplicate pick info requests are not suppressed.
void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id);
static void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id);

void sendClassifiedInfoRequest(const LLUUID& classified_id);
static void sendClassifiedInfoRequest(const LLUUID& classified_id);

void sendPickInfoUpdate(const LLPickData* new_pick);
static void sendPickInfoUpdate(const LLPickData* new_pick);

void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data);
static void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data);

void sendInterestsInfoUpdate(const LLLegacyInterestsData* interests_data);
static void sendInterestsInfoUpdate(const LLLegacyInterestsData* interests_data);

void sendFriendRights(const LLUUID& avatar_id, S32 rights);
static void sendFriendRights(const LLUUID& avatar_id, S32 rights);

void sendPickDelete(const LLUUID& pick_id);
static void sendPickDelete(const LLUUID& pick_id);

void sendClassifiedDelete(const LLUUID& classified_id);
static void sendClassifiedDelete(const LLUUID& classified_id);

bool isHideAgeSupportedByServer() { return mIsHideAgeSupportedByServer; }
bool isHideAgeSupportedByServer() const { return mIsHideAgeSupportedByServer; }

// Returns translated, human readable string for account type, such
// Returns translated, human-readable string for account type, such
// as "Resident" or "Linden Employee". Used for profiles, inspectors.
static std::string accountType(const LLAvatarData* avatar_data);

// Returns translated, human readable string for payment info, such
// Returns translated, human-readable string for payment info, such
// as "Payment Info on File" or "Payment Info Used".
// Used for profiles, inspectors.
static std::string paymentInfo(const LLAvatarData* avatar_data);
Expand Down Expand Up @@ -334,7 +334,7 @@ class LLAvatarPropertiesProcessor
void sendAvatarPropertiesRequestMessage(const LLUUID& avatar_id);
void initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url, EAvatarProcessorType type);

void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type);
void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type) const;

// Is there a pending, not timed out, request for this avatar's data?
// Use this to suppress duplicate requests for data when a request is
Expand All @@ -348,7 +348,6 @@ class LLAvatarPropertiesProcessor
void removePendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type);

typedef void* (*processor_method_t)(LLMessageSystem*);
static processor_method_t getProcessor(EAvatarProcessorType type);

protected:

Expand Down
54 changes: 32 additions & 22 deletions indra/newview/llpanelprofilelegacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "llviewerprecompiledheaders.h"
#include "llpanelprofilelegacy.h"

#include <boost/algorithm/string/predicate.hpp> // for boost::iequals

// libraries
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
Expand Down Expand Up @@ -83,6 +85,8 @@ static LLPanelInjector<LLPanelProfileLegacy> t_panel_lprofile("panel_profile_leg
static LLPanelInjector<LLPanelProfileLegacy::LLPanelProfileGroups> t_panel_group("panel_profile_legacy_groups");
static LLPanelInjector<LLPanelProfileLegacy::LLPanelProfilePicks> t_panel_picks("panel_profile_legacy_picks");

static LLDate sSecondLifeRelease = LLDate("2003-06-23T00:00:00");

LLPanelProfileLegacy::LLPanelProfileLegacy()
: LLPanelProfileLegacyTab()
, mPanelPicks(nullptr)
Expand Down Expand Up @@ -235,7 +239,7 @@ void LLPanelProfileLegacy::updateData()
{
setProgress(true);

const std::string cap_url = gAgent.getRegionCapability(AGENT_PROFILE_CAP);
const std::string& cap_url = gAgent.getRegionCapability(AGENT_PROFILE_CAP);
if (!cap_url.empty())
{
const auto& agent_id = getAvatarId();
Expand Down Expand Up @@ -273,7 +277,7 @@ void LLPanelProfileLegacy::updateData()
return;
}

LLPanelProfileLegacy* legacy_sidetray = (LLPanelProfileLegacy*)handle.get();
LLPanelProfileLegacy* legacy_sidetray = static_cast<LLPanelProfileLegacy*>(handle.get());
if (!legacy_sidetray)
{
return;
Expand Down Expand Up @@ -367,39 +371,45 @@ void LLPanelProfileLegacy::updateData()

legacy_sidetray->processProperties(&avatar_picks, APT_PICKS);

// bonus time...
LLIconCtrl* badge = legacy_sidetray->getChild<LLIconCtrl>("badge_icon");
if (result.has("customer_type"))
{
LLUICtrl* internal_icon = legacy_sidetray->getChild<LLUICtrl>("account_type_internal");
LLUICtrl* premium_icon = legacy_sidetray->getChild<LLUICtrl>("account_type_premium");
LLUICtrl* plus_icon = legacy_sidetray->getChild<LLUICtrl>("account_type_plus");

const std::string& type = result["customer_type"].asStringRef();

if (type == "Internal")
if (boost::iequals(type, "Internal"))
{
badge->setValue("Profile_Badge_Linden");
}
else if (avatar_data.born_on < sSecondLifeRelease)
{
badge->setValue("Profile_Badge_Beta");
}
else if (boost::iequals(type, "Beta_Lifetime"))
{
internal_icon->setVisible(true);
premium_icon->setVisible(false);
plus_icon->setVisible(false);
badge->setValue("Profile_Badge_Beta_Lifetime");
}
else if (type == "Monthly" || type == "Quarterly" || type == "Annual")
else if (boost::iequals(type, "Lifetime"))
{
internal_icon->setVisible(false);
premium_icon->setVisible(true);
plus_icon->setVisible(false);
badge->setValue("Profile_Badge_Lifetime");
}
else if (boost::iequals(type, "Monthly") || boost::iequals(type, "Quarterly") || boost::iequals(type, "Annual"))
{
badge->setValue("AccountLevel_Premium");
}
else if (type.substr(0, 12) == "Premium_Plus")
{
internal_icon->setVisible(false);
premium_icon->setVisible(false);
plus_icon->setVisible(true);
badge->setValue("AccountLevel_Plus");
}
else /* if (type == "Base") */
{
internal_icon->setVisible(false);
premium_icon->setVisible(false);
plus_icon->setVisible(false);
badge->setValue("");
}
}
else
{
badge->setValue("");
}

});
}
Expand All @@ -412,7 +422,7 @@ void LLPanelProfileLegacy::updateData()
getChild<LLLayoutPanel>("avatar_perm")->setVisible(is_other);
if (is_other)
{
S32 rights = relation->getRightsGrantedTo();
const S32 rights = relation->getRightsGrantedTo();
getChild<LLCheckBoxCtrl>("allow_show_online")->setValue(rights & LLRelationship::GRANT_ONLINE_STATUS ? TRUE : FALSE);
getChild<LLCheckBoxCtrl>("allow_mapping")->setValue(rights & LLRelationship::GRANT_MAP_LOCATION ? TRUE : FALSE);
getChild<LLCheckBoxCtrl>("allow_object_perms")->setValue(rights & LLRelationship::GRANT_MODIFY_OBJECTS ? TRUE : FALSE);
Expand Down Expand Up @@ -451,7 +461,7 @@ void LLPanelProfileLegacy::sendAvatarProfileCoro(std::string url, LLSD payload)
LL_DEBUGS("LegacyProfiles") << "Agent id: " << getAvatarId() << " Payload: " << payload << " Result: " << httpResults << LL_ENDL;
}

void LLPanelProfileLegacy::processProperties(void* data, EAvatarProcessorType type)
void LLPanelProfileLegacy::processProperties(void* data, const EAvatarProcessorType type)
{
if (!data) return;
switch(type)
Expand Down
15 changes: 0 additions & 15 deletions indra/newview/skins/alchemy/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@
<color
name="AlertBoxColor"
value="0.329 0.341 0.353 1" />
<color
name="AlertCautionBoxColor"
value="0.957 0.745 0.286 1" />
<color
name="AlertCautionTextColor"
reference="LtYellow" />
Expand Down Expand Up @@ -509,12 +506,6 @@
<color
name="HealthTextColor"
reference="AlchemyText" />
<color
name="HelpBgColor"
reference="Unused?" />
<color
name="HelpFgColor"
reference="Unused?" />
<color
name="HelpScrollHighlightColor"
reference="Unused?" />
Expand Down Expand Up @@ -1091,12 +1082,6 @@
<color
name="AvatarCustomColor4"
reference="Yellow" />
<color
name="AvatarDefaultColor"
reference="MapAvatarColor" />
<color
name="AvatarLindenColor"
reference="MapAvatarLindenColor" />
<color
name="AvatarMutedColor"
reference="Gray" />
Expand Down
3 changes: 0 additions & 3 deletions indra/newview/skins/alchemy/textures/textures.xml
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ with the same filename but different name

<texture name="Locked_Icon" file_name="icons/Locked_Icon.png" preload="false" />

<texture name="Map_Placeholder_Icon" file_name="icons/map_placeholder.png" preload="true" />

<texture name="Marketplace_Dropzone_Background" file_name="widgets/Marketplace_Dropzone_Background.png" preload="true" />
<texture name="MarketplaceBtn_Off" file_name="widgets/MarketplaceBtn_Off.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" />
<texture name="MarketplaceBtn_Selected" file_name="widgets/MarketplaceBtn_Selected.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" />
Expand Down Expand Up @@ -898,7 +896,6 @@ with the same filename but different name
<texture name="Clipboard_Cut" file_name="icons/clipboard_cut.png" preload="false" />
<texture name="Clipboard_Paste" file_name="icons/clipboard_paste.png" preload="false" />

<texture name="AccountLevel_Internal" file_name="icons/SL_Logo.png" preload="false" />
<texture name="AccountLevel_Plus" file_name="icons/AccountLevel_Plus.png" preload="false" />
<texture name="AccountLevel_Premium" file_name="icons/AccountLevel_Premium.png" preload="false" />

Expand Down
2 changes: 1 addition & 1 deletion indra/newview/skins/default/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
value="0.24 0.24 0.24 1" />
<color
name="AlertCautionBoxColor"
value="1 0.82 0.46 1" />
reference="Unused?" />
<color
name="AlertCautionTextColor"
reference="LtYellow" />
Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions indra/newview/skins/default/textures/textures.xml
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ with the same filename but different name
<texture name="Lock2" file_name="navbar/Lock.png" preload="false" />

<texture name="Locked_Icon" file_name="icons/Locked_Icon.png" preload="false" />

<texture name="Map_Placeholder_Icon" file_name="icons/map_placeholder.png" preload="true" />

<texture name="Marketplace_Dropzone_Background" file_name="widgets/Marketplace_Dropzone_Background.png" preload="true" />
<texture name="MarketplaceBtn_Off" file_name="widgets/MarketplaceBtn_Off.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" />
Expand Down Expand Up @@ -938,7 +936,6 @@ with the same filename but different name
<texture name="Clipboard_Cut" file_name="icons/clipboard_cut.png" preload="false" />
<texture name="Clipboard_Paste" file_name="icons/clipboard_paste.png" preload="false" />

<texture name="AccountLevel_Internal" file_name="icons/SL_Logo.png" preload="false" />
<texture name="AccountLevel_Plus" file_name="icons/AccountLevel_Plus.png" preload="false" />
<texture name="AccountLevel_Premium" file_name="icons/AccountLevel_Premium.png" preload="false" />

Expand Down
4 changes: 0 additions & 4 deletions indra/newview/skins/default/xui/en/floater_360capture.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
follows="left|bottom|top"
left="0"
width="200"
bg_opaque_color="0.195 0.195 0.195 1"
background_opaque="true"
height="400"
name="ui_panel_left">
<text
Expand Down Expand Up @@ -111,13 +109,11 @@
follows="all"
left="200"
width="600"
bg_opaque_color="0.195 0.195 0.195 1"
background_opaque="true"
height="400"
name="ui_panel_right">
<web_browser top="10"
follows="all"
bg_opaque_color="0.225 0.225 0.225 1"
left="0"
width="590"
height="368"
Expand Down
6 changes: 2 additions & 4 deletions indra/newview/skins/default/xui/en/floater_asset_recovery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Recovered items will be placed in the 'Lost and Found' inventory folder.
<panel
background_visible="false"
follows="left|right|bottom"
height="25"
height="25"
label="bottom_panel"
layout="topleft"
left="6"
Expand All @@ -71,12 +71,10 @@ Recovered items will be placed in the 'Lost and Found' inventory folder.
width="30" />
<button
height="25"
image_color="Green"
image_hover_unselected="Toolbar_Middle_Over"
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"
label="Recover"
label_color="White"
left_pad="1"
name="recover_btn"
top="1"
Expand Down Expand Up @@ -108,4 +106,4 @@ Recovered items will be placed in the 'Lost and Found' inventory folder.
top="1"
width="30" />
</panel>
</floater>
</floater>
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
left_delta="15"
top_pad="15"
font="SansSerif"
text_color="Yellow"
text_color="EmphasisColor"
width="500">
Select a key frame from the timeline above to edit settings.
</text>
Expand Down
Loading

0 comments on commit f356367

Please sign in to comment.