diff options
author | Samuel Kolb <skolb@lindenlab.com> | 2009-11-30 09:11:04 -0800 |
---|---|---|
committer | Samuel Kolb <skolb@lindenlab.com> | 2009-11-30 09:11:04 -0800 |
commit | e2699c64a20262f6fbe6c1432294e8428e8cda5d (patch) | |
tree | 5b14a249342021b220df723a91c3e78d2c91f06e /indra/newview/llpreviewscript.cpp | |
parent | 6824800fa0001cd4a23a4f98b099af34435b0e06 (diff) | |
parent | d4e01315e3f39dd14bb2c14f09e4e94749542b06 (diff) |
merge viewer-2-0 into media
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 4e4711f8fb..0362fdbf56 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -45,7 +45,7 @@ #include "llkeyboard.h" #include "lllineeditor.h" #include "llhelp.h" - +#include "llnotificationsutil.h" #include "llresmgr.h" #include "llscrollbar.h" #include "llscrollcontainer.h" @@ -618,14 +618,14 @@ BOOL LLScriptEdCore::canClose() else { // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotifications::instance().add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); return FALSE; } } bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response ) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch( option ) { case 0: // "Yes" @@ -798,7 +798,7 @@ void LLScriptEdCore::onBtnUndoChanges() { if( !mEditor->tryToRevertToPristineState() ) { - LLNotifications::instance().add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, this, _1, _2)); + LLNotificationsUtil::add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, this, _1, _2)); } } @@ -827,7 +827,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data) bool LLScriptEdCore::handleReloadFromServerDialog(const LLSD& notification, const LLSD& response ) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch( option ) { case 0: // "Yes" @@ -1281,7 +1281,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 llwarns << "Problem saving script: " << status << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("SaveScriptFailReason", args); + LLNotificationsUtil::add("SaveScriptFailReason", args); } delete info; } @@ -1319,7 +1319,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d llwarns << "Problem saving LSL Bytecode (Preview)" << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("SaveBytecodeFailReason", args); + LLNotificationsUtil::add("SaveBytecodeFailReason", args); } delete instance_uuid; } @@ -1364,15 +1364,15 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifications::instance().add("ScriptMissing"); + LLNotificationsUtil::add("ScriptMissing"); } else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) { - LLNotifications::instance().add("ScriptNoPermissions"); + LLNotificationsUtil::add("ScriptNoPermissions"); } else { - LLNotifications::instance().add("UnableToLoadScript"); + LLNotificationsUtil::add("UnableToLoadScript"); } preview->mAssetStatus = PREVIEW_ASSET_ERROR; @@ -1605,15 +1605,15 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifications::instance().add("ScriptMissing"); + LLNotificationsUtil::add("ScriptMissing"); } else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) { - LLNotifications::instance().add("ScriptNoPermissions"); + LLNotificationsUtil::add("ScriptNoPermissions"); } else { - LLNotifications::instance().add("UnableToLoadScript"); + LLNotificationsUtil::add("UnableToLoadScript"); } instance->mAssetStatus = PREVIEW_ASSET_ERROR; } @@ -1698,7 +1698,7 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata ) else { runningCheckbox->set(!running); - LLNotifications::instance().add("CouldNotStartStopScript"); + LLNotificationsUtil::add("CouldNotStartStopScript"); } } @@ -1721,7 +1721,7 @@ void LLLiveLSLEditor::onReset(void *userdata) } else { - LLNotifications::instance().add("CouldNotStartStopScript"); + LLNotificationsUtil::add("CouldNotStartStopScript"); } } @@ -1814,7 +1814,7 @@ void LLLiveLSLEditor::saveIfNeeded() LLViewerObject* object = gObjectList.findObject(mObjectUUID); if(!object) { - LLNotifications::instance().add("SaveScriptFailObjectNotFound"); + LLNotificationsUtil::add("SaveScriptFailObjectNotFound"); return; } @@ -1822,7 +1822,7 @@ void LLLiveLSLEditor::saveIfNeeded() { // $NOTE: While the error message may not be exactly correct, // it's pretty close. - LLNotifications::instance().add("SaveScriptFailObjectNotFound"); + LLNotificationsUtil::add("SaveScriptFailObjectNotFound"); return; } @@ -2023,7 +2023,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da llwarns << "Unable to save text for a script." << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("CompileQueueSaveText", args); + LLNotificationsUtil::add("CompileQueueSaveText", args); } else { @@ -2082,7 +2082,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("CompileQueueSaveBytecode", args); + LLNotificationsUtil::add("CompileQueueSaveBytecode", args); } std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,asset_uuid.asString()); |