summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r--indra/newview/llpreviewnotecard.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 9fda92114a..56ceadb62f 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -89,7 +89,7 @@ bool LLPreviewNotecard::postBuild()
mEditor->makePristine();
childSetAction("Save", onClickSave, this);
- getChildView("lock")->setVisible( FALSE);
+ getChildView("lock")->setVisible( false);
childSetAction("Delete", onClickDelete, this);
getChildView("Delete")->setEnabled(false);
@@ -102,7 +102,7 @@ bool LLPreviewNotecard::postBuild()
if (item)
{
getChild<LLUICtrl>("desc")->setValue(item->getDescription());
- BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
+ bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
getChildView("Delete")->setEnabled(!source_library);
}
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
@@ -131,7 +131,7 @@ void LLPreviewNotecard::setEnabled(bool enabled)
void LLPreviewNotecard::draw()
{
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
- BOOL changed = !editor->isPristine();
+ bool changed = !editor->isPristine();
getChildView("Save")->setEnabled(changed && getEnabled());
@@ -163,7 +163,7 @@ bool LLPreviewNotecard::canClose()
{
if(!mSaveDialogShown)
{
- mSaveDialogShown = TRUE;
+ mSaveDialogShown = true;
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
}
@@ -239,10 +239,10 @@ void LLPreviewNotecard::loadAsset()
if(item)
{
LLPermissions perm(item->getPermissions());
- BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
- BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
- BOOL allow_modify = canModify(mObjectUUID, item);
- BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
+ bool is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
+ bool allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
+ bool allow_modify = canModify(mObjectUUID, item);
+ bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
if (allow_copy || gAgent.isGodlike())
{
@@ -251,7 +251,7 @@ void LLPreviewNotecard::loadAsset()
{
editor->setText(LLStringUtil::null);
editor->makePristine();
- editor->setEnabled(TRUE);
+ editor->setEnabled(true);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
else
@@ -272,7 +272,7 @@ void LLPreviewNotecard::loadAsset()
mAssetID.setNull();
editor->setText(getString("no_object"));
editor->makePristine();
- editor->setEnabled(FALSE);
+ editor->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
return;
}
@@ -294,7 +294,7 @@ void LLPreviewNotecard::loadAsset()
item->getType(),
&onLoadComplete,
(void*)user_data,
- TRUE);
+ true);
mAssetStatus = PREVIEW_ASSET_LOADING;
}
}
@@ -303,20 +303,20 @@ void LLPreviewNotecard::loadAsset()
mAssetID.setNull();
editor->setText(getString("not_allowed"));
editor->makePristine();
- editor->setEnabled(FALSE);
+ editor->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
if(!allow_modify)
{
- editor->setEnabled(FALSE);
- getChildView("lock")->setVisible( TRUE);
- getChildView("Edit")->setEnabled(FALSE);
+ editor->setEnabled(false);
+ getChildView("lock")->setVisible( true);
+ getChildView("Edit")->setEnabled(false);
}
if((allow_modify || is_owner) && !source_library)
{
- getChildView("Delete")->setEnabled(TRUE);
+ getChildView("Delete")->setEnabled(true);
}
}
else if (mObjectUUID.notNull() && mItemUUID.notNull())
@@ -347,7 +347,7 @@ void LLPreviewNotecard::loadAsset()
{
editor->setText(LLStringUtil::null);
editor->makePristine();
- editor->setEnabled(TRUE);
+ editor->setEnabled(true);
// Don't set asset status here; we may not have set the item id yet
// (e.g. when this gets called initially)
//mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -393,7 +393,7 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid,
}
previewEditor->makePristine();
- BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem());
+ bool modifiable = preview->canModify(preview->mObjectID, preview->getItem());
preview->setEnabled(modifiable);
preview->syncExternal();
preview->mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -599,7 +599,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync)
gAssetStorage->storeAssetData(tid, LLAssetType::AT_NOTECARD,
&onSaveComplete,
(void*)info,
- FALSE);
+ false);
return true;
}
else // !gAssetStorage
@@ -725,17 +725,17 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
- mSaveDialogShown = FALSE;
+ mSaveDialogShown = false;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0: // "Yes"
- mCloseAfterSave = TRUE;
+ mCloseAfterSave = true;
LLPreviewNotecard::onClickSave((void*)this);
break;
case 1: // "No"
- mForceClose = TRUE;
+ mForceClose = true;
closeFloater();
break;
@@ -764,7 +764,7 @@ bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, cons
if (item != NULL)
{
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- gInventory.changeItemParent(item, trash_id, FALSE);
+ gInventory.changeItemParent(item, trash_id, false);
}
}
else
@@ -782,7 +782,7 @@ bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, cons
}
// close floater, ignore unsaved changes
- mForceClose = TRUE;
+ mForceClose = true;
closeFloater();
return false;
}