diff options
author | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
commit | 215f423cbe18fe9ca14a26caef918d303bad28ff (patch) | |
tree | 0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llfloateranimpreview.cpp | |
parent | Second Life viewer sources 1.18.3.5-RC (diff) | |
download | meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2 meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz |
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloateranimpreview.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index 09fc508..71c2217 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llfloateranimpreview.cpp | 2 | * @file llfloateranimpreview.cpp |
3 | * @brief LLFloaterAnimPreview class implementation | 3 | * @brief LLFloaterAnimPreview class implementation |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2004&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2004-2007, Linden Research, Inc. | 7 | * Copyright (c) 2004-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" |
@@ -291,8 +294,7 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
291 | delete mAnimPreview; | 294 | delete mAnimPreview; |
292 | mAnimPreview = NULL; | 295 | mAnimPreview = NULL; |
293 | mMotionID.setNull(); | 296 | mMotionID.setNull(); |
294 | // XUI:translate | 297 | childSetValue("bad_animation_text", childGetText("failed_to_initialize")); |
295 | childSetValue("bad_animation_text", LLSD("Failed to initialize motion.")); | ||
296 | mEnabled = FALSE; | 298 | mEnabled = FALSE; |
297 | } | 299 | } |
298 | } | 300 | } |
@@ -302,18 +304,16 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
302 | { | 304 | { |
303 | if (loaderp->getDuration() > MAX_ANIM_DURATION) | 305 | if (loaderp->getDuration() > MAX_ANIM_DURATION) |
304 | { | 306 | { |
305 | char output_str[256]; /*Flawfinder: ignore*/ | 307 | LLUIString out_str = childGetText("anim_too_long"); |
306 | 308 | out_str.setArg("[LENGTH]", llformat("%.1f", loaderp->getDuration())); | |
307 | snprintf(output_str, sizeof(output_str), "Animation file is %.1f seconds in length.\n\nMaximum animation length is %.1f seconds.\n", /* Flawfinder: ignore */ | 309 | out_str.setArg("[MAX_LENGTH]", llformat("%.1f", MAX_ANIM_DURATION)); |
308 | loaderp->getDuration(), MAX_ANIM_DURATION); | 310 | childSetValue("bad_animation_text", out_str.getString()); |
309 | childSetValue("bad_animation_text", LLSD(output_str)); | ||
310 | } | 311 | } |
311 | else | 312 | else |
312 | { | 313 | { |
313 | char* status = loaderp->getStatus(); | 314 | LLUIString out_str = childGetText("failed_file_read"); |
314 | LLString error_string("Unable to read animation file.\n\n"); | 315 | out_str.setArg("[STATUS]", loaderp->getStatus()); // *TODO:Translate |
315 | error_string += LLString(status); | 316 | childSetValue("bad_animation_text", out_str.getString()); |
316 | childSetValue("bad_animation_text", LLSD(error_string)); | ||
317 | } | 317 | } |
318 | } | 318 | } |
319 | 319 | ||
@@ -1155,3 +1155,4 @@ void LLPreviewAnimation::pan(F32 right, F32 up) | |||
1155 | mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f); | 1155 | mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f); |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | |||