diff options
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 188 |
1 files changed, 94 insertions, 94 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index be5783dd50..92a8a826ac 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -138,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) { @@ -192,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) { @@ -226,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) { @@ -267,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) { @@ -779,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 { @@ -798,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 { @@ -824,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 { @@ -834,7 +834,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights() } else { - mMapRights->setValue(FALSE); + mMapRights->setValue(false); } mHasUnsavedPermChanges = true; } @@ -968,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); @@ -1005,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(); } @@ -1039,13 +1039,13 @@ bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool d if (localPointToOtherView(x, y, &child_x, &child_y, mDescriptionEdit) && mDescriptionEdit->pointInView(child_x, child_y)) { - return FALSE; + return false; } if (localPointToOtherView(x, y, &child_x, &child_y, mGroupList) && mGroupList->pointInView(child_x, child_y)) { - return FALSE; + return false; } // Share @@ -1055,7 +1055,7 @@ bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool d cargo_type, cargo_data, accept); - return TRUE; + return true; } void LLPanelProfileSecondLife::updateData() @@ -1116,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) @@ -1200,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(); @@ -1287,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); } } @@ -1306,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); @@ -1314,7 +1314,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data) } else { - childSetVisible("partner_layout", FALSE); + childSetVisible("partner_layout", false); } } @@ -1336,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); } } @@ -1439,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()) @@ -1454,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; @@ -1499,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) @@ -1552,8 +1552,8 @@ void LLPanelProfileSecondLife::setLoaded() if (getSelfProfile()) { - mShowInSearchCombo->setEnabled(TRUE); - mDescriptionEdit->setEnabled(TRUE); + mShowInSearchCombo->setEnabled(true); + mDescriptionEdit->setEnabled(true); } } @@ -1863,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; @@ -1873,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; } @@ -1914,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; } @@ -1935,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); } } @@ -1971,7 +1971,7 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture() texture_view->resetAsset(); } texture_view->openFloater(); - texture_view->setVisibleAndFrontmost(TRUE); + texture_view->setVisibleAndFrontmost(true); parent_floater->addDependentFloater(mFloaterProfileTextureHandle); } @@ -1979,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); @@ -2009,12 +2009,12 @@ void LLPanelProfileSecondLife::onShowTexturePicker() mImageId, LLUUID::null, mImageId, - FALSE, - FALSE, + false, + false, "SELECT PHOTO", PERM_NONE, PERM_NONE, - FALSE, + false, NULL); mFloaterTexturePickerHandle = texture_floaterp->getHandle(); @@ -2026,20 +2026,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); } } @@ -2145,7 +2145,7 @@ void LLPanelProfileWeb::updateData() { setIsLoading(); - mWebBrowser->setVisible(TRUE); + mWebBrowser->setVisible(true); mPerformanceTimer.start(); mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML); } @@ -2182,7 +2182,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 ); } @@ -2277,7 +2277,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(); @@ -2344,12 +2344,12 @@ void LLPanelProfileFirstLife::onChangePhoto() mImageId, LLUUID::null, mImageId, - FALSE, - FALSE, + false, + false, "SELECT PHOTO", PERM_NONE, PERM_NONE, - FALSE, + false, NULL); mFloaterTexturePickerHandle = texture_floaterp->getHandle(); @@ -2361,19 +2361,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); } } @@ -2423,8 +2423,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; @@ -2433,8 +2433,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; } @@ -2452,8 +2452,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; } @@ -2499,8 +2499,8 @@ void LLPanelProfileFirstLife::setLoaded() if (getSelfProfile()) { - mDescriptionEdit->setEnabled(TRUE); - mPicture->setEnabled(TRUE); + mDescriptionEdit->setEnabled(true); + mPicture->setEnabled(true); mRemovePhoto->setEnabled(mImageId.notNull()); } } @@ -2566,8 +2566,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; @@ -2576,8 +2576,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; } @@ -2595,8 +2595,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; } @@ -2608,7 +2608,7 @@ void LLPanelProfileNotes::onDiscardNotesChanges() void LLPanelProfileNotes::processProperties(LLAvatarNotes* avatar_notes) { setNotesText(avatar_notes->notes); - mNotesEditor->setEnabled(TRUE); + mNotesEditor->setEnabled(true); setLoaded(); } |