aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpreviewnotecard.cpp')
-rw-r--r--linden/indra/newview/llpreviewnotecard.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/linden/indra/newview/llpreviewnotecard.cpp b/linden/indra/newview/llpreviewnotecard.cpp
index ce37d64..620be8f 100644
--- a/linden/indra/newview/llpreviewnotecard.cpp
+++ b/linden/indra/newview/llpreviewnotecard.cpp
@@ -2,6 +2,8 @@
2 * @file llpreviewnotecard.cpp 2 * @file llpreviewnotecard.cpp
3 * @brief Implementation of the notecard editor 3 * @brief Implementation of the notecard editor
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 7 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -278,7 +281,7 @@ void LLPreviewNotecard::loadAsset()
278 mAssetID = item->getAssetUUID(); 281 mAssetID = item->getAssetUUID();
279 if(mAssetID.isNull()) 282 if(mAssetID.isNull())
280 { 283 {
281 editor->setText(""); 284 editor->setText(LLString::null);
282 editor->makePristine(); 285 editor->makePristine();
283 editor->setEnabled(TRUE); 286 editor->setEnabled(TRUE);
284 mAssetStatus = PREVIEW_ASSET_LOADED; 287 mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -299,7 +302,7 @@ void LLPreviewNotecard::loadAsset()
299 // The object that we're trying to look at disappeared, bail. 302 // The object that we're trying to look at disappeared, bail.
300 llwarns << "Can't find object " << mObjectUUID << " associated with notecard." << llendl; 303 llwarns << "Can't find object " << mObjectUUID << " associated with notecard." << llendl;
301 mAssetID.setNull(); 304 mAssetID.setNull();
302 editor->setText("Unable to find object containing this note."); 305 editor->setText(childGetText("no_object"));
303 editor->makePristine(); 306 editor->makePristine();
304 editor->setEnabled(FALSE); 307 editor->setEnabled(FALSE);
305 mAssetStatus = PREVIEW_ASSET_LOADED; 308 mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -324,7 +327,7 @@ void LLPreviewNotecard::loadAsset()
324 else 327 else
325 { 328 {
326 mAssetID.setNull(); 329 mAssetID.setNull();
327 editor->setText("You are not allowed to view this note."); 330 editor->setText(childGetText("not_allowed"));
328 editor->makePristine(); 331 editor->makePristine();
329 editor->setEnabled(FALSE); 332 editor->setEnabled(FALSE);
330 mAssetStatus = PREVIEW_ASSET_LOADED; 333 mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -338,7 +341,7 @@ void LLPreviewNotecard::loadAsset()
338 } 341 }
339 else 342 else
340 { 343 {
341 editor->setText(""); 344 editor->setText(LLString::null);
342 editor->makePristine(); 345 editor->makePristine();
343 editor->setEnabled(TRUE); 346 editor->setEnabled(TRUE);
344 mAssetStatus = PREVIEW_ASSET_LOADED; 347 mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -381,7 +384,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
381 else 384 else
382 { 385 {
383 // Version 0 (just text, doesn't include version number) 386 // Version 0 (just text, doesn't include version number)
384 previewEditor->setText(buffer); 387 previewEditor->setText(LLStringExplicit(buffer));
385 } 388 }
386 389
387 previewEditor->makePristine(); 390 previewEditor->makePristine();