diff options
author | James Cook <james@lindenlab.com> | 2009-11-25 01:15:50 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-25 01:15:50 -0800 |
commit | cbc0783cd19f096b454cabe47174c97d3d42842b (patch) | |
tree | 96a4596d101c1d205fc4f56b0b54951dd408df80 /indra/newview/llpreviewnotecard.cpp | |
parent | 0e351bedb6ec15ecb4da6073c8db4edc34ccc0ba (diff) |
Created lightweight LLNotificationsUtil::add(), switched most alerts to use it
Cuts number of includes of llnotifications.h from 300+ to 40.
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r-- | indra/newview/llpreviewnotecard.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index b51f7929e3..5d675fcda6 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -43,7 +43,7 @@ #include "llfloaterreg.h" #include "llinventorymodel.h" #include "lllineeditor.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llnotify.h" #include "llresmgr.h" #include "roles_constants.h" @@ -154,7 +154,7 @@ BOOL LLPreviewNotecard::canClose() else { // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotifications::instance().add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); return FALSE; } @@ -331,15 +331,15 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifications::instance().add("NotecardMissing"); + LLNotificationsUtil::add("NotecardMissing"); } else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) { - LLNotifications::instance().add("NotecardNoPermissions"); + LLNotificationsUtil::add("NotecardNoPermissions"); } else { - LLNotifications::instance().add("UnableToLoadNotecard"); + LLNotificationsUtil::add("UnableToLoadNotecard"); } llwarns << "Problem loading notecard: " << status << llendl; @@ -494,7 +494,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data } else { - LLNotifications::instance().add("SaveNotecardFailObjectNotFound"); + LLNotificationsUtil::add("SaveNotecardFailObjectNotFound"); } } // Perform item copy to inventory @@ -520,7 +520,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data llwarns << "Problem saving notecard: " << status << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("SaveNotecardFailReason", args); + LLNotificationsUtil::add("SaveNotecardFailReason", args); } std::string uuid_string; @@ -533,7 +533,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { case 0: // "Yes" |