summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp256
1 files changed, 151 insertions, 105 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 8114e05a94..3a26fb086b 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -46,6 +46,7 @@
#include "lltexteditor.h"
#include "lltexturectrl.h"
#include "lltoggleablemenu.h"
+#include "lltooldraganddrop.h"
#include "llgrouplist.h"
#include "llurlaction.h"
@@ -137,7 +138,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
return;
}
- LLPanel *panel = floater_profile->findChild<LLPanel>(PANEL_PROFILE_VIEW, TRUE);
+ LLPanel *panel = floater_profile->findChild<LLPanel>(PANEL_PROFILE_VIEW, true);
LLPanelProfile *panel_profile = dynamic_cast<LLPanelProfile*>(panel);
if (!panel_profile)
{
@@ -191,21 +192,21 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_data->caption_text = result["caption"].asString();
}
- panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, true);
LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel);
if (panel_sl)
{
panel_sl->processProfileProperties(avatar_data);
}
- panel = floater_profile->findChild<LLPanel>(PANEL_WEB, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_WEB, true);
LLPanelProfileWeb *panel_web = dynamic_cast<LLPanelProfileWeb*>(panel);
if (panel_web)
{
panel_web->setLoaded();
}
- panel = floater_profile->findChild<LLPanel>(PANEL_FIRSTLIFE, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_FIRSTLIFE, true);
LLPanelProfileFirstLife *panel_first = dynamic_cast<LLPanelProfileFirstLife*>(panel);
if (panel_first)
{
@@ -225,7 +226,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_picks.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString());
}
- panel = floater_profile->findChild<LLPanel>(PANEL_PICKS, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_PICKS, true);
LLPanelProfilePicks *panel_picks = dynamic_cast<LLPanelProfilePicks*>(panel);
if (panel_picks)
{
@@ -266,7 +267,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_notes.target_id = agent_id;
avatar_notes.notes = result["notes"].asString();
- panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, TRUE);
+ panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, true);
LLPanelProfileNotes *panel_notes = dynamic_cast<LLPanelProfileNotes*>(panel);
if (panel_notes)
{
@@ -533,7 +534,7 @@ public:
{
if (params.size() < 2) return false;
LLUUID avatar_id;
- if (!avatar_id.set(params[0], FALSE))
+ if (!avatar_id.set(params[0], false))
{
return false;
}
@@ -660,7 +661,7 @@ class LLFloaterProfilePermissions
public:
LLFloaterProfilePermissions(LLView * owner, const LLUUID &avatar_id);
~LLFloaterProfilePermissions();
- BOOL postBuild() override;
+ bool postBuild() override;
void onOpen(const LLSD& key) override;
void draw() override;
void changed(U32 mask) override; // LLFriendObserver
@@ -712,7 +713,7 @@ LLFloaterProfilePermissions::~LLFloaterProfilePermissions()
}
}
-BOOL LLFloaterProfilePermissions::postBuild()
+bool LLFloaterProfilePermissions::postBuild()
{
mDescription = getChild<LLTextBase>("perm_description");
mOnlineStatus = getChild<LLCheckBoxCtrl>("online_check");
@@ -727,7 +728,7 @@ BOOL LLFloaterProfilePermissions::postBuild()
mOkBtn->setCommitCallback([this](LLUICtrl*, void*) { onApplyRights(); }, nullptr);
mCancelBtn->setCommitCallback([this](LLUICtrl*, void*) { onCancel(); }, nullptr);
- return TRUE;
+ return true;
}
void LLFloaterProfilePermissions::onOpen(const LLSD& key)
@@ -778,11 +779,11 @@ void LLFloaterProfilePermissions::fillRightsData()
{
S32 rights = relation->getRightsGrantedTo();
- BOOL see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE;
+ bool see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? true : false;
mOnlineStatus->setValue(see_online);
mMapRights->setEnabled(see_online);
- mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
- mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
+ mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false);
+ mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? true : false);
}
else
{
@@ -797,7 +798,7 @@ void LLFloaterProfilePermissions::rightsConfirmationCallback(const LLSD& notific
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) // canceled
{
- mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? FALSE : TRUE);
+ mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? false : true);
}
else
{
@@ -823,7 +824,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights()
if (relation)
{
S32 rights = relation->getRightsGrantedTo();
- mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
+ mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false);
}
else
{
@@ -833,7 +834,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights()
}
else
{
- mMapRights->setValue(FALSE);
+ mMapRights->setValue(false);
}
mHasUnsavedPermChanges = true;
}
@@ -924,7 +925,7 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife()
}
}
-BOOL LLPanelProfileSecondLife::postBuild()
+bool LLPanelProfileSecondLife::postBuild()
{
mGroupList = getChild<LLGroupList>("group_list");
mShowInSearchCombo = getChild<LLComboBox>("show_in_search");
@@ -956,7 +957,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
mCantEditObjectsIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); });
mSecondLifePic->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentProfileTexture(); });
- return TRUE;
+ return true;
}
void LLPanelProfileSecondLife::onOpen(const LLSD& key)
@@ -967,7 +968,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
LLUUID avatar_id = getAvatarId();
- BOOL own_profile = getSelfProfile();
+ bool own_profile = getSelfProfile();
mGroupList->setShowNone(!own_profile);
@@ -1004,7 +1005,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
if (!own_profile)
{
- mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : TRUE);
+ mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : true);
updateOnlineStatus();
fillRightsData();
}
@@ -1012,6 +1013,51 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCache, this, _1, _2));
}
+
+bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ // Try children first
+ if (LLPanelProfileTab::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg)
+ && *accept != ACCEPT_NO)
+ {
+ return true;
+ }
+
+ // No point sharing with own profile
+ if (getSelfProfile())
+ {
+ return false;
+ }
+
+ // Exclude fields that look like they are editable.
+ S32 child_x = 0;
+ S32 child_y = 0;
+ if (localPointToOtherView(x, y, &child_x, &child_y, mDescriptionEdit)
+ && mDescriptionEdit->pointInView(child_x, child_y))
+ {
+ return false;
+ }
+
+ if (localPointToOtherView(x, y, &child_x, &child_y, mGroupList)
+ && mGroupList->pointInView(child_x, child_y))
+ {
+ return false;
+ }
+
+ // Share
+ LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(),
+ LLUUID::null,
+ drop,
+ cargo_type,
+ cargo_data,
+ accept);
+ return true;
+}
+
void LLPanelProfileSecondLife::updateData()
{
LLUUID avatar_id = getAvatarId();
@@ -1070,9 +1116,9 @@ void LLPanelProfileSecondLife::resetData()
mCanEditObjectsIcon->setEnabled(false);
mCantEditObjectsIcon->setEnabled(false);
- childSetVisible("partner_layout", FALSE);
- childSetVisible("badge_layout", FALSE);
- childSetVisible("partner_spacer_layout", TRUE);
+ childSetVisible("partner_layout", false);
+ childSetVisible("badge_layout", false);
+ childSetVisible("partner_spacer_layout", true);
}
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
@@ -1154,11 +1200,11 @@ void LLPanelProfileSecondLife::setProfileImageUploaded(const LLUUID &image_asset
{
imagep->setLoadedCallback(onImageLoaded,
MAX_DISCARD_LEVEL,
- FALSE,
- FALSE,
+ false,
+ false,
new LLHandle<LLPanel>(getHandle()),
NULL,
- FALSE);
+ false);
}
LLFloater *floater = mFloaterProfileTextureHandle.get();
@@ -1241,17 +1287,17 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
{
imagep->setLoadedCallback(onImageLoaded,
MAX_DISCARD_LEVEL,
- FALSE,
- FALSE,
+ false,
+ false,
new LLHandle<LLPanel>(getHandle()),
NULL,
- FALSE);
+ false);
}
if (getSelfProfile())
{
mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH;
- mShowInSearchCombo->setValue((BOOL)mAllowPublish);
+ mShowInSearchCombo->setValue((bool)mAllowPublish);
}
}
@@ -1260,7 +1306,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);
+ 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);
@@ -1268,7 +1314,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data)
}
else
{
- childSetVisible("partner_layout", FALSE);
+ childSetVisible("partner_layout", false);
}
}
@@ -1290,48 +1336,48 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Linden");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLinden"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (avatar_data->born_on < sl_release)
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBeta"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "beta_lifetime")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBetaLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "lifetime")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "secondlifetime_premium")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Premium_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else if (customer_lower == "secondlifetime_premium_plus")
{
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime");
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumPlusLifetime"));
- childSetVisible("badge_layout", TRUE);
- childSetVisible("partner_spacer_layout", FALSE);
+ childSetVisible("badge_layout", true);
+ childSetVisible("partner_spacer_layout", false);
}
else
{
- childSetVisible("badge_layout", FALSE);
- childSetVisible("partner_spacer_layout", TRUE);
+ childSetVisible("badge_layout", false);
+ childSetVisible("partner_spacer_layout", true);
}
}
@@ -1393,7 +1439,7 @@ void LLPanelProfileSecondLife::fillAgeData(const LLDate &born_on)
getChild<LLUICtrl>("user_age")->setValue(register_date);
}
-void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep)
+void LLPanelProfileSecondLife::onImageLoaded(bool success, LLViewerFetchedTexture *imagep)
{
LLRect imageRect = mSecondLifePicLayout->getRect();
if (!success || imagep->getFullWidth() == imagep->getFullHeight())
@@ -1408,12 +1454,12 @@ void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTextur
}
//static
-void LLPanelProfileSecondLife::onImageLoaded(BOOL success,
+void LLPanelProfileSecondLife::onImageLoaded(bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
if (!userdata) return;
@@ -1453,7 +1499,7 @@ void LLPanelProfileSecondLife::onChange(EStatusType status, const std::string &c
return;
}
- mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : TRUE);
+ mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : true);
}
void LLPanelProfileSecondLife::setAvatarId(const LLUUID& avatar_id)
@@ -1506,8 +1552,8 @@ void LLPanelProfileSecondLife::setLoaded()
if (getSelfProfile())
{
- mShowInSearchCombo->setEnabled(TRUE);
- mDescriptionEdit->setEnabled(TRUE);
+ mShowInSearchCombo->setEnabled(true);
+ mDescriptionEdit->setEnabled(true);
}
}
@@ -1817,8 +1863,8 @@ void LLPanelProfileSecondLife::onAvatarNameCacheSetName(const LLUUID& agent_id,
void LLPanelProfileSecondLife::setDescriptionText(const std::string &text)
{
- mSaveDescriptionChanges->setEnabled(FALSE);
- mDiscardDescriptionChanges->setEnabled(FALSE);
+ mSaveDescriptionChanges->setEnabled(false);
+ mDiscardDescriptionChanges->setEnabled(false);
mHasUnsavedDescriptionChanges = false;
mDescriptionText = text;
@@ -1827,8 +1873,8 @@ void LLPanelProfileSecondLife::setDescriptionText(const std::string &text)
void LLPanelProfileSecondLife::onSetDescriptionDirty()
{
- mSaveDescriptionChanges->setEnabled(TRUE);
- mDiscardDescriptionChanges->setEnabled(TRUE);
+ mSaveDescriptionChanges->setEnabled(true);
+ mDiscardDescriptionChanges->setEnabled(true);
mHasUnsavedDescriptionChanges = true;
}
@@ -1868,8 +1914,8 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges()
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
}
- mSaveDescriptionChanges->setEnabled(FALSE);
- mDiscardDescriptionChanges->setEnabled(FALSE);
+ mSaveDescriptionChanges->setEnabled(false);
+ mDiscardDescriptionChanges->setEnabled(false);
mHasUnsavedDescriptionChanges = false;
}
@@ -1889,15 +1935,15 @@ void LLPanelProfileSecondLife::onShowAgentPermissionsDialog()
LLFloaterProfilePermissions * perms = new LLFloaterProfilePermissions(parent_floater, getAvatarId());
mFloaterPermissionsHandle = perms->getHandle();
perms->openFloater();
- perms->setVisibleAndFrontmost(TRUE);
+ perms->setVisibleAndFrontmost(true);
parent_floater->addDependentFloater(mFloaterPermissionsHandle);
}
}
else // already open
{
- floater->setMinimized(FALSE);
- floater->setVisibleAndFrontmost(TRUE);
+ floater->setMinimized(false);
+ floater->setVisibleAndFrontmost(true);
}
}
@@ -1925,7 +1971,7 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture()
texture_view->resetAsset();
}
texture_view->openFloater();
- texture_view->setVisibleAndFrontmost(TRUE);
+ texture_view->setVisibleAndFrontmost(true);
parent_floater->addDependentFloater(mFloaterProfileTextureHandle);
}
@@ -1933,8 +1979,8 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture()
else // already open
{
LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
- texture_view->setMinimized(FALSE);
- texture_view->setVisibleAndFrontmost(TRUE);
+ texture_view->setMinimized(false);
+ texture_view->setVisibleAndFrontmost(true);
if (mImageId.notNull())
{
texture_view->loadAsset(mImageId);
@@ -1963,12 +2009,12 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
mImageId,
LLUUID::null,
mImageId,
- FALSE,
- FALSE,
+ false,
+ false,
"SELECT PHOTO",
PERM_NONE,
PERM_NONE,
- FALSE,
+ false,
NULL,
PICK_TEXTURE);
@@ -1981,20 +2027,20 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
onCommitProfileImage(asset_id);
}
});
- texture_floaterp->setLocalTextureEnabled(FALSE);
- texture_floaterp->setBakeTextureEnabled(FALSE);
+ texture_floaterp->setLocalTextureEnabled(false);
+ texture_floaterp->setBakeTextureEnabled(false);
texture_floaterp->setCanApply(false, true, false);
parent_floater->addDependentFloater(mFloaterTexturePickerHandle);
texture_floaterp->openFloater();
- texture_floaterp->setFocus(TRUE);
+ texture_floaterp->setFocus(true);
}
}
else
{
- floaterp->setMinimized(FALSE);
- floaterp->setVisibleAndFrontmost(TRUE);
+ floaterp->setMinimized(false);
+ floaterp->setVisibleAndFrontmost(true);
}
}
@@ -2079,13 +2125,13 @@ void LLPanelProfileWeb::onOpen(const LLSD& key)
mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileWeb::onAvatarNameCache, this, _1, _2));
}
-BOOL LLPanelProfileWeb::postBuild()
+bool LLPanelProfileWeb::postBuild()
{
mWebBrowser = getChild<LLMediaCtrl>("profile_html");
mWebBrowser->addObserver(this);
mWebBrowser->setHomePageUrl("about:blank");
- return TRUE;
+ return true;
}
void LLPanelProfileWeb::resetData()
@@ -2100,7 +2146,7 @@ void LLPanelProfileWeb::updateData()
{
setIsLoading();
- mWebBrowser->setVisible(TRUE);
+ mWebBrowser->setVisible(true);
mPerformanceTimer.start();
mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML);
}
@@ -2137,7 +2183,7 @@ void LLPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl)
LLSD::String valstr = ctrl->getValue().asString();
if (valstr.empty())
{
- mWebBrowser->setVisible(TRUE);
+ mWebBrowser->setVisible(true);
mPerformanceTimer.start();
mWebBrowser->navigateTo( mURLHome, HTTP_CONTENT_TEXT_HTML );
}
@@ -2204,7 +2250,7 @@ LLPanelProfileFirstLife::~LLPanelProfileFirstLife()
{
}
-BOOL LLPanelProfileFirstLife::postBuild()
+bool LLPanelProfileFirstLife::postBuild()
{
mDescriptionEdit = getChild<LLTextEditor>("fl_description_edit");
mPicture = getChild<LLThumbnailCtrl>("real_world_pic");
@@ -2222,7 +2268,7 @@ BOOL LLPanelProfileFirstLife::postBuild()
mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr);
mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); });
- return TRUE;
+ return true;
}
void LLPanelProfileFirstLife::onOpen(const LLSD& key)
@@ -2232,7 +2278,7 @@ void LLPanelProfileFirstLife::onOpen(const LLSD& key)
if (!getSelfProfile())
{
// Otherwise as the only focusable element it will be selected
- mDescriptionEdit->setTabStop(FALSE);
+ mDescriptionEdit->setTabStop(false);
}
resetData();
@@ -2299,12 +2345,12 @@ void LLPanelProfileFirstLife::onChangePhoto()
mImageId,
LLUUID::null,
mImageId,
- FALSE,
- FALSE,
+ false,
+ false,
"SELECT PHOTO",
PERM_NONE,
PERM_NONE,
- FALSE,
+ false,
NULL,
PICK_TEXTURE);
@@ -2317,19 +2363,19 @@ void LLPanelProfileFirstLife::onChangePhoto()
onCommitPhoto(asset_id);
}
});
- texture_floaterp->setLocalTextureEnabled(FALSE);
+ texture_floaterp->setLocalTextureEnabled(false);
texture_floaterp->setCanApply(false, true, false);
parent_floater->addDependentFloater(mFloaterTexturePickerHandle);
texture_floaterp->openFloater();
- texture_floaterp->setFocus(TRUE);
+ texture_floaterp->setFocus(true);
}
}
else
{
- floaterp->setMinimized(FALSE);
- floaterp->setVisibleAndFrontmost(TRUE);
+ floaterp->setMinimized(false);
+ floaterp->setVisibleAndFrontmost(true);
}
}
@@ -2379,8 +2425,8 @@ void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id)
void LLPanelProfileFirstLife::setDescriptionText(const std::string &text)
{
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
mCurrentDescription = text;
@@ -2389,8 +2435,8 @@ void LLPanelProfileFirstLife::setDescriptionText(const std::string &text)
void LLPanelProfileFirstLife::onSetDescriptionDirty()
{
- mSaveChanges->setEnabled(TRUE);
- mDiscardChanges->setEnabled(TRUE);
+ mSaveChanges->setEnabled(true);
+ mDiscardChanges->setEnabled(true);
mHasUnsavedChanges = true;
}
@@ -2408,8 +2454,8 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges()
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
}
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
}
@@ -2455,8 +2501,8 @@ void LLPanelProfileFirstLife::setLoaded()
if (getSelfProfile())
{
- mDescriptionEdit->setEnabled(TRUE);
- mPicture->setEnabled(TRUE);
+ mDescriptionEdit->setEnabled(true);
+ mPicture->setEnabled(true);
mRemovePhoto->setEnabled(mImageId.notNull());
}
}
@@ -2500,7 +2546,7 @@ void LLPanelProfileNotes::commitUnsavedChanges()
}
}
-BOOL LLPanelProfileNotes::postBuild()
+bool LLPanelProfileNotes::postBuild()
{
mNotesEditor = getChild<LLTextEditor>("notes_edit");
mSaveChanges = getChild<LLButton>("notes_save_changes");
@@ -2510,7 +2556,7 @@ BOOL LLPanelProfileNotes::postBuild()
mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardNotesChanges(); }, nullptr);
mNotesEditor->setKeystrokeCallback([this](LLTextEditor* caller) { onSetNotesDirty(); });
- return TRUE;
+ return true;
}
void LLPanelProfileNotes::onOpen(const LLSD& key)
@@ -2522,8 +2568,8 @@ void LLPanelProfileNotes::onOpen(const LLSD& key)
void LLPanelProfileNotes::setNotesText(const std::string &text)
{
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
mCurrentNotes = text;
@@ -2532,8 +2578,8 @@ void LLPanelProfileNotes::setNotesText(const std::string &text)
void LLPanelProfileNotes::onSetNotesDirty()
{
- mSaveChanges->setEnabled(TRUE);
- mDiscardChanges->setEnabled(TRUE);
+ mSaveChanges->setEnabled(true);
+ mDiscardChanges->setEnabled(true);
mHasUnsavedChanges = true;
}
@@ -2551,8 +2597,8 @@ void LLPanelProfileNotes::onSaveNotesChanges()
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
}
- mSaveChanges->setEnabled(FALSE);
- mDiscardChanges->setEnabled(FALSE);
+ mSaveChanges->setEnabled(false);
+ mDiscardChanges->setEnabled(false);
mHasUnsavedChanges = false;
}
@@ -2564,7 +2610,7 @@ void LLPanelProfileNotes::onDiscardNotesChanges()
void LLPanelProfileNotes::processProperties(LLAvatarNotes* avatar_notes)
{
setNotesText(avatar_notes->notes);
- mNotesEditor->setEnabled(TRUE);
+ mNotesEditor->setEnabled(true);
setLoaded();
}
@@ -2595,9 +2641,9 @@ LLPanelProfile::~LLPanelProfile()
{
}
-BOOL LLPanelProfile::postBuild()
+bool LLPanelProfile::postBuild()
{
- return TRUE;
+ return true;
}
void LLPanelProfile::onTabChange()