diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 1dbc3de7e..ae2cfbc28 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -44,6 +44,7 @@ set(llui_SOURCE_FILES llmultislider.cpp llmultisliderctrl.cpp llnotifications.cpp + llnotificationsutil.cpp llpanel.cpp llprogressbar.cpp llradiogroup.cpp @@ -100,7 +101,9 @@ set(llui_HEADER_FILES llmodaldialog.h llmultisliderctrl.h llmultislider.h + llnotificationptr.h llnotifications.h + llnotificationsutil.h llpanel.h llprogressbar.h llradiogroup.h diff --git a/indra/llui/llnotificationptr.h b/indra/llui/llnotificationptr.h new file mode 100644 index 000000000..acc047527 --- /dev/null +++ b/indra/llui/llnotificationptr.h @@ -0,0 +1,35 @@ +/** + * @file llnotificationptr.h + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef LLNOTIFICATIONPTR_H +#define LLNOTIFICATIONPTR_H + +// Many classes just store a single LLNotificationPtr +// and llnotifications.h is very large, so define this ligher header. +#include + +class LLNotification; +typedef boost::shared_ptr LLNotificationPtr; + +#endif diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 509a443e5..999f664a0 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -91,8 +91,9 @@ #include #include -#include #include +#include +#include // we want to minimize external dependencies, but this one is important #include "llsd.h" @@ -101,9 +102,9 @@ // and we need this to manage the notification callbacks #include "llfunctorregistry.h" #include "llui.h" +#include "llxmlnode.h" +#include "llnotificationptr.h" -class LLNotification; -typedef boost::shared_ptr LLNotificationPtr; /***************************************************************************** * Signal and handler declarations diff --git a/indra/llui/llnotificationsutil.cpp b/indra/llui/llnotificationsutil.cpp new file mode 100644 index 000000000..4abc9ca69 --- /dev/null +++ b/indra/llui/llnotificationsutil.cpp @@ -0,0 +1,85 @@ +/** + * @file llnotificationsutil.cpp + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#include "linden_common.h" + +#include "llnotificationsutil.h" + +#include "llnotifications.h" +#include "llsd.h" +#include "llxmlnode.h" // apparently needed to call LLNotifications::instance() + +LLNotificationPtr LLNotificationsUtil::add(const std::string& name) +{ + return LLNotifications::instance().add( + LLNotification::Params(name).substitutions(LLSD()).payload(LLSD())); +} + +LLNotificationPtr LLNotificationsUtil::add(const std::string& name, + const LLSD& substitutions) +{ + return LLNotifications::instance().add( + LLNotification::Params(name).substitutions(substitutions).payload(LLSD())); +} + +LLNotificationPtr LLNotificationsUtil::add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload) +{ + return LLNotifications::instance().add( + LLNotification::Params(name).substitutions(substitutions).payload(payload)); +} + +LLNotificationPtr LLNotificationsUtil::add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + const std::string& functor_name) +{ + return LLNotifications::instance().add( + LLNotification::Params(name).substitutions(substitutions).payload(payload).functor_name(functor_name)); +} + +LLNotificationPtr LLNotificationsUtil::add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + boost::function functor) +{ + return LLNotifications::instance().add( + LLNotification::Params(name).substitutions(substitutions).payload(payload).functor(functor)); +} + +S32 LLNotificationsUtil::getSelectedOption(const LLSD& notification, const LLSD& response) +{ + return LLNotification::getSelectedOption(notification, response); +} + +void LLNotificationsUtil::cancel(LLNotificationPtr pNotif) +{ + LLNotifications::instance().cancel(pNotif); +} + +LLNotificationPtr LLNotificationsUtil::find(LLUUID uuid) +{ + return LLNotifications::instance().find(uuid); +} diff --git a/indra/llui/llnotificationsutil.h b/indra/llui/llnotificationsutil.h new file mode 100644 index 000000000..4093324d0 --- /dev/null +++ b/indra/llui/llnotificationsutil.h @@ -0,0 +1,66 @@ +/** + * @file llnotificationsutil.h + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#ifndef LLNOTIFICATIONSUTIL_H +#define LLNOTIFICATIONSUTIL_H + +// The vast majority of clients of the notifications system just want to add +// a notification to the screen, so define this lightweight public interface +// to avoid including the heavyweight llnotifications.h + +#include "llnotificationptr.h" + +#include + +class LLSD; + +namespace LLNotificationsUtil +{ + LLNotificationPtr add(const std::string& name); + + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions); + + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload); + + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + const std::string& functor_name); + + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + boost::function functor); + + S32 getSelectedOption(const LLSD& notification, const LLSD& response); + + void cancel(LLNotificationPtr pNotif); + + LLNotificationPtr find(LLUUID uuid); +} + +#endif diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 9edc6451a..cc7f7bdcc 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -54,6 +54,7 @@ #include "lluictrlfactory.h" #include "llviewborder.h" #include "llbutton.h" +#include "llnotificationsutil.h" // LLLayoutStack #include "llresizebar.h" @@ -1049,7 +1050,7 @@ void LLPanel::childDisplayNotFound() mNewExpectedMembers.clear(); LLSD args; args["CONTROLS"] = msg; - LLNotifications::instance().add("FloaterNotFound", args); + LLNotificationsUtil::add("FloaterNotFound", args); } void LLPanel::storeRectControl() diff --git a/indra/llui/lluitrans.cpp b/indra/llui/lluitrans.cpp index 920fe6ad0..a60ff370d 100644 --- a/indra/llui/lluitrans.cpp +++ b/indra/llui/lluitrans.cpp @@ -36,6 +36,7 @@ #include "llxmlnode.h" #include "lluictrlfactory.h" #include "llalertdialog.h" +#include "llnotificationsutil.h" #include @@ -93,7 +94,7 @@ std::string LLUITrans::getString(const std::string &xml_desc, const LLStringUtil LLSD args; args["STRING_NAME"] = xml_desc; LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL; - LLNotifications::instance().add("MissingString", args); + LLNotificationsUtil::add("MissingString", args); return xml_desc; } diff --git a/indra/newview/dofloaterhex.cpp b/indra/newview/dofloaterhex.cpp index 90cc9b321..c74aff66e 100644 --- a/indra/newview/dofloaterhex.cpp +++ b/indra/newview/dofloaterhex.cpp @@ -23,6 +23,7 @@ #include "llinventorymodel.h" // gInventory.updateItem #include "llappviewer.h" // System Folders #include "llfloaterperms.h" //get default perms +#include "llnotificationsutil.h" std::list DOFloaterHex::sInstances; S32 DOFloaterHex::sUploadAmount = 10; @@ -291,7 +292,7 @@ void DOFloaterHex::onClickUpload(void* user_data) { LLSD args; args["ERROR_MESSAGE"] = "Couldn't write data to file"; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } delete[] buffer; @@ -366,7 +367,7 @@ void DOFloaterHex::onClickSave(void* user_data) { LLSD args; args["ERROR_MESSAGE"] = "Couldn't write data to file"; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } delete[] buffer; @@ -431,7 +432,7 @@ void DOFloaterHex::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 { LLSD args; args["ERROR_MESSAGE"] = llformat("Upload failed with status %d, also %d", status, ext_status); - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); } } diff --git a/indra/newview/hgfloatertexteditor.cpp b/indra/newview/hgfloatertexteditor.cpp index acd7755ec..044c32040 100644 --- a/indra/newview/hgfloatertexteditor.cpp +++ b/indra/newview/hgfloatertexteditor.cpp @@ -24,6 +24,7 @@ #include "llappviewer.h" // System Folders #include "llfloaterperms.h" //get default perms #include "lllocalinventory.h" +#include "llnotificationsutil.h" std::list HGFloaterTextEditor::sInstances; S32 HGFloaterTextEditor::sUploadAmount = 10; @@ -255,7 +256,7 @@ void HGFloaterTextEditor::onClickUpload(void* user_data) { LLSD args; args["ERROR_MESSAGE"] = "Couldn't write data to file"; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } @@ -328,7 +329,7 @@ void HGFloaterTextEditor::onClickSave(void* user_data) { LLSD args; args["ERROR_MESSAGE"] = "Couldn't write data to file"; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } @@ -391,7 +392,7 @@ void HGFloaterTextEditor::onSaveComplete(const LLUUID& asset_uuid, void* user_da { LLSD args; args["ERROR_MESSAGE"] = llformat("Upload failed with status %d, also %d", status, ext_status); - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); } } diff --git a/indra/newview/hippopanelgrids.cpp b/indra/newview/hippopanelgrids.cpp index e0c40731c..80b57d9bc 100644 --- a/indra/newview/hippopanelgrids.cpp +++ b/indra/newview/hippopanelgrids.cpp @@ -41,7 +41,7 @@ #include "llstartup.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" - +#include "llnotificationsutil.h" // ******************************************************************** @@ -307,13 +307,13 @@ bool HippoPanelGridsImpl::saveCurGrid() HippoGridInfo::sanitizeGridNick(gridnick); childSetValue("gridnick", (gridnick != "")? gridnick: ""); if (gridnick == "") { - LLNotifications::instance().add("GridsNoNick"); + LLNotificationsUtil::add("GridsNoNick"); return false; } if (gHippoGridManager->getGrid(gridnick)) { LLSD args; args["NAME"] = gridnick; - LLNotifications::instance().add("GridExists", args); + LLNotificationsUtil::add("GridExists", args); return false; } @@ -322,7 +322,7 @@ bool HippoPanelGridsImpl::saveCurGrid() if ((loginuri == "") || (loginuri == "")) { LLSD args; args["NAME"] = gridnick; - LLNotifications::instance().add("GridsNoLoginUri", args); + LLNotificationsUtil::add("GridsNoLoginUri", args); return false; } @@ -380,7 +380,7 @@ void HippoPanelGridsImpl::retrieveGridInfo() { std::string loginuri = childGetValue("loginuri"); if ((loginuri == "") || (loginuri == "")) { - LLNotifications::instance().add("GridInfoNoLoginUri"); + LLNotificationsUtil::add("GridInfoNoLoginUri"); return; } @@ -415,7 +415,7 @@ void HippoPanelGridsImpl::retrieveGridInfo() if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl()); if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl()); } else { - LLNotifications::instance().add("GridInfoError"); + LLNotificationsUtil::add("GridInfoError"); } if (cleanupGrid) delete grid; @@ -495,5 +495,5 @@ void HippoPanelGridsImpl::onClickGridInfo(void *data) // static void HippoPanelGridsImpl::onClickHelpRenderCompat(void *data) { - LLNotifications::instance().add("HelpRenderCompat"); + LLNotificationsUtil::add("HelpRenderCompat"); } diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1ae498024..f241eeaec 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -54,6 +54,7 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llchatbar.h" +#include "llnotificationsutil.h" #include "llnotify.h" #include "llparcel.h" #include "llrendersphere.h" @@ -1444,11 +1445,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) if (user_cancel && !mAutoPilotBehaviorName.empty()) { if (mAutoPilotBehaviorName == "Sit") - LLNotifications::instance().add("CancelledSit"); + LLNotificationsUtil::add("CancelledSit"); else if (mAutoPilotBehaviorName == "Attach") - LLNotifications::instance().add("CancelledAttach"); + LLNotificationsUtil::add("CancelledAttach"); else - LLNotifications::instance().add("Cancelled"); + LLNotificationsUtil::add("Cancelled"); } } } diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 852a58e4e..33a61ba3b 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -42,7 +42,7 @@ #include "llinventorybridge.h" #include "llinventoryview.h" #include "llmd5.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "lltexlayer.h" #include "llviewerregion.h" #include "llvoavatar.h" @@ -724,7 +724,7 @@ void LLAgentWearables::onInitialWearableAssetArrived( LLWearable* wearable, void void LLAgentWearables::recoverMissingWearable( EWearableType type ) { // Try to recover by replacing missing wearable with a new one. - LLNotifications::instance().add("ReplacedMissingWearable"); + LLNotificationsUtil::add("ReplacedMissingWearable"); lldebugs << "Wearable " << LLWearable::typeToTypeLabel( type ) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; LLWearable* new_wearable = gWearableList.createNewWearable(type); @@ -1104,7 +1104,7 @@ void LLAgentWearables::removeWearable( EWearableType type ) LLSD payload; payload["wearable_type"] = (S32)type; // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotifications::instance().add("WearableSave", LLSD(), payload, &LLAgentWearables::onRemoveWearableDialog); + LLNotificationsUtil::add("WearableSave", LLSD(), payload, &LLAgentWearables::onRemoveWearableDialog); return; } else @@ -1117,7 +1117,7 @@ void LLAgentWearables::removeWearable( EWearableType type ) // static bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LLSD& response ) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); EWearableType type = (EWearableType)notification["payload"]["wearable_type"].asInteger(); switch( option ) { @@ -1220,7 +1220,7 @@ static bool isFirstPhysicsWearable(EWearableType type, LLInventoryItem *new_item } } }; - LLNotifications::instance().add("FirstPhysicsWearable",LLSD(),LLSD(),boost::bind(WearableDelayedCallback::setDelayedWearable, _1, _2, new_item->getUUID(),new_wearable)); + LLNotificationsUtil::add("FirstPhysicsWearable",LLSD(),LLSD(),boost::bind(WearableDelayedCallback::setDelayedWearable, _1, _2, new_item->getUUID(),new_wearable)); return true; } return false; @@ -1384,7 +1384,7 @@ void LLAgentWearables::setWearableItem( LLInventoryItem* new_item, LLWearable* n // Bring up modal dialog: Save changes? Yes, No, Cancel LLSD payload; payload["item_id"] = new_item->getUUID(); - LLNotifications::instance().add( "WearableSave", LLSD(), payload, boost::bind(LLAgentWearables::onSetWearableDialog, _1, _2, new_wearable)); + LLNotificationsUtil::add( "WearableSave", LLSD(), payload, boost::bind(LLAgentWearables::onSetWearableDialog, _1, _2, new_wearable)); return; } } @@ -1395,7 +1395,7 @@ void LLAgentWearables::setWearableItem( LLInventoryItem* new_item, LLWearable* n // static bool LLAgentWearables::onSetWearableDialog( const LLSD& notification, const LLSD& response, LLWearable* wearable ) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLInventoryItem* new_item = gInventory.getItem( notification["payload"]["item_id"].asUUID()); if( !new_item ) { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f1010adf2..a9ab8d1d0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -93,6 +93,8 @@ #include "lldiriterator.h" #include "llimagej2c.h" #include "llprimitive.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include #if LL_WINDOWS @@ -867,7 +869,7 @@ bool LLAppViewer::init() if (LLFeatureManager::getInstance()->getGPUClass() == GPU_CLASS_UNKNOWN) { - LLNotifications::instance().add("UnknownGPU"); + LLNotificationsUtil::add("UnknownGPU"); } if(unsupported) @@ -876,7 +878,7 @@ bool LLAppViewer::init() || gSavedSettings.getBOOL("WarnUnsupportedHardware")) { args["MINSPECS"] = minSpecs; - LLNotifications::instance().add("UnsupportedHardware", args ); + LLNotificationsUtil::add("UnsupportedHardware", args ); } } @@ -2925,7 +2927,7 @@ void LLAppViewer::requestQuit() static bool finish_quit(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { @@ -2942,7 +2944,9 @@ void LLAppViewer::userQuit() requestQuit(); } else - LLNotifications::instance().add("ConfirmQuit"); + { + LLNotificationsUtil::add("ConfirmQuit"); + } } static bool finish_early_exit(const LLSD& notification, const LLSD& response) @@ -2955,7 +2959,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) { llwarns << "app_early_exit: " << name << llendl; gDoDisconnect = TRUE; - LLNotifications::instance().add(name, substitutions, LLSD(), finish_early_exit); + LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit); } @@ -3356,7 +3360,7 @@ const std::string& LLAppViewer::getWindowTitle() const // Callback from a dialog indicating user was logged out. bool finish_disconnect(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (1 == option) { @@ -3396,12 +3400,12 @@ void LLAppViewer::forceDisconnect(const std::string& mesg) { // Tell users what happened args["ERROR_MESSAGE"] = big_reason; - LLNotifications::instance().add("ErrorMessage", args, LLSD(), &finish_forced_disconnect); + LLNotificationsUtil::add("ErrorMessage", args, LLSD(), &finish_forced_disconnect); } else { args["MESSAGE"] = big_reason; - LLNotifications::instance().add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect ); + LLNotificationsUtil::add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect ); } } diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 86334a241..a121d5556 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -60,6 +60,7 @@ // library includes #include "lleconomy.h" #include "llfocusmgr.h" +#include "llnotificationsutil.h" #include "llscrolllistctrl.h" #include "llsdserialize.h" @@ -118,14 +119,14 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason) args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); args["REASON"] = "Error in upload request. Please visit " "http://secondlife.com/support for help fixing this problem."; - LLNotifications::instance().add("CannotUploadReason", args); + LLNotificationsUtil::add("CannotUploadReason", args); break; case 500: default: args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); args["REASON"] = "The server is experiencing unexpected " "difficulties."; - LLNotifications::instance().add("CannotUploadReason", args); + LLNotificationsUtil::add("CannotUploadReason", args); break; } LLUploadDialog::modalUploadFinished(); @@ -188,7 +189,7 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content) LLSD args; args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); args["REASON"] = content["message"].asString(); - LLNotifications::instance().add("CannotUploadReason", args); + LLNotificationsUtil::add("CannotUploadReason", args); } } @@ -232,7 +233,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) LLSD args; args["AMOUNT"] = llformat("%d", expected_upload_cost); args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); - LLNotifications::instance().add("UploadPayment", args); + LLNotificationsUtil::add("UploadPayment", args); } // Actually add the upload to viewer inventory diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 0f591c968..97206d2c0 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -53,7 +53,8 @@ #include "llbutton.h" //#include "llinventory.h" #include "llinventorymodel.h" -#include "llnotify.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llresmgr.h" #include "llimview.h" #include "llviewercontrol.h" @@ -656,11 +657,11 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg) payload["from_id"] = agent_id; if(LLRelationship::GRANT_MODIFY_OBJECTS & new_rights) { - LLNotifications::instance().add("GrantedModifyRights",args, payload); + LLNotificationsUtil::add("GrantedModifyRights",args, payload); } else { - LLNotifications::instance().add("RevokedModifyRights",args, payload); + LLNotificationsUtil::add("RevokedModifyRights",args, payload); } } (mBuddyInfo[agent_id])->setRightsFrom(new_rights); @@ -748,7 +749,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, } // Popup a notify box with online status of this agent - LLNotificationPtr notification = LLNotifications::instance().add(online ? "FriendOnline" : "FriendOffline", args, payload); + LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args, payload); // If there's an open IM session with this agent, send a notification there too. LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 3d01eeff3..97831b4b2 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -57,6 +57,7 @@ #include "llresmgr.h" #include "llbutton.h" #include "lldir.h" +#include "llnotificationsutil.h" #include "llfloaterchat.h" #include "llviewerstats.h" #include "lluictrlfactory.h" @@ -527,7 +528,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use llwarns << "Unable to save text for script." << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("CompileQueueSaveText", args); + LLNotificationsUtil::add("CompileQueueSaveText", args); } } @@ -548,7 +549,7 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* llwarns << "Unable to save bytecode for script." << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("CompileQueueSaveBytecode", args); + LLNotificationsUtil::add("CompileQueueSaveBytecode", args); } delete data; data = NULL; diff --git a/indra/newview/llconfirmationmanager.cpp b/indra/newview/llconfirmationmanager.cpp index 00ffff79a..4b7333995 100644 --- a/indra/newview/llconfirmationmanager.cpp +++ b/indra/newview/llconfirmationmanager.cpp @@ -37,9 +37,9 @@ #include "lluictrlfactory.h" // viewer includes -#include "llviewerwindow.h" -#include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llstring.h" +#include "llxmlnode.h" LLConfirmationManager::ListenerBase::~ListenerBase() { @@ -48,7 +48,7 @@ LLConfirmationManager::ListenerBase::~ListenerBase() static bool onConfirmAlert(const LLSD& notification, const LLSD& response, LLConfirmationManager::ListenerBase* listener) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { listener->confirmed(""); @@ -61,7 +61,7 @@ static bool onConfirmAlert(const LLSD& notification, const LLSD& response, LLCon static bool onConfirmAlertPassword(const LLSD& notification, const LLSD& response, LLConfirmationManager::ListenerBase* listener) { std::string text = response["message"].asString(); - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { @@ -83,11 +83,11 @@ void LLConfirmationManager::confirm(Type type, switch (type) { case TYPE_CLICK: - LLNotifications::instance().add("ConfirmPurchase", args, LLSD(), boost::bind(onConfirmAlert, _1, _2, listener)); + LLNotificationsUtil::add("ConfirmPurchase", args, LLSD(), boost::bind(onConfirmAlert, _1, _2, listener)); break; case TYPE_PASSWORD: - LLNotifications::instance().add("ConfirmPurchasePassword", args, LLSD(), boost::bind(onConfirmAlertPassword, _1, _2, listener)); + LLNotificationsUtil::add("ConfirmPurchasePassword", args, LLSD(), boost::bind(onConfirmAlertPassword, _1, _2, listener)); break; case TYPE_NONE: default: diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp index 1af94b350..ead377deb 100644 --- a/indra/newview/lldelayedgestureerror.cpp +++ b/indra/newview/lldelayedgestureerror.cpp @@ -33,8 +33,9 @@ #include "llviewerprecompiledheaders.h" #include "lldelayedgestureerror.h" + #include -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llcallbacklist.h" #include "llinventory.h" #include "llviewerinventory.h" @@ -119,7 +120,7 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok) } - LLNotifications::instance().add(ent.mNotifyName, args); + LLNotificationsUtil::add(ent.mNotifyName, args); return true; } diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index f39e234ee..20422369d 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -34,6 +34,7 @@ #include "lleventnotifier.h" +#include "llnotificationsutil.h" #include "message.h" #include "llnotify.h" @@ -84,7 +85,7 @@ void LLEventNotifier::update() LLSD args; args["NAME"] = np->getEventName(); args["DATE"] = np->getEventDateStr(); - LLNotifications::instance().add("EventNotification", args, LLSD(), + LLNotificationsUtil::add("EventNotification", args, LLSD(), boost::bind(&LLEventNotifier::handleResponse, this, np->getEventID(), np->getEventPosGlobal(), _1, _2)); remove(np->getEventID()); } @@ -95,7 +96,7 @@ void LLEventNotifier::update() bool LLEventNotifier::handleResponse(U32 eventId, LLVector3d eventPos, const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch (option) { case 0: diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 4c7cedf9b..d59167ddf 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -36,6 +36,8 @@ // library includes #include "indra_constants.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" // viewer includes #include "llagent.h" // for gAgent.inPrelude() @@ -94,7 +96,7 @@ void LLFirstUse::useBalanceIncrease(S32 delta) LLSD args; args["AMOUNT"] = llformat("%d",delta); args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); - LLNotifications::instance().add("FirstBalanceIncrease", args); + LLNotificationsUtil::add("FirstBalanceIncrease", args); } } @@ -109,7 +111,7 @@ void LLFirstUse::useBalanceDecrease(S32 delta) LLSD args; args["AMOUNT"] = llformat("%d",-delta); args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); - LLNotifications::instance().add("FirstBalanceDecrease", args); + LLNotificationsUtil::add("FirstBalanceDecrease", args); } } @@ -123,7 +125,7 @@ void LLFirstUse::useSit() //{ // gSavedSettings.setWarning("FirstSit", FALSE); // - // LLNotifications::instance().add("FirstSit"); + // LLNotificationsUtil::add("FirstSit"); //} } @@ -134,7 +136,7 @@ void LLFirstUse::useMap() { gSavedSettings.setWarning("FirstMap", FALSE); - LLNotifications::instance().add("FirstMap"); + LLNotificationsUtil::add("FirstMap"); } } @@ -151,7 +153,7 @@ void LLFirstUse::useBuild() { gSavedSettings.setWarning("FirstBuild", FALSE); - LLNotifications::instance().add("FirstBuild"); + LLNotificationsUtil::add("FirstBuild"); } } @@ -162,7 +164,7 @@ void LLFirstUse::useLeftClickNoHit() { gSavedSettings.setWarning("FirstLeftClickNoHit", FALSE); - LLNotifications::instance().add("FirstLeftClickNoHit"); + LLNotificationsUtil::add("FirstLeftClickNoHit"); } } @@ -176,7 +178,7 @@ void LLFirstUse::useTeleport() { gSavedSettings.setWarning("FirstTeleport", FALSE); - LLNotifications::instance().add("FirstTeleport"); + LLNotificationsUtil::add("FirstTeleport"); } } } @@ -192,7 +194,7 @@ void LLFirstUse::useOverrideKeys() { gSavedSettings.setWarning("FirstOverrideKeys", FALSE); - LLNotifications::instance().add("FirstOverrideKeys"); + LLNotificationsUtil::add("FirstOverrideKeys"); } } } @@ -210,7 +212,7 @@ void LLFirstUse::useAO() { gSavedSettings.setWarning("FirstAO", FALSE); - LLNotifications::instance().add("FirstAO"); + LLNotificationsUtil::add("FirstAO"); } } @@ -221,7 +223,7 @@ void LLFirstUse::useAppearance() { gSavedSettings.setWarning("FirstAppearance", FALSE); - LLNotifications::instance().add("FirstAppearance"); + LLNotificationsUtil::add("FirstAppearance"); } } @@ -232,7 +234,7 @@ void LLFirstUse::useInventory() { gSavedSettings.setWarning("FirstInventory", FALSE); - LLNotifications::instance().add("FirstInventory"); + LLNotificationsUtil::add("FirstInventory"); } } @@ -247,7 +249,7 @@ void LLFirstUse::useSandbox() LLSD args; args["HOURS"] = llformat("%d",SANDBOX_CLEAN_FREQ); args["TIME"] = llformat("%d",SANDBOX_FIRST_CLEAN_HOUR); - LLNotifications::instance().add("FirstSandbox", args); + LLNotificationsUtil::add("FirstSandbox", args); } } @@ -258,7 +260,7 @@ void LLFirstUse::useFlexible() { gSavedSettings.setWarning("FirstFlexible", FALSE); - LLNotifications::instance().add("FirstFlexible"); + LLNotificationsUtil::add("FirstFlexible"); } } @@ -269,7 +271,7 @@ void LLFirstUse::useDebugMenus() { gSavedSettings.setWarning("FirstDebugMenus", FALSE); - LLNotifications::instance().add("FirstDebugMenus"); + LLNotificationsUtil::add("FirstDebugMenus"); } } @@ -280,7 +282,7 @@ void LLFirstUse::useSculptedPrim() { gSavedSettings.setWarning("FirstSculptedPrim", FALSE); - LLNotifications::instance().add("FirstSculptedPrim"); + LLNotificationsUtil::add("FirstSculptedPrim"); } } @@ -292,7 +294,7 @@ void LLFirstUse::useMedia() { gSavedSettings.setWarning("FirstMedia", FALSE); - LLNotifications::instance().add("FirstMedia"); + LLNotificationsUtil::add("FirstMedia"); } } diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 2fcc7a135..73627253e 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -37,6 +37,7 @@ #include "llbvhloader.h" #include "lldatapacker.h" #include "lldir.h" +#include "llnotificationsutil.h" #include "llvfile.h" #include "llapr.h" #include "llstring.h" @@ -1444,7 +1445,7 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata) else { llwarns << "Failure writing animation data." << llendl; - LLNotifications::instance().add("WriteAnimationFail"); + LLNotificationsUtil::add("WriteAnimationFail"); } } diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 2fb0fe640..c4121fae9 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -46,7 +46,8 @@ #include "llagent.h" #include "llcombobox.h" -#include "llnotify.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llviewertexturelist.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" @@ -240,7 +241,7 @@ void LLFloaterAuction::onClickOK(void* data) FALSE); self->getWindow()->incBusyCount(); - LLNotifications::instance().add("UploadingAuctionSnapshot"); + LLNotificationsUtil::add("UploadingAuctionSnapshot"); } LLMessageSystem* msg = gMessageSystem; @@ -279,13 +280,13 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status if (0 == status) { - LLNotifications::instance().add("UploadWebSnapshotDone"); + LLNotificationsUtil::add("UploadWebSnapshotDone"); } else { LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("UploadAuctionSnapshotFail", args); + LLNotificationsUtil::add("UploadAuctionSnapshotFail", args); } } @@ -300,12 +301,12 @@ void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status if (0 == status) { - LLNotifications::instance().add("UploadSnapshotDone"); + LLNotificationsUtil::add("UploadSnapshotDone"); } else { LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("UploadAuctionSnapshotFail", args); + LLNotificationsUtil::add("UploadAuctionSnapshotFail", args); } } diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 23c302dbf..b02ca306d 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -26,6 +26,7 @@ #include "llscrolllistctrl.h" #include "llradiogroup.h" #include "llviewercontrol.h" +#include "llnotificationsutil.h" #include "llvoavatar.h" #include "llimview.h" @@ -1274,7 +1275,7 @@ void LLFloaterAvatarList::sound_trigger_hook(LLMessageSystem* msg,void **) { LLSD args; args["MESSAGE"] = "An object owned by you has request the keys from your radar.\nWould you like to enable announcing keys to objects in the sim?"; - LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), onConfirmRadarChatKeys); + LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), onConfirmRadarChatKeys); } } } @@ -1502,7 +1503,7 @@ void LLFloaterAvatarList::onClickFreeze(void *userdata) LLSD args; LLSD payload; args["AVATAR_NAME"] = ((LLFloaterAvatarList*)userdata)->getSelectedNames(); - LLNotifications::instance().add("FreezeAvatarFullname", args, payload, callbackFreeze); + LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, callbackFreeze); } //static @@ -1511,7 +1512,7 @@ void LLFloaterAvatarList::onClickEject(void *userdata) LLSD args; LLSD payload; args["AVATAR_NAME"] = ((LLFloaterAvatarList*)userdata)->getSelectedNames(); - LLNotifications::instance().add("EjectAvatarFullname", args, payload, callbackEject); + LLNotificationsUtil::add("EjectAvatarFullname", args, payload, callbackEject); } //static @@ -1550,7 +1551,7 @@ void LLFloaterAvatarList::onClickEjectFromEstate(void *userdata) LLSD args; LLSD payload; args["EVIL_USER"] = ((LLFloaterAvatarList*)userdata)->getSelectedNames(); - LLNotifications::instance().add("EstateKickUser", args, payload, callbackEjectFromEstate); + LLNotificationsUtil::add("EstateKickUser", args, payload, callbackEjectFromEstate); } //static diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 1dc8a30d3..a79527456 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -53,6 +53,7 @@ #include "llviewerstats.h" #include "lluictrlfactory.h" #include "llselectmgr.h" +#include "llnotificationsutil.h" #include "roles_constants.h" // for GP_OBJECT_MANIPULATE @@ -153,7 +154,7 @@ void LLFloaterBulkPermission::onApplyBtn(void* user_data) void LLFloaterBulkPermission::onHelpBtn(void* user_data) { - LLNotifications::instance().add("HelpBulkPermission"); + LLNotificationsUtil::add("HelpBulkPermission"); } void LLFloaterBulkPermission::onCloseBtn(void* user_data) diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index ade709dac..b7de17cc6 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -45,6 +45,7 @@ #include "llinventorymodel.h" // for gInventory #include "llinventorydefines.h" #include "llinventoryview.h" // for get_item_icon +#include "llnotificationsutil.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" #include "llviewerobject.h" @@ -90,7 +91,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) if (selection->getRootObjectCount() != 1) { - LLNotifications::instance().add("BuyOneObjectOnly"); + LLNotificationsUtil::add("BuyOneObjectOnly"); return; } @@ -140,7 +141,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { - LLNotifications::instance().add("BuyObjectOneOwner"); + LLNotificationsUtil::add("BuyObjectOneOwner"); return; } diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 5cef261e5..cb72659cb 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -48,6 +48,7 @@ #include "llinventorymodel.h" // for gInventory #include "llinventorydefines.h" #include "llinventoryview.h" // for get_item_icon +#include "llnotificationsutil.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" #include "llviewerobject.h" @@ -87,7 +88,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) if (selection->getRootObjectCount() != 1) { - LLNotifications::instance().add("BuyContentsOneOnly"); + LLNotificationsUtil::add("BuyContentsOneOnly"); return; } @@ -117,7 +118,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { - LLNotifications::instance().add("BuyContentsOneOwner"); + LLNotificationsUtil::add("BuyContentsOneOwner"); return; } diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 2d96c8228..bd8cd5286 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -47,7 +47,7 @@ #include "llframetimer.h" #include "lliconctrl.h" #include "lllineeditor.h" -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "llstatusbar.h" #include "lltextbox.h" @@ -215,7 +215,7 @@ void LLFloaterBuyLand::buyLand( { if(is_for_group && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED)) { - LLNotifications::instance().add("OnlyOfficerCanBuyLand"); + LLNotificationsUtil::add("OnlyOfficerCanBuyLand"); return; } @@ -991,7 +991,7 @@ BOOL LLFloaterBuyLandUI::canClose() if (!can_close) { // explain to user why they can't do this, see DEV-9605 - LLNotifications::instance().add("CannotCloseFloaterBuyLand"); + LLNotificationsUtil::add("CannotCloseFloaterBuyLand"); } return can_close; } diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 36853413c..b199cb939 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -75,6 +75,7 @@ #include "llviewermessage.h" #include "llviewercontrol.h" #include "lluictrlfactory.h" +#include "llnotificationsutil.h" #include "statemachine/aifilepicker.h" #include "hippogridmanager.h" @@ -708,7 +709,7 @@ void LLPanelEditWearable::onBtnCreateNew( void* userdata ) LLPanelEditWearable* self = (LLPanelEditWearable*) userdata; LLSD payload; payload["wearable_type"] = (S32)self->getType(); - LLNotifications::instance().add("AutoWearNewClothing", LLSD(), payload, &onSelectAutoWearOption); + LLNotificationsUtil::add("AutoWearNewClothing", LLSD(), payload, &onSelectAutoWearOption); } bool LLPanelEditWearable::onSelectAutoWearOption(const LLSD& notification, const LLSD& response) @@ -2723,7 +2724,7 @@ void LLFloaterCustomize::askToSaveIfDirty( void(*next_step_callback)(BOOL procee mNextStepAfterSaveUserdata = userdata; // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotifications::instance().add("SaveClothingBodyChanges", LLSD(), LLSD(), + LLNotificationsUtil::add("SaveClothingBodyChanges", LLSD(), LLSD(), boost::bind(&LLFloaterCustomize::onSaveDialog, this, _1, _2)); return; } diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp index c360c5c73..0799ca330 100644 --- a/indra/newview/llfloaterdaycycle.cpp +++ b/indra/newview/llfloaterdaycycle.cpp @@ -41,6 +41,8 @@ #include "llsliderctrl.h" #include "llmultislider.h" #include "llmultisliderctrl.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llspinctrl.h" #include "llcheckboxctrl.h" #include "lluictrlfactory.h" @@ -315,7 +317,7 @@ void LLFloaterDayCycle::onClose(bool app_quitting) void LLFloaterDayCycle::onNewPreset(void* userData) { - LLNotifications::instance().add("NewDaycyclePreset", LLSD(), LLSD(), newPromptCallback); + LLNotificationsUtil::add("NewDaycyclePreset", LLSD(), LLSD(), newPromptCallback); } void LLFloaterDayCycle::onSavePreset(void* userData) @@ -335,14 +337,14 @@ void LLFloaterDayCycle::onSavePreset(void* userData) comboBox->getSelectedItemLabel()); if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets")) { - LLNotifications::instance().add("WLNoEditDefault"); + LLNotificationsUtil::add("WLNoEditDefault"); return; } LLWLParamManager::getInstance()->mCurParams.mName = comboBox->getSelectedItemLabel(); - LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); + LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); } bool LLFloaterDayCycle::saveAlertCallback(const LLSD& notification, const LLSD& response) @@ -370,7 +372,7 @@ void LLFloaterDayCycle::onDeletePreset(void* userData) LLSD args; args["SKY"] = combo_box->getSelectedValue().asString(); - LLNotifications::instance().add("WLDeletePresetAlert", args, LLSD(), + LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(), boost::bind(&LLFloaterDayCycle::deleteAlertCallback, sDayCycle, _1, _2)); } @@ -401,7 +403,7 @@ bool LLFloaterDayCycle::deleteAlertCallback(const LLSD& notification, const LLSD std::set::iterator sIt = sDefaultPresets.find(name); if(sIt != sDefaultPresets.end()) { - LLNotifications::instance().add("WLNoEditDefault"); + LLNotificationsUtil::add("WLNoEditDefault"); return false; } @@ -489,7 +491,7 @@ bool LLFloaterDayCycle::newPromptCallback(const LLSD& notification, const LLSD& } else { - LLNotifications::instance().add("ExistsSkyPresetAlert"); + LLNotificationsUtil::add("ExistsSkyPresetAlert"); } } return false; diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 25d103c61..1eb0ca856 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -29,7 +29,7 @@ #include "llviewerprecompiledheaders.h" #include "llfloater.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llviewerdisplayname.h" #include "llnotify.h" @@ -152,7 +152,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success, // to percolate. LLSD args; args["DISPLAY_NAME"] = content["display_name"]; - LLNotifications::instance().add("SetDisplayNameSuccess", args); + LLNotificationsUtil::add("SetDisplayNameSuccess", args); // Re-fetch my name, as it may have been sanitized by the service //LLAvatarNameCache::get(getAvatarId(), @@ -180,12 +180,12 @@ void LLFloaterDisplayName::onCacheSetName(bool success, { LLSD args; args["MESSAGE"] = error_desc[lang_code].asString(); - LLNotifications::instance().add("GenericAlert", args); + LLNotificationsUtil::add("GenericAlert", args); return; } // No specific error, throw a generic one - LLNotifications::instance().add("SetDisplayNameFailedGeneric"); + LLNotificationsUtil::add("SetDisplayNameFailedGeneric"); } void LLFloaterDisplayName::onCancel(void* data) @@ -204,7 +204,7 @@ void LLFloaterDisplayName::onReset(void* data) } else { - LLNotifications::instance().add("SetDisplayNameFailedGeneric"); + LLNotificationsUtil::add("SetDisplayNameFailedGeneric"); } self->setVisible(false); @@ -219,7 +219,7 @@ void LLFloaterDisplayName::onSave(void* data) if (display_name_utf8.compare(display_name_confirm)) { - LLNotifications::instance().add("SetDisplayNameMismatch"); + LLNotificationsUtil::add("SetDisplayNameMismatch"); return; } @@ -229,7 +229,7 @@ void LLFloaterDisplayName::onSave(void* data) { LLSD args; args["LENGTH"] = llformat("%d", DISPLAY_NAME_MAX_LENGTH); - LLNotifications::instance().add("SetDisplayNameFailedLength", args); + LLNotificationsUtil::add("SetDisplayNameFailedLength", args); return; } @@ -240,7 +240,7 @@ void LLFloaterDisplayName::onSave(void* data) } else { - LLNotifications::instance().add("SetDisplayNameFailedGeneric"); + LLNotificationsUtil::add("SetDisplayNameFailedGeneric"); } self->setVisible(false); diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp index 608078119..03eaa4ac5 100644 --- a/indra/newview/llfloaterfriends.cpp +++ b/indra/newview/llfloaterfriends.cpp @@ -55,7 +55,7 @@ #include "llfloateravatarinfo.h" #include "llinventorymodel.h" #include "llnamelistctrl.h" -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llresmgr.h" #include "llimview.h" #include "lluictrlfactory.h" @@ -820,7 +820,7 @@ void LLPanelFriends::onMaximumSelect(void* user_data) { LLSD args; args["MAX_SELECT"] = llformat("%d", MAX_FRIEND_SELECT); - LLNotifications::instance().add("MaxListSelectMessage", args); + LLNotificationsUtil::add("MaxListSelectMessage", args); }; // static @@ -942,7 +942,7 @@ void LLPanelFriends::requestFriendship(const LLUUID& target_id, const std::strin // static bool LLPanelFriends::callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { requestFriendship(notification["payload"]["id"].asUUID(), @@ -985,7 +985,7 @@ void LLPanelFriends::requestFriendshipDialog(const LLUUID& id, { if(id == gAgentID) { - LLNotifications::instance().add("AddSelfFriend"); + LLNotificationsUtil::add("AddSelfFriend"); return; } @@ -999,11 +999,11 @@ void LLPanelFriends::requestFriendshipDialog(const LLUUID& id, { // Old and busted server version, doesn't support friend // requests with messages. - LLNotifications::instance().add("AddFriend", args, payload, &callbackAddFriend); + LLNotificationsUtil::add("AddFriend", args, payload, &callbackAddFriend); } else { - LLNotifications::instance().add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage); + LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage); } } @@ -1325,14 +1325,14 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command if (command == GRANT) { - LLNotifications::instance().add("GrantModifyRights", + LLNotificationsUtil::add("GrantModifyRights", args, LLSD(), boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights)); } else { - LLNotifications::instance().add("RevokeModifyRights", + LLNotificationsUtil::add("RevokeModifyRights", args, LLSD(), boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights)); @@ -1342,14 +1342,14 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command { if (command == GRANT) { - LLNotifications::instance().add("GrantModifyRightsMultiple", + LLNotificationsUtil::add("GrantModifyRightsMultiple", args, LLSD(), boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights)); } else { - LLNotifications::instance().add("RevokeModifyRightsMultiple", + LLNotificationsUtil::add("RevokeModifyRightsMultiple", args, LLSD(), boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights)); @@ -1360,7 +1360,7 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command bool LLPanelFriends::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(0 == option) { sendRightsGrant(*rights); @@ -1504,7 +1504,7 @@ void LLPanelFriends::sendRightsGrant(rights_map_t& ids) // static bool LLPanelFriends::handleRemove(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); const LLSD& ids = notification["payload"]["ids"]; for(LLSD::array_const_iterator itr = ids.beginArray(); itr != ids.endArray(); ++itr) diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index f918e8a46..9eff1a2c4 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -39,6 +39,7 @@ #include "llframetimer.h" #include "llgl.h" #include "llhost.h" +#include "llnotificationsutil.h" #include "llregionflags.h" #include "llstring.h" #include "message.h" @@ -931,7 +932,7 @@ void LLPanelGridTools::onClickKickAll(void* userdata) gFloaterView->getNewFloaterPosition(&left, &top); LLRect rect(left, top, left+400, top-300); - LLNotifications::instance().add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick); + LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick); } @@ -941,7 +942,7 @@ bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& respons { LLSD payload; payload["kick_message"] = response["message"].asString(); - LLNotifications::instance().add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick); + LLNotificationsUtil::add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick); } return false; } @@ -973,7 +974,7 @@ bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response // static void LLPanelGridTools::onClickFlushMapVisibilityCaches(void* data) { - LLNotifications::instance().add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm); + LLNotificationsUtil::add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm); } // static @@ -1435,7 +1436,7 @@ void LLPanelRequestTools::onClickRequest(void* data) void terrain_download_done(void** data, S32 status, LLExtStat ext_status) { - LLNotifications::instance().add("TerrainDownloaded"); + LLNotificationsUtil::add("TerrainDownloaded"); } diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 72455bb8b..0e2f8d6d0 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -54,6 +54,7 @@ #include "llalertdialog.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" +#include "llnotificationsutil.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" @@ -425,7 +426,7 @@ void LLPanelGroups::leave() args["GROUP"] = gAgent.mGroups.get(i).mName; LLSD payload; payload["group_id"] = group_id; - LLNotifications::instance().add("GroupLeaveConfirmMember", args, payload, callbackLeaveGroup); + LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, callbackLeaveGroup); } } } diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 6324b5656..33fbec1d4 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -40,6 +40,7 @@ #include "llalertdialog.h" // Linden libs +#include "llnotificationsutil.h" #include "lluictrlfactory.h" // statics @@ -125,7 +126,7 @@ void LLFloaterHUD::showHUD() // do not build the floater if there the url is empty if (gSavedSettings.getString("TutorialURL") == "") { - LLNotifications::instance().add("TutorialNotFound"); + LLNotificationsUtil::add("TutorialNotFound"); return; } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 57d5a004e..6ccc45376 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -39,6 +39,7 @@ #include "llcachename.h" #include "llfocusmgr.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "message.h" #include "lluserauth.h" @@ -932,7 +933,7 @@ void LLPanelLandGeneral::onClickBuyPass(void* data) args["PARCEL_NAME"] = parcel_name; args["TIME"] = time; - LLNotifications::instance().add("LandBuyPass", args, LLSD(), cbBuyPass); + LLNotificationsUtil::add("LandBuyPass", args, LLSD(), cbBuyPass); } // static @@ -944,7 +945,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data) { if(parcelp->getForSale()) { - LLNotifications::instance().add("CannotStartAuctionAlreadyForSale"); + LLNotificationsUtil::add("CannotStartAuctionAlreadyForSale"); } else { @@ -956,7 +957,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data) // static bool LLPanelLandGeneral::cbBuyPass(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (0 == option) { // User clicked OK @@ -1303,7 +1304,7 @@ void send_return_objects_message(S32 parcel_local_id, S32 return_type, bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLParcel *parcel = mParcel->getParcel(); if (0 == option) { @@ -1313,14 +1314,14 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co LLSD args; if (owner_id == gAgentID) { - LLNotifications::instance().add("OwnedObjectsReturned"); + LLNotificationsUtil::add("OwnedObjectsReturned"); } else { std::string full_name; gCacheName->getFullName(owner_id, full_name); args["NAME"] = full_name; - LLNotifications::instance().add("OtherObjectsReturned", args); + LLNotificationsUtil::add("OtherObjectsReturned", args); } send_return_objects_message(parcel->getLocalID(), RT_OWNER); } @@ -1334,7 +1335,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLParcel *parcel = mParcel->getParcel(); if (0 == option) { @@ -1344,7 +1345,7 @@ bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, co gCacheName->getGroupName(parcel->getGroupID(), group_name); LLSD args; args["GROUPNAME"] = group_name; - LLNotifications::instance().add("GroupObjectsReturned", args); + LLNotificationsUtil::add("GroupObjectsReturned", args); send_return_objects_message(parcel->getLocalID(), RT_GROUP); } } @@ -1356,13 +1357,13 @@ bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, co bool LLPanelLandObjects::callbackReturnOtherObjects(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLParcel *parcel = mParcel->getParcel(); if (0 == option) { if (parcel) { - LLNotifications::instance().add("UnOwnedObjectsReturned"); + LLNotificationsUtil::add("UnOwnedObjectsReturned"); send_return_objects_message(parcel->getLocalID(), RT_OTHER); } } @@ -1374,7 +1375,7 @@ bool LLPanelLandObjects::callbackReturnOtherObjects(const LLSD& notification, co bool LLPanelLandObjects::callbackReturnOwnerList(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLParcel *parcel = mParcel->getParcel(); if (0 == option) { @@ -1388,12 +1389,12 @@ bool LLPanelLandObjects::callbackReturnOwnerList(const LLSD& notification, const if (mSelectedIsGroup) { args["GROUPNAME"] = mSelectedName; - LLNotifications::instance().add("GroupObjectsReturned", args); + LLNotificationsUtil::add("GroupObjectsReturned", args); } else { args["NAME"] = mSelectedName; - LLNotifications::instance().add("OtherObjectsReturned2", args); + LLNotificationsUtil::add("OtherObjectsReturned2", args); } send_return_objects_message(parcel->getLocalID(), RT_LIST, &(mSelectedOwners)); @@ -1430,11 +1431,11 @@ void LLPanelLandObjects::onClickReturnOwnerList(void* userdata) args["N"] = llformat("%d",self->mSelectedCount); if (self->mSelectedIsGroup) { - LLNotifications::instance().add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2)); } else { - LLNotifications::instance().add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2)); } } @@ -1659,14 +1660,14 @@ void LLPanelLandObjects::onClickReturnOwnerObjects(void* userdata) if (owner_id == gAgent.getID()) { - LLNotifications::instance().add("ReturnObjectsOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2)); } else { std::string name; gCacheName->getFullName(owner_id, name); args["NAME"] = name; - LLNotifications::instance().add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2)); } } @@ -1687,7 +1688,7 @@ void LLPanelLandObjects::onClickReturnGroupObjects(void* userdata) args["N"] = llformat("%d", parcel->getGroupPrimCount()); // create and show confirmation textbox - LLNotifications::instance().add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnGroupObjects, panelp, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnGroupObjects, panelp, _1, _2)); } // static @@ -1712,7 +1713,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata) gCacheName->getGroupName(parcel->getGroupID(), group_name); args["NAME"] = group_name; - LLNotifications::instance().add("ReturnObjectsNotOwnedByGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsNotOwnedByGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2)); } else { @@ -1720,15 +1721,14 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata) if (owner_id == gAgent.getID()) { - LLNotifications::instance().add("ReturnObjectsNotOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsNotOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2)); } else { std::string name; gCacheName->getFullName(owner_id, name); args["NAME"] = name; - - LLNotifications::instance().add("ReturnObjectsNotOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2)); + LLNotificationsUtil::add("ReturnObjectsNotOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2)); } } } @@ -2221,7 +2221,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) if (!allow_other_scripts && region && region->getAllowDamage()) { - LLNotifications::instance().add("UnableToDisableOutsideScripts"); + LLNotificationsUtil::add("UnableToDisableOutsideScripts"); return; } @@ -2265,7 +2265,7 @@ void LLPanelLandOptions::onClickSet(void* userdata) if (agent_parcel->getLocalID() != selected_parcel->getLocalID()) { - LLNotifications::instance().add("MustBeInParcel"); + LLNotificationsUtil::add("MustBeInParcel"); return; } @@ -2308,11 +2308,11 @@ void LLPanelLandOptions::onClickPublishHelp(void*) if(! can_change_identity) { - LLNotifications::instance().add("ClickPublishHelpLandDisabled"); + LLNotificationsUtil::add("ClickPublishHelpLandDisabled"); } else { - LLNotifications::instance().add("ClickPublishHelpLand"); + LLNotificationsUtil::add("ClickPublishHelpLand"); } } diff --git a/indra/newview/llfloaterlandmark.cpp b/indra/newview/llfloaterlandmark.cpp index 6f0940c9b..49d3874d6 100644 --- a/indra/newview/llfloaterlandmark.cpp +++ b/indra/newview/llfloaterlandmark.cpp @@ -46,6 +46,7 @@ #include "llpermissions.h" #include "llsaleinfo.h" #include "llparcel.h" +#include "llnotificationsutil.h" #include "llviewerwindow.h" // alertXml #include "llviewercontrol.h" @@ -296,7 +297,7 @@ void LLFloaterLandmark::onBtnNew(void* userdata) if (!agent_parcel->getAllowLandmark() && !LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK)) { - LLNotifications::instance().add("CannotCreateLandmarkNotOwner"); + LLNotificationsUtil::add("CannotCreateLandmarkNotOwner"); return; } diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp index def015943..bc57b6710 100644 --- a/indra/newview/llfloatermediabrowser.cpp +++ b/indra/newview/llfloatermediabrowser.cpp @@ -51,7 +51,7 @@ #include "llviewermedia.h" #include "llviewerparcelmedia.h" #include "llcombobox.h" - +#include "llnotificationsutil.h" // TEMP #include "llsdutil.h" @@ -371,7 +371,7 @@ void LLViewerHtmlHelp::show(std::string url) LLSD notificationData; notificationData["url"] = url; - LLNotifications::instance().add("ClickOpenF1Help", notificationData, LLSD(), onClickF1HelpLoadURL); + LLNotificationsUtil::add("ClickOpenF1Help", notificationData, LLSD(), onClickF1HelpLoadURL); floater_html->close(); } else diff --git a/indra/newview/llfloatermessagelog.cpp b/indra/newview/llfloatermessagelog.cpp index 74241d35e..57ffac013 100644 --- a/indra/newview/llfloatermessagelog.cpp +++ b/indra/newview/llfloatermessagelog.cpp @@ -3,6 +3,7 @@ #include "llfloatermessagelog.h" #include "lluictrlfactory.h" #include "llworld.h" +#include "llnotificationsutil.h" #include "llviewerregion.h" #include "llscrolllistctrl.h" #include "lltexteditor.h" @@ -819,7 +820,7 @@ BOOL LLFloaterMessageLog::onClickCloseCircuit(void* user_data) args["MESSAGE"] = "This will delete local circuit data.\nDo you want to tell the remote host to close the circuit too?"; LLSD payload; payload["circuittoclose"] = myhost.getString(); - LLNotifications::instance().add("GenericAlertYesCancel", args, payload, onConfirmCloseCircuit); + LLNotificationsUtil::add("GenericAlertYesCancel", args, payload, onConfirmCloseCircuit); return TRUE; } // static @@ -853,7 +854,7 @@ bool LLFloaterMessageLog::onConfirmCloseCircuit(const LLSD& notification, const args["MESSAGE"] = "That host had a region associated with it.\nDo you want to clean that up?"; LLSD payload; payload["regionhost"] = myhost.getString(); - LLNotifications::instance().add("GenericAlertYesCancel", args, payload, onConfirmRemoveRegion); + LLNotificationsUtil::add("GenericAlertYesCancel", args, payload, onConfirmRemoveRegion); } return false; } diff --git a/indra/newview/llfloatermute.cpp b/indra/newview/llfloatermute.cpp index 179650ce5..8e071dcde 100644 --- a/indra/newview/llfloatermute.cpp +++ b/indra/newview/llfloatermute.cpp @@ -39,6 +39,7 @@ #include "llerror.h" #include "llstring.h" #include "message.h" +#include "llnotificationsutil.h" // project include #include "llagent.h" @@ -349,6 +350,6 @@ void LLFloaterMute::callbackMuteByName(const std::string& text, void* data) BOOL success = LLMuteList::getInstance()->add(mute); if (!success) { - LLNotifications::instance().add("MuteByNameFailed"); + LLNotificationsUtil::add("MuteByNameFailed"); } } diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 6d2d1f7ab..71d413f33 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -41,6 +41,7 @@ #include "llcachename.h" #include "llbutton.h" +#include "llnotificationsutil.h" #include "lltextbox.h" #include "llagent.h" // for agent id @@ -76,6 +77,28 @@ LLFloaterOpenObject::~LLFloaterOpenObject() sInstance = NULL; } +// static +void LLFloaterOpenObject::show() +{ + LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection(); + if (object_selection->getRootObjectCount() != 1) + { + LLNotificationsUtil::add("UnableToViewContentsMoreThanOne"); + return; + } + + // Create a new instance only if needed + if (!sInstance) + { + sInstance = new LLFloaterOpenObject(); + sInstance->center(); + } + + sInstance->open(); /* Flawfinder: ignore */ + sInstance->setFocus(TRUE); + + sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); +} void LLFloaterOpenObject::refresh() { mPanelInventory->refresh(); @@ -104,35 +127,13 @@ void LLFloaterOpenObject::dirty() if (sInstance) sInstance->mDirty = TRUE; } -// static -void LLFloaterOpenObject::show() -{ - LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection(); - if (object_selection->getRootObjectCount() != 1) - { - LLNotifications::instance().add("UnableToViewContentsMoreThanOne"); - return; - } - - // Create a new instance only if needed - if (!sInstance) - { - sInstance = new LLFloaterOpenObject(); - sInstance->center(); - } - - sInstance->open(); /* Flawfinder: ignore */ - sInstance->setFocus(TRUE); - - sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); -} void LLFloaterOpenObject::moveToInventory(bool wear) { if (mObjectSelection->getRootObjectCount() != 1) { - LLNotifications::instance().add("OnlyCopyContentsOfSingleItem"); + LLNotificationsUtil::add("OnlyCopyContentsOfSingleItem"); return; } @@ -173,7 +174,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear) delete data; data = NULL; - LLNotifications::instance().add("OpenObjectCannotCopy"); + LLNotificationsUtil::add("OpenObjectCannotCopy"); } } diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index cd3553b92..ccbeb8c5c 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -35,6 +35,7 @@ #include "llalertdialog.h" #include "llcheckboxctrl.h" #include "llfloaterperms.h" +#include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llviewerwindow.h" #include "lluictrlfactory.h" @@ -155,5 +156,5 @@ U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) //static void LLFloaterPerms::onClickHelp(void* data) { - LLNotifications::instance().add("ClickUploadHelpPermissions"); + LLNotificationsUtil::add("ClickUploadHelpPermissions"); } diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index c2f76c354..fe7d7816f 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -45,6 +45,7 @@ #include "lllineeditor.h" #include "llviewertexteditor.h" #include "llbutton.h" +#include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llviewernetwork.h" #include "lluictrlfactory.h" @@ -255,20 +256,20 @@ void LLFloaterPostcard::onClickSend(void* data) if (to.empty() || !boost::regex_match(to, emailFormat)) { - LLNotifications::instance().add("PromptRecipientEmail"); + LLNotificationsUtil::add("PromptRecipientEmail"); return; } if (from.empty() || !boost::regex_match(from, emailFormat)) { - LLNotifications::instance().add("PromptSelfEmail"); + LLNotificationsUtil::add("PromptSelfEmail"); return; } std::string subject(self->childGetValue("subject_form").asString()); if(subject.empty() || !self->mHasFirstMsgFocus) { - LLNotifications::instance().add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2)); + LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2)); return; } @@ -278,7 +279,7 @@ void LLFloaterPostcard::onClickSend(void* data) } else { - LLNotifications::instance().add("ErrorProcessingSnapshot"); + LLNotificationsUtil::add("ErrorProcessingSnapshot"); } } } @@ -294,7 +295,7 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, { LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); - LLNotifications::instance().add("ErrorUploadingPostcard", args); + LLNotificationsUtil::add("ErrorUploadingPostcard", args); } else { @@ -353,7 +354,7 @@ void LLFloaterPostcard::onMsgFormFocusRecieved(LLFocusableElement* receiver, voi bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(0 == option) { // User clicked OK diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index a7e4e7a3e..19346c19b 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -36,6 +36,7 @@ #include "llsliderctrl.h" #include "llcheckboxctrl.h" +#include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "llviewerdisplay.h" #include "llpostprocess.h" @@ -180,7 +181,7 @@ void LLFloaterPostProcess::onSaveEffect(void* userData) { LLSD payload; payload["effect_name"] = effectName; - LLNotifications::instance().add("PPSaveEffectAlert", LLSD(), payload, &LLFloaterPostProcess::saveAlertCallback); + LLNotificationsUtil::add("PPSaveEffectAlert", LLSD(), payload, &LLFloaterPostProcess::saveAlertCallback); } else { @@ -201,7 +202,7 @@ void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData) bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); // if they choose save, do it. Otherwise, don't do anything if (option == 0) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index deae4fa92..faf4f3d09 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -64,6 +64,8 @@ #include "lllineeditor.h" #include "llalertdialog.h" #include "llnamelistctrl.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llsliderctrl.h" #include "llspinctrl.h" #include "lltabcontainer.h" @@ -79,7 +81,7 @@ #include "llviewertexteditor.h" #include "llviewerwindow.h" #include "llvlcomposition.h" - +#include "llagentui.h" // [RLVa:KB] #include "rlvhandler.h" // [/RLVa:KB] @@ -656,7 +658,7 @@ void LLPanelRegionGeneralInfo::onKickCommit(const std::vector& name void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata) { llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl; - LLNotifications::instance().add("KickUsersFromRegion", + LLNotificationsUtil::add("KickUsersFromRegion", LLSD(), LLSD(), boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2)); @@ -664,7 +666,7 @@ void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata) bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { strings_t strings; @@ -684,7 +686,7 @@ bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const L void LLPanelRegionGeneralInfo::onClickMessage(void* userdata) { llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl; - LLNotifications::instance().add("MessageRegion", + LLNotificationsUtil::add("MessageRegion", LLSD(), LLSD(), boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2)); @@ -693,7 +695,7 @@ void LLPanelRegionGeneralInfo::onClickMessage(void* userdata) // static bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response) { - if(LLNotification::getSelectedOption(notification, response) != 0) return false; + if(LLNotificationsUtil::getSelectedOption(notification, response) != 0) return false; std::string text = response["message"].asString(); if (text.empty()) return false; @@ -711,7 +713,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L gAgent.getID().toString(buffer); strings.push_back(buffer); std::string name; - gAgent.buildFullname(name); + LLAgentUI::buildFullname(name); strings.push_back(strings_t::value_type(name)); strings.push_back(strings_t::value_type(text)); LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); @@ -802,7 +804,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() LLViewerRegion* region = gAgent.getRegion(); if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) ) { - LLNotifications::instance().add("RegionMaturityChange"); + LLNotificationsUtil::add("RegionMaturityChange"); } return TRUE; @@ -916,13 +918,13 @@ void LLPanelRegionDebugInfo::onClickReturn(void* data) } payload["flags"] = int(flags); payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean(); - LLNotifications::instance().add("EstateObjectReturn", args, payload, + LLNotificationsUtil::add("EstateObjectReturn", args, payload, boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2)); } bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) return false; LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID(); @@ -978,13 +980,13 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data) // static void LLPanelRegionDebugInfo::onClickRestart(void* data) { - LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(), + LLNotificationsUtil::add("ConfirmRestart", LLSD(), LLSD(), boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2)); } bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) return false; strings_t strings; @@ -1152,7 +1154,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes() LLSD args; args["TEXTURE_NUM"] = i+1; args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8); - LLNotifications::instance().add("InvalidTerrainBitDepth", args); + LLNotificationsUtil::add("InvalidTerrainBitDepth", args); return FALSE; } @@ -1163,7 +1165,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes() args["TEXTURE_NUM"] = i+1; args["TEXTURE_SIZE_X"] = width; args["TEXTURE_SIZE_Y"] = height; - LLNotifications::instance().add("InvalidTerrainSize", args); + LLNotificationsUtil::add("InvalidTerrainSize", args); return FALSE; } @@ -1369,20 +1371,18 @@ void LLPanelRegionTerrainInfo::onClickUploadRaw_continued(AIFilePicker* filepick LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); - LLNotifications::instance().add("RawUploadStarted"); + LLNotificationsUtil::add("RawUploadStarted"); } // static void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data) { - LLNotifications::instance().add( - LLNotification::Params("ConfirmBakeTerrain") - .functor(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2))); + LLNotificationsUtil::add("ConfirmBakeTerrain", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2)); } bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) return false; strings_t strings; @@ -1478,7 +1478,7 @@ void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) LLSD args; args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); - LLNotifications::instance().add("MaxAllowedAgentOnRegion", args); + LLNotificationsUtil::add("MaxAllowedAgentOnRegion", args); return; } accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd"); @@ -1500,7 +1500,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data) { LLSD args; args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); - LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args); + LLNotificationsUtil::add("MaxAllowedGroupsOnRegion", args); return; } @@ -1518,7 +1518,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data) bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) return false; LLFloater* parent_floater = gFloaterView->getParentFloater(this); @@ -1555,7 +1555,7 @@ void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data) { LLSD args; args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); - LLNotifications::instance().add("MaxBannedAgentsOnRegion", args); + LLNotificationsUtil::add("MaxBannedAgentsOnRegion", args); return; } accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd"); @@ -1577,7 +1577,7 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data) { // Tell user they can't add more managers LLSD args; args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS); - LLNotifications::instance().add("MaxManagersOnRegion", args); + LLNotificationsUtil::add("MaxManagersOnRegion", args); } else { // Go pick managers to add @@ -1635,13 +1635,13 @@ void LLPanelEstateInfo::onKickUserCommit(const std::vector& names, args["EVIL_USER"] = names[0]; LLSD payload; payload["agent_id"] = ids[0]; - LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2)); + LLNotificationsUtil::add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2)); } bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { case 0: @@ -1788,7 +1788,7 @@ void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dia // static bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) { // abort change @@ -1832,7 +1832,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector& names, co args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); args["LIST_TYPE"] = "Allowed Residents"; args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); - LLNotifications::instance().add("MaxAgentOnRegionBatch", args); + LLNotificationsUtil::add("MaxAgentOnRegionBatch", args); delete change_info; return; } @@ -1848,7 +1848,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector& names, co args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); args["LIST_TYPE"] = "Banned Residents"; args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); - LLNotifications::instance().add("MaxAgentOnRegionBatch", args); + LLNotificationsUtil::add("MaxAgentOnRegionBatch", args); delete change_info; return; } @@ -1917,7 +1917,7 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& // static bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) { // abort @@ -1934,7 +1934,7 @@ bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& { LLSD args; args["ALL_ESTATES"] = all_estates_text(); - LLNotifications::instance().add(notification["payload"]["dialog_name"], + LLNotificationsUtil::add(notification["payload"]["dialog_name"], args, notification["payload"], accessCoreConfirm); @@ -1947,7 +1947,7 @@ bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& // static bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger(); LLViewerRegion* region = gAgent.getRegion(); @@ -1966,7 +1966,7 @@ bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD) && region && (region->getOwner() == id)) { - LLNotifications::instance().add("OwnerCanNotBeDenied"); + LLNotificationsUtil::add("OwnerCanNotBeDenied"); break; } switch(option) @@ -2242,7 +2242,7 @@ BOOL LLPanelEstateInfo::sendUpdate() bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { case 0: @@ -2649,12 +2649,12 @@ BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl) void LLPanelEstateInfo::onClickMessageEstate(void* userdata) { llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl; - LLNotifications::instance().add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2)); + LLNotificationsUtil::add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2)); } bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); std::string text = response["message"].asString(); if(option != 0) return false; if(text.empty()) return false; @@ -2662,7 +2662,7 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re strings_t strings; //integers_t integers; std::string name; - gAgent.buildFullname(name); + LLAgentUI::buildFullname(name); strings.push_back(strings_t::value_type(name)); strings.push_back(strings_t::value_type(text)); LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); @@ -2785,7 +2785,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop { LLSD payload; payload["item_id"] = item->getUUID(); - LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload, + LLNotificationsUtil::add("EstateChangeCovenant", LLSD(), payload, LLPanelEstateCovenant::confirmChangeCovenantCallback); } break; @@ -2800,7 +2800,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop // static bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant(); @@ -2820,7 +2820,7 @@ bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notificati // static void LLPanelEstateCovenant::resetCovenantID(void* userdata) { - LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback); + LLNotificationsUtil::add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback); } // static @@ -2829,7 +2829,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant(); if (!self) return false; - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { case 0: @@ -2899,7 +2899,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, if( !panelp->mEditor->importBuffer( buffer, file_length+1 ) ) { llwarns << "Problem importing estate covenant." << llendl; - LLNotifications::instance().add("ProblemImportingEstateCovenant"); + LLNotificationsUtil::add("ProblemImportingEstateCovenant"); } else { @@ -2920,15 +2920,15 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifications::instance().add("MissingNotecardAssetID"); + LLNotificationsUtil::add("MissingNotecardAssetID"); } else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) { - LLNotifications::instance().add("NotAllowedToViewNotecard"); + LLNotificationsUtil::add("NotAllowedToViewNotecard"); } else { - LLNotifications::instance().add("UnableToLoadNotecardAsset"); + LLNotificationsUtil::add("UnableToLoadNotecardAsset"); } llwarns << "Problem loading notecard: " << status << llendl; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 2219ab235..9dec6b49f 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -43,6 +43,7 @@ #include "llfontgl.h" #include "llgl.h" // for renderer #include "llinventory.h" +#include "llnotificationsutil.h" #include "llimagej2c.h" #include "llstring.h" #include "llsys.h" @@ -232,10 +233,10 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) { if ( gEmailToEstateOwner ) { - LLNotifications::instance().add("HelpReportAbuseEmailEO"); + LLNotificationsUtil::add("HelpReportAbuseEmailEO"); } else - LLNotifications::instance().add("HelpReportAbuseEmailLL"); + LLNotificationsUtil::add("HelpReportAbuseEmailLL"); }; } @@ -443,7 +444,7 @@ void LLFloaterReporter::onClickSend(void *userdata) category_value == IP_CONTENT_REMOVAL || category_value == IP_PERMISSONS_EXPLOIT) { - LLNotifications::instance().add("HelpReportAbuseContainsCopyright"); + LLNotificationsUtil::add("HelpReportAbuseContainsCopyright"); self->mCopyrightWarningSeen = TRUE; return; } @@ -452,7 +453,7 @@ void LLFloaterReporter::onClickSend(void *userdata) { // IP_CONTENT_REMOVAL *always* shows the dialog - // ergo you can never send that abuse report type. - LLNotifications::instance().add("HelpReportAbuseContainsCopyright"); + LLNotificationsUtil::add("HelpReportAbuseContainsCopyright"); return; } } @@ -561,7 +562,7 @@ void LLFloaterReporter::showFromMenu(EReportType report_type) if (report_type == BUG_REPORT) { - LLNotifications::instance().add("HelpReportBug"); + LLNotificationsUtil::add("HelpReportBug"); } else { @@ -653,11 +654,11 @@ bool LLFloaterReporter::validateReport() { if ( mReportType != BUG_REPORT ) { - LLNotifications::instance().add("HelpReportAbuseSelectCategory"); + LLNotificationsUtil::add("HelpReportAbuseSelectCategory"); } else { - LLNotifications::instance().add("HelpReportBugSelectCategory"); + LLNotificationsUtil::add("HelpReportAbuseAbuserNameEmpty"); } return false; } @@ -666,13 +667,13 @@ bool LLFloaterReporter::validateReport() { if ( childGetText("abuser_name_edit").empty() ) { - LLNotifications::instance().add("HelpReportAbuseAbuserNameEmpty"); + LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty"); return false; }; if ( childGetText("abuse_location_edit").empty() ) { - LLNotifications::instance().add("HelpReportAbuseAbuserLocationEmpty"); + LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty"); return false; }; }; @@ -681,11 +682,11 @@ bool LLFloaterReporter::validateReport() { if ( mReportType != BUG_REPORT ) { - LLNotifications::instance().add("HelpReportAbuseSummaryEmpty"); + LLNotificationsUtil::add("HelpReportAbuseSummaryEmpty"); } else { - LLNotifications::instance().add("HelpReportBugSummaryEmpty"); + LLNotificationsUtil::add("HelpReportBugSummaryEmpty"); } return false; }; @@ -694,11 +695,11 @@ bool LLFloaterReporter::validateReport() { if ( mReportType != BUG_REPORT ) { - LLNotifications::instance().add("HelpReportAbuseDetailsEmpty"); + LLNotificationsUtil::add("HelpReportAbuseDetailsEmpty"); } else { - LLNotifications::instance().add("HelpReportBugDetailsEmpty"); + LLNotificationsUtil::add("HelpReportBugDetailsEmpty"); } return false; }; @@ -1001,7 +1002,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, { LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); - LLNotifications::instance().add("ErrorUploadingReportScreenshot", args); + LLNotificationsUtil::add("ErrorUploadingReportScreenshot", args); std::string err_msg("There was a problem uploading a report screenshot"); err_msg += " due to the following reason: " + args["REASON"].asString(); diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 3c5b9cfa9..f4cc7c30e 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -37,7 +37,8 @@ #include "llfloater.h" #include "llfloaterland.h" #include "lllineeditor.h" -#include "llnotify.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "llselectmgr.h" #include "lltexturectrl.h" @@ -448,7 +449,7 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata) send_parcel_select_objects(parcel->getLocalID(), RT_SELL); - LLNotifications::instance().add("TransferObjectsHighlighted", + LLNotificationsUtil::add("TransferObjectsHighlighted", LLSD(), LLSD(), &LLFloaterSellLandUI::callbackHighlightTransferable); } @@ -483,7 +484,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) && (sale_price == 0) && sell_to_anyone) { - LLNotifications::instance().add("SalePriceRestriction"); + LLNotificationsUtil::add("SalePriceRestriction"); return; } @@ -516,7 +517,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) { return false; diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index f288a7d1d..2f895e487 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -77,6 +77,7 @@ #include "llimagepng.h" #include "llimagebmp.h" #include "llimagej2c.h" +#include "llnotificationsutil.h" #include "llvfile.h" #include "llvfs.h" @@ -999,7 +1000,7 @@ void LLSnapshotLivePreview::saveTexture() } else { - LLNotifications::instance().add("ErrorEncodingSnapshot"); + LLNotificationsUtil::add("ErrorEncodingSnapshot"); llwarns << "Error encoding snapshot" << llendl; } diff --git a/indra/newview/llfloaterteleport.cpp b/indra/newview/llfloaterteleport.cpp index df2226be2..a4a88bfd0 100644 --- a/indra/newview/llfloaterteleport.cpp +++ b/indra/newview/llfloaterteleport.cpp @@ -82,7 +82,7 @@ public: args["REASON"] = reason; - LLNotifications::instance().add("CouldNotTeleportReason", args); + LLNotificationsUtil::add("CouldNotTeleportReason", args); gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); @@ -131,7 +131,7 @@ public: args["REASON"] = "Place Avatar Failed"; //gViewerWindow->alertXml("CouldNotTeleportReason", args); - LLNotifications::instance().add("CouldNotTeleportReason",args); + LLNotificationsUtil::add("CouldNotTeleportReason",args); gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); @@ -164,7 +164,7 @@ public: LLSD args; args["REASON"] = "Failed to resolve host."; //gViewerWindow->alertXml("CouldNotTeleportReason", args); - LLNotifications::instance().add("CouldNotTeleportReason", args); + LLNotificationsUtil::add("CouldNotTeleportReason", args); gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); return; } diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 76ea40008..8abbc2d26 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -41,6 +41,7 @@ #include "llbutton.h" #include "llfloatergodtools.h" #include "llfloateravatarinfo.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "llscrolllistctrl.h" #include "lllineeditor.h" @@ -398,7 +399,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all) //static bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { sInstance->doToObjects(ACTION_RETURN, true); @@ -408,7 +409,7 @@ bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD void LLFloaterTopObjects::onReturnAll(void* data) { - LLNotifications::instance().add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll); + LLNotificationsUtil::add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll); } @@ -541,7 +542,7 @@ void LLFloaterTopObjects::onTP(void* data) //static bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { sInstance->doToObjects(ACTION_DISABLE, true); @@ -551,7 +552,7 @@ bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLS void LLFloaterTopObjects::onDisableAll(void* data) { - LLNotifications::instance().add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll); + LLNotificationsUtil::add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll); } void LLFloaterTopObjects::onDisableSelected(void* data) diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 2dedc79af..d83dab9fd 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -46,6 +46,7 @@ #include "llbutton.h" #include "llhttpclient.h" #include "llhttpstatuscodes.h" // for HTTP_FOUND +#include "llnotificationsutil.h" #include "llradiogroup.h" #include "lltextbox.h" #include "llui.h" @@ -254,7 +255,7 @@ void LLFloaterTOS::onCancel( void* userdata ) { LLFloaterTOS* self = (LLFloaterTOS*) userdata; llinfos << "User disagrees with TOS." << llendl; - LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); + LLNotificationsUtil::add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); LLStartUp::setStartupState( STATE_LOGIN_SHOW ); self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS self->close(); // destroys this object diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 8d483e59e..35dc9ddda 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -38,6 +38,7 @@ // project includes #include "llcombobox.h" +#include "llnotificationsutil.h" #include "llurlhistory.h" #include "lluictrlfactory.h" #include "llwindow.h" @@ -263,13 +264,13 @@ void LLFloaterURLEntry::onBtnCancel( void* userdata ) //----------------------------------------------------------------------------- void LLFloaterURLEntry::onBtnClear( void* userdata ) { - LLNotifications::instance().add( "ConfirmClearMediaUrlList", LLSD(), LLSD(), + LLNotificationsUtil::add( "ConfirmClearMediaUrlList", LLSD(), LLSD(), boost::bind(&LLFloaterURLEntry::callback_clear_url_list, (LLFloaterURLEntry*)userdata, _1, _2) ); } bool LLFloaterURLEntry::callback_clear_url_list(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if ( option == 0 ) // YES { // clear saved list diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index 99870e92b..e35d7e6c0 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -49,6 +49,7 @@ #include "llfloaterdaycycle.h" #include "llboost.h" #include "llmultisliderctrl.h" +#include "llnotificationsutil.h" #include "v4math.h" #include "llviewerdisplay.h" @@ -219,7 +220,7 @@ bool LLFloaterWater::newPromptCallback(const LLSD& notification, const LLSD& res } else { - LLNotifications::instance().add("ExistsWaterPresetAlert"); + LLNotificationsUtil::add("ExistsWaterPresetAlert"); } } return false; @@ -592,7 +593,7 @@ void LLFloaterWater::onNormalMapPicked(LLUICtrl* ctrl, void* userData) void LLFloaterWater::onNewPreset(void* userData) { - LLNotifications::instance().add("NewWaterPreset", LLSD(), LLSD(), newPromptCallback); + LLNotificationsUtil::add("NewWaterPreset", LLSD(), LLSD(), newPromptCallback); } void LLFloaterWater::onSavePreset(void* userData) @@ -614,11 +615,11 @@ void LLFloaterWater::onSavePreset(void* userData) comboBox->getSelectedItemLabel()); if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) { - LLNotifications::instance().add("WLNoEditDefault"); + LLNotificationsUtil::add("WLNoEditDefault"); return; } - LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); + LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); } bool LLFloaterWater::saveAlertCallback(const LLSD& notification, const LLSD& response) @@ -650,7 +651,7 @@ void LLFloaterWater::onDeletePreset(void* userData) LLSD args; args["SKY"] = combo_box->getSelectedValue().asString(); - LLNotifications::instance().add("WLDeletePresetAlert", args, LLSD(), deleteAlertCallback); + LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(), deleteAlertCallback); } bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& response) @@ -677,7 +678,7 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r std::set::iterator sIt = sDefaultPresets.find(name); if(sIt != sDefaultPresets.end()) { - LLNotifications::instance().add("WaterNoEditDefault"); + LLNotificationsUtil::add("WaterNoEditDefault"); return false; } diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index 744c08cdd..dba360b88 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -48,6 +48,7 @@ #include "lllineeditor.h" #include "llfloaterdaycycle.h" #include "llboost.h" +#include "llnotificationsutil.h" #include "v4math.h" #include "llviewerdisplay.h" @@ -298,7 +299,7 @@ bool LLFloaterWindLight::newPromptCallback(const LLSD& notification, const LLSD& } else { - LLNotifications::instance().add("ExistsSkyPresetAlert"); + LLNotificationsUtil::add("ExistsSkyPresetAlert"); } } return false; @@ -789,7 +790,7 @@ void LLFloaterWindLight::onStarAlphaMoved(LLUICtrl* ctrl, void* userData) void LLFloaterWindLight::onNewPreset(void* userData) { - LLNotifications::instance().add("NewSkyPreset", LLSD(), LLSD(), newPromptCallback); + LLNotificationsUtil::add("NewSkyPreset", LLSD(), LLSD(), newPromptCallback); } void LLFloaterWindLight::onSavePreset(void* userData) @@ -809,14 +810,14 @@ void LLFloaterWindLight::onSavePreset(void* userData) comboBox->getSelectedItemLabel()); if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets")) { - LLNotifications::instance().add("WLNoEditDefault"); + LLNotificationsUtil::add("WLNoEditDefault"); return; } LLWLParamManager::getInstance()->mCurParams.mName = comboBox->getSelectedItemLabel(); - LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); + LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), saveAlertCallback); } bool LLFloaterWindLight::saveAlertCallback(const LLSD& notification, const LLSD& response) @@ -847,7 +848,7 @@ void LLFloaterWindLight::onDeletePreset(void* userData) LLSD args; args["SKY"] = combo_box->getSelectedValue().asString(); - LLNotifications::instance().add("WLDeletePresetAlert", args, LLSD(), + LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(), boost::bind(&LLFloaterWindLight::deleteAlertCallback, sWindLight, _1, _2)); } @@ -878,7 +879,7 @@ bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLS std::set::iterator sIt = sDefaultPresets.find(name); if(sIt != sDefaultPresets.end()) { - LLNotifications::instance().add("WLNoEditDefault"); + LLNotificationsUtil::add("WLNoEditDefault"); return false; } diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index d3ea9c334..a385ce329 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -53,6 +53,7 @@ #include "llfirstuse.h" #include "llfocusmgr.h" #include "lllandmarklist.h" +#include "llnotificationsutil.h" #include "lllineeditor.h" #include "llpreviewlandmark.h" #include "llregionhandle.h" @@ -1332,7 +1333,7 @@ void LLFloaterWorldMap::onCopySLURL(void* data) LLSD args; args["SLURL"] = self->mSLURL; - LLNotifications::instance().add("CopySLURL", args); + LLNotificationsUtil::add("CopySLURL", args); } void LLFloaterWorldMap::onCheckEvents(LLUICtrl*, void* data) diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index e4b83b62e..73e902df0 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -43,6 +43,7 @@ #include "lldatapacker.h" #include "llinventory.h" #include "llmultigesture.h" +#include "llnotificationsutil.h" #include "llstl.h" #include "llstring.h" // todo: remove #include "llvfile.h" @@ -53,7 +54,6 @@ #include "llchatbar.h" #include "lldelayedgestureerror.h" #include "llinventorymodel.h" -#include "llnotify.h" #include "llviewermessage.h" #include "llvoavatar.h" #include "llviewerstats.h" @@ -994,7 +994,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs, // we're done with this set of deactivations LLSD args; args["NAMES"] = self.mDeactivateSimilarNames; - LLNotifications::instance().add("DeactivatedGesturesTrigger", args); + LLNotificationsUtil::add("DeactivatedGesturesTrigger", args); } } diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 6e1f6de57..3cea45937 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -53,6 +53,7 @@ #include "llviewerwindow.h" #include "llfloaterdirectory.h" #include "llfloatergroupinfo.h" +#include "llnotificationsutil.h" #include "lluictrlfactory.h" #if LL_MSVC #pragma warning( disable : 4265 ) // "class has virtual functions, but destructor is not virtual" @@ -1376,7 +1377,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data) // *TODO:translate LLSD args; args["MESSAGE"] = message; - LLNotifications::instance().add("UnableToCreateGroup", args); + LLNotificationsUtil::add("UnableToCreateGroup", args); } } diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 2feae487d..ff574bea8 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -42,6 +42,7 @@ #include "llstring.h" #include "message.h" #include "lltextbox.h" +#include "llnotificationsutil.h" #include "llagent.h" #include "llbutton.h" @@ -394,13 +395,13 @@ void LLVoiceChannel::setChannelInfo( { if (mURI.empty()) { - LLNotifications::instance().add("VoiceChannelJoinFailed", mNotifyArgs); + LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs); llwarns << "Received empty URI for channel " << mSessionName << llendl; deactivate(); } else if (mCredentials.empty()) { - LLNotifications::instance().add("VoiceChannelJoinFailed", mNotifyArgs); + LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs); llwarns << "Received empty credentials for channel " << mSessionName << llendl; deactivate(); } @@ -444,7 +445,7 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) { case STATUS_LOGIN_RETRY: //mLoginNotificationHandle = LLNotifyBox::showXml("VoiceLoginRetry")->getHandle(); - LLNotifications::instance().add("VoiceLoginRetry"); + LLNotificationsUtil::add("VoiceLoginRetry"); break; case STATUS_LOGGED_IN: //if (!mLoginNotificationHandle.isDead()) @@ -462,7 +463,7 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) { // if forceably removed from channel // update the UI and revert to default channel - LLNotifications::instance().add("VoiceChannelDisconnected", mNotifyArgs); + LLNotificationsUtil::add("VoiceChannelDisconnected", mNotifyArgs); deactivate(); } mIgnoreNextSessionLeave = FALSE; @@ -954,12 +955,12 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) if (mState == STATE_RINGING) { // other user declined call - LLNotifications::instance().add("P2PCallDeclined", mNotifyArgs); + LLNotificationsUtil::add("P2PCallDeclined", mNotifyArgs); } else { // other user hung up - LLNotifications::instance().add("VoiceChannelDisconnectedP2P", mNotifyArgs); + LLNotificationsUtil::add("VoiceChannelDisconnectedP2P", mNotifyArgs); } deactivate(); } @@ -977,7 +978,7 @@ void LLVoiceChannelP2P::handleError(EStatusType type) switch(type) { case ERROR_NOT_AVAILABLE: - LLNotifications::instance().add("P2PCallNoAnswer", mNotifyArgs); + LLNotificationsUtil::add("P2PCallNoAnswer", mNotifyArgs); break; default: break; diff --git a/indra/newview/llinventoryactions.cpp b/indra/newview/llinventoryactions.cpp index 61fdb29e4..aa0db9c4e 100644 --- a/indra/newview/llinventoryactions.cpp +++ b/indra/newview/llinventoryactions.cpp @@ -43,11 +43,13 @@ #include "llagent.h" #include "llcallingcard.h" #include "llcheckboxctrl.h" // for radio buttons +#include "llnotificationsutil.h" #include "llradiogroup.h" #include "llspinctrl.h" #include "lltextbox.h" #include "llui.h" + #include "llviewercontrol.h" #include "llfirstuse.h" #include "llfloateravatarinfo.h" @@ -289,7 +291,7 @@ class LLEmptyTrash : public inventory_panel_listener_t { LLInventoryModel* model = mPtr->getModel(); if(!model) return false; - LLNotifications::instance().add("ConfirmEmptyTrash", LLSD(), LLSD(), boost::bind(&LLEmptyTrash::callback_empty_trash, this, _1, _2)); + LLNotificationsUtil::add("ConfirmEmptyTrash", LLSD(), LLSD(), boost::bind(&LLEmptyTrash::callback_empty_trash, this, _1, _2)); return true; } @@ -313,7 +315,7 @@ class LLEmptyLostAndFound : public inventory_panel_listener_t { LLInventoryModel* model = mPtr->getModel(); if(!model) return false; - LLNotifications::instance().add("ConfirmEmptyLostAndFound", LLSD(), LLSD(), boost::bind(&LLEmptyLostAndFound::callback_empty_lost_and_found, this, _1, _2)); + LLNotificationsUtil::add("ConfirmEmptyLostAndFound", LLSD(), LLSD(), boost::bind(&LLEmptyLostAndFound::callback_empty_lost_and_found, this, _1, _2)); return true; } diff --git a/indra/newview/llinventorybackup.cpp b/indra/newview/llinventorybackup.cpp index 055cc2d61..3f58e3064 100644 --- a/indra/newview/llinventorybackup.cpp +++ b/indra/newview/llinventorybackup.cpp @@ -13,7 +13,7 @@ #include "lluictrlfactory.h" #include "llscrolllistctrl.h" #include "llimagetga.h" - +#include "llnotificationsutil.h" std::list LLFloaterInventoryBackup::sInstances; @@ -115,7 +115,7 @@ void LLFloaterInventoryBackupSettings::onClickNext(void* userdata) { LLSD args; args["ERROR_MESSAGE"] = "No items passed the filter \\o/"; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } @@ -353,7 +353,7 @@ void LLInventoryBackup::imageCallback(BOOL success, { LLSD args; args["ERROR_MESSAGE"] = "Download didn't work on " + item->getName() + "."; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } @@ -379,13 +379,13 @@ void LLInventoryBackup::imageCallback_continued(LLImageRaw* src, AIFilePicker* f { LLSD args; args["ERROR_MESSAGE"] = "Couldn't encode file."; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); } else if( !image_tga->save( filename ) ) { LLSD args; args["ERROR_MESSAGE"] = "Couldn't write file."; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); } } @@ -402,7 +402,7 @@ void LLInventoryBackup::assetCallback(LLVFS *vfs, { LLSD args; args["ERROR_MESSAGE"] = "Download didn't work on " + item->getName() + "."; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fc0c04bae..57194eba0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -67,6 +67,8 @@ #include "llinventoryclipboard.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llpreviewanim.h" #include "llpreviewgesture.h" #include "llpreviewlandmark.h" @@ -1876,7 +1878,7 @@ void warn_move_inventory(LLViewerObject* object, LLMoveInv* move_inv) { dialog = "MoveInventoryFromObject"; } - LLNotifications::instance().add(dialog, LLSD(), LLSD(), boost::bind(move_task_inventory_callback, _1, _2, move_inv)); + LLNotificationsUtil::add(dialog, LLSD(), LLSD(), boost::bind(move_task_inventory_callback, _1, _2, move_inv)); } // Move/copy all inventory items from the Contents folder of an in-world @@ -2932,7 +2934,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response { LLFloaterOpenObject::LLCatAndWear* cat_and_wear = (LLFloaterOpenObject::LLCatAndWear* )move_inv->mUserData; LLViewerObject* object = gObjectList.findObject(move_inv->mObjectID); - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(option == 0 && object) { @@ -3412,7 +3414,7 @@ void open_landmark(LLViewerInventoryItem* inv_item, static bool open_landmark_callback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLUUID asset_id = notification["payload"]["asset_id"].asUUID(); LLUUID item_id = notification["payload"]["item_id"].asUUID(); @@ -3446,7 +3448,7 @@ void LLLandmarkBridge::openItem() LLSD payload; payload["asset_id"] = item->getAssetUUID(); payload["item_id"] = item->getUUID(); - LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload); + LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload); } } @@ -4192,7 +4194,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach if ( (rlv_handler_t::isEnabled()) && ((gRlvAttachmentLocks.canAttach(attachment) & RLV_WEAR_REPLACE) == 0) ) return; // [/RLVa:KB] - LLNotifications::instance().add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez); + LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez); } else { @@ -4211,11 +4213,11 @@ bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& respon { LLSD args; args["MAX_ATTACHMENTS"] = llformat("%d", MAX_AGENT_ATTACHMENTS); - LLNotifications::instance().add("MaxAttachmentsOnOutfit", args); + LLNotificationsUtil::add("MaxAttachmentsOnOutfit", args); return false; } - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0/*YES*/) { LLUUID item_id = notification["payload"]["item_id"].asUUID(); @@ -4848,7 +4850,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) if( !wearable_count && !obj_count && !gest_count) { - LLNotifications::instance().add("CouldNotPutOnOutfit"); + LLNotificationsUtil::add("CouldNotPutOnOutfit"); delete wear_info; return; } @@ -5260,7 +5262,7 @@ void LLWearableBridge::openItem() { if( isItemInTrash() ) { - LLNotifications::instance().add("CannotWearTrash"); + LLNotificationsUtil::add("CannotWearTrash"); } else if(isAgentInventory()) { @@ -5293,7 +5295,7 @@ void LLWearableBridge::openItem() { // *TODO: We should fetch the item details, and then do // the operation above. - LLNotifications::instance().add("CannotWearInfoNotComplete"); + LLNotificationsUtil::add("CannotWearInfoNotComplete"); } } } @@ -5417,7 +5419,7 @@ void LLWearableBridge::wearOnAvatar() // destroy clothing items. if (!gAgentWearables.areWearablesLoaded()) { - LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded"); + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return; } diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index e8cdcdfdd..85a893122 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -38,7 +38,7 @@ #include "llassetstorage.h" #include "llagent.h" -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llvfile.h" #include "llviewerstats.h" @@ -120,11 +120,11 @@ void LLLandmarkList::processGetAssetReply( if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) { - LLNotifications::instance().add("LandmarkMissing"); + LLNotificationsUtil::add("LandmarkMissing"); } else { - LLNotifications::instance().add("UnableToLoadLandmark"); + LLNotificationsUtil::add("UnableToLoadLandmark"); } gLandmarkList.mBadList.insert(uuid); diff --git a/indra/newview/lllocalinventory.cpp b/indra/newview/lllocalinventory.cpp index 4d61a5c0e..9b1494edf 100644 --- a/indra/newview/lllocalinventory.cpp +++ b/indra/newview/lllocalinventory.cpp @@ -18,6 +18,7 @@ #include "lluictrlfactory.h" #include "llcombobox.h" +#include "llnotificationsutil.h" #include "llagent.h" // gAgent #include "llviewerwindow.h" // alertXml @@ -315,7 +316,7 @@ void LLLocalInventory::loadInvCache(std::string filename) LLSD args; args["ERROR_MESSAGE"] = message.str(); - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); } conflicting_cats.clear();// srsly dont think this is need but w/e :D } diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index f524be097..d7ab20055 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -45,7 +45,7 @@ #include "llviewercontrol.h" #include "llviewermedia.h" #include "llviewerwindow.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llweb.h" #include "llrender.h" #include "llpluginclassmedia.h" @@ -903,7 +903,7 @@ void LLMediaCtrl::onClickLinkNoFollow( LLPluginClassMedia* self ) && !mTrusted) { // block handling of this secondlife:///app/ URL - LLNotifications::instance().add("UnableToOpenCommandURL"); + LLNotificationsUtil::add("UnableToOpenCommandURL"); return; } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 9802f7932..bacde05f2 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -45,7 +45,7 @@ #include "lleconomy.h" #include "llimagej2c.h" #include "llhost.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llsd.h" #include "llsdutil_math.h" #include "llsdserialize.h" @@ -2355,7 +2355,7 @@ void LLMeshRepository::notifyLoadedMeshes() //popup queued error messages from background threads while (!mUploadErrorQ.empty()) { - LLNotifications::instance().add("MeshUploadError", mUploadErrorQ.front()); + LLNotificationsUtil::add("MeshUploadError", mUploadErrorQ.front()); mUploadErrorQ.pop(); } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index a140c7421..752e9be35 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -67,7 +67,7 @@ #include "llfloaterchat.h" #include "llimpanel.h" #include "llimview.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "lluistring.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" @@ -302,7 +302,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) if ((mute.mType == LLMute::AGENT) && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) { - LLNotifications::instance().add("MuteLinden"); + LLNotificationsUtil::add("MuteLinden"); return FALSE; } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index db52949c7..d2b3c76cc 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -61,6 +61,7 @@ #include "lllineeditor.h" #include "llnameeditor.h" #include "llmutelist.h" +#include "llnotificationsutil.h" #include "llpanelclassified.h" #include "llpanelpick.h" #include "llpreviewtexture.h" @@ -380,13 +381,13 @@ void LLPanelAvatarSecondLife::onDoubleClickGroup(void* data) // static void LLPanelAvatarSecondLife::onClickPublishHelp(void *) { - LLNotifications::instance().add("ClickPublishHelpAvatar"); + LLNotificationsUtil::add("ClickPublishHelpAvatar"); } // static void LLPanelAvatarSecondLife::onClickPartnerHelp(void *) { - LLNotifications::instance().add("ClickPartnerHelpAvatar", LLSD(), LLSD(), onClickPartnerHelpLoadURL); + LLNotificationsUtil::add("ClickPartnerHelpAvatar", LLSD(), LLSD(), onClickPartnerHelpLoadURL); } // static @@ -646,7 +647,7 @@ void LLPanelAvatarWeb::onCommitURL(LLUICtrl* ctrl, void* data) // static void LLPanelAvatarWeb::onClickWebProfileHelp(void *) { - LLNotifications::instance().add("ClickWebProfileHelpAvatar"); + LLNotificationsUtil::add("ClickWebProfileHelpAvatar"); } void LLPanelAvatarWeb::load(std::string url) @@ -1006,7 +1007,7 @@ void LLPanelAvatarClassified::onClickNew(void* data) // [/RLVa:KB] LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; - LLNotifications::instance().add("AddClassified", LLSD(), LLSD(), boost::bind(&LLPanelAvatarClassified::callbackNew, self, _1, _2)); + LLNotificationsUtil::add("AddClassified", LLSD(), LLSD(), boost::bind(&LLPanelAvatarClassified::callbackNew, self, _1, _2)); } @@ -1043,7 +1044,7 @@ void LLPanelAvatarClassified::onClickDelete(void* data) LLSD args; args["NAME"] = panel_classified->getClassifiedName(); - LLNotifications::instance().add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelAvatarClassified::callbackDelete, self, _1, _2)); + LLNotificationsUtil::add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelAvatarClassified::callbackDelete, self, _1, _2)); } @@ -1258,7 +1259,7 @@ void LLPanelAvatarPicks::onClickDelete(void* data) LLSD args; args["PICK"] = panel_pick->getPickName(); - LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), + LLNotificationsUtil::add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelAvatarPicks::callbackDelete, self, _1, _2)); } @@ -2471,7 +2472,7 @@ void LLPanelAvatar::onClickKick(void* userdata) LLSD payload; payload["avatar_id"] = self->mAvatarID; - LLNotifications::instance().add("KickUser", LLSD(), payload, finishKick); + LLNotificationsUtil::add("KickUser", LLSD(), payload, finishKick); } //static @@ -2502,7 +2503,7 @@ void LLPanelAvatar::onClickFreeze(void* userdata) LLPanelAvatar* self = (LLPanelAvatar*) userdata; LLSD payload; payload["avatar_id"] = self->mAvatarID; - LLNotifications::instance().add("FreezeUser", LLSD(), payload, LLPanelAvatar::finishFreeze); + LLNotificationsUtil::add("FreezeUser", LLSD(), payload, LLPanelAvatar::finishFreeze); } // static @@ -2533,7 +2534,7 @@ void LLPanelAvatar::onClickUnfreeze(void* userdata) LLPanelAvatar* self = (LLPanelAvatar*) userdata; LLSD payload; payload["avatar_id"] = self->mAvatarID; - LLNotifications::instance().add("UnFreezeUser", LLSD(), payload, LLPanelAvatar::finishUnfreeze); + LLNotificationsUtil::add("UnFreezeUser", LLSD(), payload, LLPanelAvatar::finishUnfreeze); } // static diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 7f67853fa..45dfb60b9 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -40,6 +40,8 @@ #include "lldir.h" #include "lldispatcher.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "message.h" @@ -327,12 +329,12 @@ BOOL LLPanelClassified::titleIsValid() const std::string& name = mNameEditor->getText(); if (name.empty()) { - LLNotifications::instance().add("BlankClassifiedName"); + LLNotificationsUtil::add("BlankClassifiedName"); return FALSE; } if (!isalnum(name[0])) { - LLNotifications::instance().add("ClassifiedMustBeAlphanumeric"); + LLNotificationsUtil::add("ClassifiedMustBeAlphanumeric"); return FALSE; } @@ -387,7 +389,7 @@ BOOL LLPanelClassified::canClose() LLSD args; args["NAME"] = mNameEditor->getText(); - LLNotifications::instance().add("ClassifiedSave", args, LLSD(), boost::bind(&LLPanelClassified::saveCallback, this, _1, _2)); + LLNotificationsUtil::add("ClassifiedSave", args, LLSD(), boost::bind(&LLPanelClassified::saveCallback, this, _1, _2)); return FALSE; } @@ -813,7 +815,7 @@ void LLPanelClassified::onClickUpdate(void* data) if(self->mMatureCombo->getCurrentIndex() == DECLINE_TO_STATE) { // Tell user about it - LLNotifications::instance().add("SetClassifiedMature", + LLNotificationsUtil::add("SetClassifiedMature", LLSD(), LLSD(), boost::bind(&LLPanelClassified::confirmMature, self, _1, _2)); @@ -883,7 +885,7 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, std::string text, args["MIN_PRICE"] = price_text; args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); - LLNotifications::instance().add("MinClassifiedPrice", args); + LLNotificationsUtil::add("MinClassifiedPrice", args); return; } @@ -894,7 +896,7 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, std::string text, LLSD args; args["AMOUNT"] = llformat("%d", price_for_listing); args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); - LLNotifications::instance().add("PublishClassified", args, LLSD(), + LLNotificationsUtil::add("PublishClassified", args, LLSD(), boost::bind(&LLPanelClassified::confirmPublish, self, _1, _2)); } diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp index e2a24c163..35f207ab2 100644 --- a/indra/newview/llpaneldirbrowser.cpp +++ b/indra/newview/llpaneldirbrowser.cpp @@ -56,6 +56,7 @@ #include "lllineeditor.h" #include "llmenucommands.h" #include "llmenugl.h" +#include "llnotificationsutil.h" #include "llpanelavatar.h" #include "llpanelevent.h" #include "llpanelgroup.h" @@ -72,7 +73,6 @@ #include "llviewertexturelist.h" #include "llviewermessage.h" #include "lluictrlfactory.h" -#include "llnotify.h" #include #include @@ -596,7 +596,7 @@ void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**) msg->getU32("StatusData", "Status", status); if (status & STATUS_SEARCH_PLACES_BANNEDWORD) { - LLNotifications::instance().add("SearchWordBanned"); + LLNotificationsUtil::add("SearchWordBanned"); } } @@ -690,7 +690,7 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**) msg->getU32("StatusData", "Status", status); if (status & STATUS_SEARCH_EVENTS_BANNEDWORD) { - LLNotifications::instance().add("SearchWordBanned"); + LLNotificationsUtil::add("SearchWordBanned"); } } @@ -926,7 +926,7 @@ void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**) msg->getU32("StatusData", "Status", status); if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD) { - LLNotifications::instance().add("SearchWordBanned"); + LLNotificationsUtil::add("SearchWordBanned"); } } diff --git a/indra/newview/llpaneldirclassified.cpp b/indra/newview/llpaneldirclassified.cpp index 6703ec39e..eaa83aff0 100644 --- a/indra/newview/llpaneldirclassified.cpp +++ b/indra/newview/llpaneldirclassified.cpp @@ -65,7 +65,7 @@ // #include "llfloateravatarinfo.h" #include "llviewermenu.h" -#include "llnotify.h" +#include "llnotificationsutil.h" //----------------------------------------------------------------------------- // Constants @@ -189,7 +189,7 @@ void LLPanelDirClassified::performQuery() BOOL inc_adult = childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp index 54d32a8ce..44bea8693 100644 --- a/indra/newview/llpaneldirevents.cpp +++ b/indra/newview/llpaneldirevents.cpp @@ -50,7 +50,7 @@ #include "lluiconstants.h" #include "llpanelevent.h" #include "llappviewer.h" -#include "llnotify.h" +#include "llnotificationsutil.h" BOOL gDisplayEventHack = FALSE; @@ -190,7 +190,7 @@ void LLPanelDirEvents::performQueryOrDelete(U32 event_id) if ( !( scope & (DFQ_INC_PG | DFQ_INC_MATURE | DFQ_INC_ADULT ))) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } diff --git a/indra/newview/llpaneldirfind.cpp b/indra/newview/llpaneldirfind.cpp index 398cb2972..f960fbb69 100644 --- a/indra/newview/llpaneldirfind.cpp +++ b/indra/newview/llpaneldirfind.cpp @@ -50,6 +50,7 @@ #include "llviewercontrol.h" #include "llmenucommands.h" #include "llmenugl.h" +#include "llnotificationsutil.h" #include "llpluginclassmedia.h" #include "lltextbox.h" #include "lluiconstants.h" @@ -218,7 +219,7 @@ void LLPanelDirFindAll::search(const std::string& search_text) BOOL inc_adult = childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } @@ -445,7 +446,7 @@ void LLPanelDirFind::onClickBack( void* data ) // static void LLPanelDirFind::onClickHelp( void* data ) { - LLNotifications::instance().add("ClickSearchHelpAll"); + LLNotificationsUtil::add("ClickSearchHelpAll"); } // static @@ -597,7 +598,7 @@ void LLPanelDirFindAllOld::onClickSearch(void *userdata) BOOL inc_adult = self->childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } diff --git a/indra/newview/llpaneldirgroups.cpp b/indra/newview/llpaneldirgroups.cpp index 5345304ec..009e68367 100644 --- a/indra/newview/llpaneldirgroups.cpp +++ b/indra/newview/llpaneldirgroups.cpp @@ -41,6 +41,7 @@ #include "llqueryflags.h" #include "llviewercontrol.h" #include "llviewerwindow.h" +#include "llnotificationsutil.h" LLPanelDirGroups::LLPanelDirGroups(const std::string& name, LLFloaterDirectory* floater) : LLPanelDirBrowser(name, floater) @@ -92,7 +93,7 @@ void LLPanelDirGroups::performQuery() // possible we threw away all the short words in the query so check length if ( query_string.length() < mMinSearchChars ) { - LLNotifications::instance().add("SeachFilteredOnShortWordsEmpty"); + LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty"); return; }; @@ -101,7 +102,7 @@ void LLPanelDirGroups::performQuery() BOOL inc_adult = childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } @@ -110,7 +111,7 @@ void LLPanelDirGroups::performQuery() { LLSD args; args["[FINALQUERY]"] = query_string; - LLNotifications::instance().add("SeachFilteredOnShortWords", args); + LLNotificationsUtil::add("SeachFilteredOnShortWords", args); }; setupNewSearch(); diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp index 98b65f98f..c1b4c8ce9 100644 --- a/indra/newview/llpaneldirland.cpp +++ b/indra/newview/llpaneldirland.cpp @@ -45,13 +45,13 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llscrolllistctrl.h" #include "llstatusbar.h" #include "lluiconstants.h" #include "lltextbox.h" #include "llviewercontrol.h" #include "llviewermessage.h" -#include "llnotify.h" #include "hippogridmanager.h" @@ -175,7 +175,7 @@ void LLPanelDirLand::performQuery() BOOL inc_adult = childGetValue("incadult").asBoolean(); if (!(inc_pg || inc_mature || inc_adult)) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } diff --git a/indra/newview/llpaneldirpeople.cpp b/indra/newview/llpaneldirpeople.cpp index 053cad558..a771db70c 100644 --- a/indra/newview/llpaneldirpeople.cpp +++ b/indra/newview/llpaneldirpeople.cpp @@ -34,6 +34,7 @@ #include "llpaneldirpeople.h" #include "llviewerwindow.h" +#include "llnotificationsutil.h" // linden library includes #include "message.h" @@ -87,7 +88,7 @@ void LLPanelDirPeople::performQuery() // possible we threw away all the short words in the query so check length if ( query_string.length() < mMinSearchChars ) { - LLNotifications::instance().add("SeachFilteredOnShortWordsEmpty"); + LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty"); return; }; @@ -96,7 +97,7 @@ void LLPanelDirPeople::performQuery() { LLSD args; args["FINALQUERY"] = query_string; - LLNotifications::instance().add("SeachFilteredOnShortWords", args); + LLNotificationsUtil::add("SeachFilteredOnShortWords", args); }; setupNewSearch(); diff --git a/indra/newview/llpaneldirplaces.cpp b/indra/newview/llpaneldirplaces.cpp index 305d2e2ac..96070b4b0 100644 --- a/indra/newview/llpaneldirplaces.cpp +++ b/indra/newview/llpaneldirplaces.cpp @@ -50,6 +50,7 @@ #include "llcombobox.h" #include "llfloaterdirectory.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llviewerwindow.h" #include "llpaneldirbrowser.h" #include "lltextbox.h" @@ -57,7 +58,6 @@ #include "llviewercontrol.h" #include "llviewermessage.h" #include "llworldmap.h" -#include "llnotify.h" LLPanelDirPlaces::LLPanelDirPlaces(const std::string& name, LLFloaterDirectory* floater) : LLPanelDirBrowser(name, floater) @@ -141,7 +141,7 @@ void LLPanelDirPlaces::performQuery() // possible we threw away all the short words in the query so check length if ( query_string.length() < mMinSearchChars ) { - LLNotifications::instance().add("SeachFilteredOnShortWordsEmpty"); + LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty"); return; }; @@ -150,7 +150,7 @@ void LLPanelDirPlaces::performQuery() { LLSD args; args["FINALQUERY"] = query_string; - LLNotifications::instance().add("SeachFilteredOnShortWords", args); + LLNotificationsUtil::add("SeachFilteredOnShortWords", args); }; std::string catstring = childGetValue("Category").asString(); @@ -207,7 +207,7 @@ void LLPanelDirPlaces::performQuery() if (0x0 == flags) { - LLNotifications::instance().add("NoContentToSearch"); + LLNotificationsUtil::add("NoContentToSearch"); return; } diff --git a/indra/newview/llpanelevent.cpp b/indra/newview/llpanelevent.cpp index 4d8b96a6c..0105180a4 100644 --- a/indra/newview/llpanelevent.cpp +++ b/indra/newview/llpanelevent.cpp @@ -45,6 +45,7 @@ #include "llfloater.h" #include "llfloaterworldmap.h" #include "llinventorymodel.h" +#include "llnotificationsutil.h" #include "llsecondlifeurls.h" #include "lltextbox.h" #include "llviewertexteditor.h" @@ -262,7 +263,7 @@ void LLPanelEvent::onClickLandmark(void* data) // static void LLPanelEvent::onClickCreateEvent(void* data) { - LLNotifications::instance().add("PromptGoToEventsPage", LLSD(), LLSD(), callbackCreateEventWebPage); + LLNotificationsUtil::add("PromptGoToEventsPage", LLSD(), LLSD(), callbackCreateEventWebPage); } // static diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index add1f3caa..835d8e514 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -46,7 +46,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" #include "llappviewer.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" // static void* LLPanelGroupTab::createTab(void* data) @@ -411,7 +411,7 @@ BOOL LLPanelGroup::attemptTransition() LLSD args; args["NEEDS_APPLY_MESSAGE"] = mesg; args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; - LLNotifications::instance().add("PanelGroupApply", args, LLSD(), + LLNotificationsUtil::add("PanelGroupApply", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback, this, _1, _2)); mShowingNotifyDialog = TRUE; @@ -559,7 +559,7 @@ bool LLPanelGroup::apply() { LLSD args; args["MESSAGE"] = apply_mesg; - LLNotifications::instance().add("GenericAlert", args); + LLNotificationsUtil::add("GenericAlert", args); } return false; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 1c05d340f..044b40337 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -50,6 +50,7 @@ #include "llnamebox.h" #include "llnamelistctrl.h" #include "llnameeditor.h" +#include "llnotificationsutil.h" #include "llspinctrl.h" #include "llstatusbar.h" // can_afford_transaction() #include "lltextbox.h" @@ -377,11 +378,11 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata) if (can_afford_transaction(cost)) { - LLNotifications::instance().add("JoinGroupCanAfford", args, payload, LLPanelGroupGeneral::joinDlgCB); + LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, LLPanelGroupGeneral::joinDlgCB); } else { - LLNotifications::instance().add("JoinGroupCannotAfford", args, payload); + LLNotificationsUtil::add("JoinGroupCannotAfford", args, payload); } } else @@ -472,7 +473,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) if(mComboMature && mComboMature->getCurrentIndex() == DECLINE_TO_STATE) { - LLNotifications::instance().add("SetGroupMature", LLSD(), LLSD(), + LLNotificationsUtil::add("SetGroupMature", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::confirmMatureApply, this, _1, _2)); return false; } @@ -493,7 +494,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) LLSD args; args["MESSAGE"] = mConfirmGroupCreateStr; - LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); + LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); return false; } diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index f95a27aad..cff4637bd 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -39,6 +39,7 @@ #include "llcombobox.h" #include "llgroupmgr.h" #include "llnamelistctrl.h" +#include "llnotificationsutil.h" #include "llspinctrl.h" #include "lltextbox.h" #include "llviewerobject.h" @@ -161,7 +162,7 @@ void LLPanelGroupInvite::impl::submitInvitations() { LLSD args; args["MESSAGE"] = mOwnerWarning; - LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2)); + LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2)); return; // we'll be called again if user confirms } } diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 25a21a7fd..48115837a 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -49,6 +49,7 @@ #include "llbutton.h" #include "lliconctrl.h" #include "llcheckboxctrl.h" +#include "llnotificationsutil.h" #include "llscrolllistctrl.h" #include "lltextbox.h" @@ -56,7 +57,6 @@ #include "llviewerwindow.h" #include "llviewercontrol.h" #include "llviewermessage.h" -#include "llnotifications.h" const S32 NOTICE_DATE_STRING_SIZE = 30; @@ -352,7 +352,7 @@ void LLPanelGroupNotices::onClickSendMessage(void* data) if (self->mCreateSubject->getText().empty()) { // Must supply a subject - LLNotifications::instance().add("MustSpecifyGroupNoticeSubject"); + LLNotificationsUtil::add("MustSpecifyGroupNoticeSubject"); return; } send_group_notice( diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index fe42aef8d..be41b0f87 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -41,7 +41,7 @@ #include "lliconctrl.h" #include "lllineeditor.h" #include "llnamelistctrl.h" -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llpanelgrouproles.h" #include "llscrolllistctrl.h" #include "lltabcontainer.h" @@ -241,7 +241,7 @@ BOOL LLPanelGroupRoles::attemptTransition() LLSD args; args["NEEDS_APPLY_MESSAGE"] = mesg; args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; - LLNotifications::instance().add("PanelGroupApply", args, LLSD(), + LLNotificationsUtil::add("PanelGroupApply", args, LLSD(), boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2)); mHasModal = TRUE; // We need to reselect the current tab, since it isn't finished. @@ -301,7 +301,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS mHasModal = TRUE; LLSD args; args["MESSAGE"] = apply_mesg; - LLNotifications::instance().add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2)); + LLNotificationsUtil::add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2)); } // Skip switching tabs. break; @@ -1370,7 +1370,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) { mHasModal = TRUE; args["ROLE_NAME"] = rd.mRoleName; - LLNotifications::instance().add("AddGroupOwnerWarning", + LLNotificationsUtil::add("AddGroupOwnerWarning", args, LLSD(), boost::bind(&LLPanelGroupMembersSubTab::addOwnerCB, this, _1, _2)); @@ -2397,7 +2397,7 @@ void LLPanelGroupRolesSubTab::handleDeleteRole() { LLSD args; args["MESSAGE"] = mRemoveEveryoneTxt; - LLNotifications::instance().add("GenericAlert", args); + LLNotificationsUtil::add("GenericAlert", args); return; } diff --git a/indra/newview/llpanelgroupvoting.cpp b/indra/newview/llpanelgroupvoting.cpp index 162806c63..5094d1c26 100644 --- a/indra/newview/llpanelgroupvoting.cpp +++ b/indra/newview/llpanelgroupvoting.cpp @@ -35,6 +35,7 @@ #include "roles_constants.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "lltextbox.h" #include "lltexteditor.h" #include "llscrolllistctrl.h" @@ -648,7 +649,7 @@ void LLPanelGroupVoting::handleResponse( args["MESSAGE"] = self->mPanel.getString("vote_previously_recorded"); } - LLNotifications::instance().add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessage", args); self->sendGroupVoteHistoryRequest(self->mGroupID); } @@ -1357,7 +1358,7 @@ void LLPanelGroupVoting::impl::onClickSubmitProposal(void *userdata) //throw up an error dialog LLSD args; args["MESSAGE"] = self->mPanel.getString("empty_proposal_txt"); - LLNotifications::instance().add("GenericAlert", args); + LLNotificationsUtil::add("GenericAlert", args); return; } @@ -1400,7 +1401,7 @@ void LLPanelGroupVoting::impl::onClickViewProposalItem(void *userdata) } else { - LLNotifications::instance().add("SelectProposalToView"); + LLNotificationsUtil::add("SelectProposalToView"); } } } @@ -1440,7 +1441,7 @@ void LLPanelGroupVoting::impl::onClickViewHistoryItem(void *userdata) } else { - LLNotifications::instance().add("SelectHistoryItemToView"); + LLNotificationsUtil::add("SelectHistoryItemToView"); } } } diff --git a/indra/newview/llpanelinventory.cpp b/indra/newview/llpanelinventory.cpp index 5e090f009..4fc93bcc7 100644 --- a/indra/newview/llpanelinventory.cpp +++ b/indra/newview/llpanelinventory.cpp @@ -51,6 +51,7 @@ #include "llassetstorage.h" #include "llinventory.h" #include "llinventorydefines.h" +#include "llnotificationsutil.h" #include "llagent.h" #include "llcallbacklist.h" @@ -233,7 +234,7 @@ void LLTaskInvFVBridge::buyItem() LLViewerObject* obj; if( ( obj = gObjectList.findObject( mPanel->getTaskUUID() ) ) && obj->isAttachment() ) { - LLNotifications::instance().add("Cannot_Purchase_an_Attachment"); + LLNotificationsUtil::add("Cannot_Purchase_an_Attachment"); llinfos << "Attempt to purchase an attachment" << llendl; delete inv; } @@ -533,7 +534,7 @@ BOOL LLTaskInvFVBridge::removeItem() LLSD payload; payload["task_id"] = mPanel->getTaskUUID(); payload["inventory_ids"].append(mUUID); - LLNotifications::instance().add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); + LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); return FALSE; } } @@ -563,7 +564,7 @@ void LLTaskInvFVBridge::removeBatch(LLDynamicArray& LLTaskInvFVBridge* itemp = (LLTaskInvFVBridge*)batch[i]; payload["inventory_ids"].append(itemp->getUUID()); } - LLNotifications::instance().add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); + LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); } else diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index 05de7fdc4..f3591c0ad 100644 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -40,6 +40,7 @@ #include "llbutton.h" #include "llcheckboxctrl.h" #include "llfloaterland.h" +#include "llnotificationsutil.h" #include "lltextbox.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" @@ -280,5 +281,5 @@ void LLPanelLandInfo::onClickAbout(void*) void LLPanelLandInfo::onShowOwnersHelp(void* user_data) { - LLNotifications::instance().add("ShowOwnersHelp"); + LLNotificationsUtil::add("ShowOwnersHelp"); } diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index dd38bdbd4..ce9f17f6e 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -47,6 +47,7 @@ #include "llfloaterurlentry.h" #include "llfocusmgr.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "lltextbox.h" #include "llradiogroup.h" @@ -197,5 +198,5 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) // static void LLPanelLandAudio::onClickSoundHelp(void*) { - LLNotifications::instance().add("ClickSoundHelpLand"); + LLNotificationsUtil::add("ClickSoundHelpLand"); } diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 1920750be..ae4eacfee 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -56,6 +56,7 @@ #include "llfloaterpreference.h" #include "llfocusmgr.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llstartup.h" #include "lltextbox.h" #include "llui.h" @@ -1111,9 +1112,9 @@ void LLPanelLogin::onClickConnect(void *) else { if (gHippoGridManager->getConnectedGrid()->getRegisterUrl().empty()) { - LLNotifications::instance().add("MustHaveAccountToLogInNoLinks"); + LLNotificationsUtil::add("MustHaveAccountToLogInNoLinks"); } else { - LLNotifications::instance().add("MustHaveAccountToLogIn", LLSD(), LLSD(), + LLNotificationsUtil::add("MustHaveAccountToLogIn", LLSD(), LLSD(), LLPanelLogin::newAccountAlertCallback); } } @@ -1207,7 +1208,7 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) { - LLNotifications::instance().add("CapsKeyOn"); + LLNotificationsUtil::add("CapsKeyOn"); sCapslockDidNotification = TRUE; } } diff --git a/indra/newview/llpanelmsgs.cpp b/indra/newview/llpanelmsgs.cpp index e0b105293..96fe7129b 100644 --- a/indra/newview/llpanelmsgs.cpp +++ b/indra/newview/llpanelmsgs.cpp @@ -34,6 +34,7 @@ #include "llpanelmsgs.h" +#include "llnotificationsutil.h" #include "llscrolllistctrl.h" #include "llviewerwindow.h" #include "llviewercontrol.h" @@ -222,7 +223,7 @@ bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLPa // static void LLPanelMsgs::onClickResetDialogs(void* user_data) { - LLNotifications::instance().add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, (LLPanelMsgs*)user_data)); + LLNotificationsUtil::add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, (LLPanelMsgs*)user_data)); } bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLPanelMsgs* panelp) @@ -243,5 +244,5 @@ bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLPan // static void LLPanelMsgs::onClickSkipDialogs(void* user_data) { - LLNotifications::instance().add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, (LLPanelMsgs*)user_data)); + LLNotificationsUtil::add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, (LLPanelMsgs*)user_data)); } diff --git a/indra/newview/llpanelnetwork.cpp b/indra/newview/llpanelnetwork.cpp index 003af8116..ebe4b1f84 100644 --- a/indra/newview/llpanelnetwork.cpp +++ b/indra/newview/llpanelnetwork.cpp @@ -41,6 +41,7 @@ #include "llradiogroup.h" #include "statemachine/aidirpicker.h" #include "lluictrlfactory.h" +#include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llviewerwindow.h" @@ -126,7 +127,7 @@ void LLPanelNetwork::apply() { if (LLStartUp::getStartupState() != STATE_LOGIN_WAIT) { - LLNotifications::instance().add("ProxyNeedRestart"); + LLNotificationsUtil::add("ProxyNeedRestart"); } else { @@ -145,7 +146,7 @@ void LLPanelNetwork::onClickClearCache(void*) { // flag client cache for clearing next time the client runs gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); - LLNotifications::instance().add("CacheWillClear"); + LLNotificationsUtil::add("CacheWillClear"); } // static @@ -172,7 +173,7 @@ void LLPanelNetwork::onClickSetCache_continued(void* user_data, AIDirPicker* dir if (!dir_name.empty() && dir_name != cur_name) { self->childSetText("cache_location", dir_name); - LLNotifications::instance().add("CacheWillBeMoved"); + LLNotificationsUtil::add("CacheWillBeMoved"); gSavedSettings.setString("NewCacheLocation", dir_name); } else @@ -192,7 +193,7 @@ void LLPanelNetwork::onClickResetCache(void* user_data) return; } gSavedSettings.setString("NewCacheLocation", ""); - LLNotifications::instance().add("CacheWillBeMoved"); + LLNotificationsUtil::add("CacheWillBeMoved"); std::string cache_location = gDirUtilp->getCacheDir(false); self->childSetText("cache_location", cache_location); } @@ -205,7 +206,7 @@ void LLPanelNetwork::onCommitPort(LLUICtrl* ctrl, void* data) if (!self || !check) return; self->childSetEnabled("connection_port", check->get()); - LLNotifications::instance().add("ChangeConnectionPort"); + LLNotificationsUtil::add("ChangeConnectionPort"); } // static diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index f19a5b30b..b92632337 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -53,6 +53,7 @@ #include "llcombobox.h" #include "llfocusmgr.h" #include "llmanipscale.h" +#include "llnotificationsutil.h" #include "llpanelinventory.h" #include "llpreviewscript.h" #include "llresmgr.h" @@ -2544,7 +2545,7 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata) // static void LLPanelObject::onClickBuildConstants(void *) { - LLNotifications::instance().add("ClickBuildConstants"); + LLNotificationsUtil::add("ClickBuildConstants"); } std::string shortfloat(F32 in) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 9a0b0dce5..8e42927fd 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -41,6 +41,7 @@ #include "llcategory.h" #include "llclickaction.h" #include "llfocusmgr.h" +#include "llnotificationsutil.h" #include "llstring.h" #include "llviewerwindow.h" @@ -1194,7 +1195,7 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*) LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); if (!sale_info.isForSale()) { - LLNotifications::instance().add("CantSetBuyObject"); + LLNotificationsUtil::add("CantSetBuyObject"); // Set click action back to its old value U8 click_action = 0; @@ -1212,7 +1213,7 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*) if (!can_pay) { // Warn, but do it anyway. - LLNotifications::instance().add("ClickActionNotPayable"); + LLNotificationsUtil::add("ClickActionNotPayable"); } } LLSelectMgr::getInstance()->selectionSetClickAction(click_action); diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index a33b3dd60..aece29b17 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -59,6 +59,7 @@ #include "llfloaterworldmap.h" #include "llviewerregion.h" #include "llviewerwindow.h" +#include "llnotificationsutil.h" // [RLVa:KB] #include "rlvhandler.h" @@ -596,7 +597,7 @@ void LLPanelPick::onClickSet(void* data) // is the location and nothing else if ( gAgent.getRegion ()->getName () != self->mSimName ) { - LLNotifications::instance().add("SetPickLocation"); + LLNotificationsUtil::add("SetPickLocation"); }; self->mLocationEditor->setText(location_text); diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp index 35499f581..38b75572a 100644 --- a/indra/newview/llpanelplace.cpp +++ b/indra/newview/llpanelplace.cpp @@ -47,6 +47,7 @@ #include "llbutton.h" #include "llfloaterworldmap.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "lluiconstants.h" #include "lltextbox.h" #include "llviewertexteditor.h" @@ -460,7 +461,7 @@ void LLPanelPlace::onClickAuction(void* data) LLSD payload; payload["auction_id"] = self->mAuctionID; - LLNotifications::instance().add("GoToAuctionPage", LLSD(), payload, callbackAuctionWebPage); + LLNotificationsUtil::add("GoToAuctionPage", LLSD(), payload, callbackAuctionWebPage); } // static diff --git a/indra/newview/llpanelskins.cpp b/indra/newview/llpanelskins.cpp index 7be656031..828598c3d 100644 --- a/indra/newview/llpanelskins.cpp +++ b/indra/newview/llpanelskins.cpp @@ -39,6 +39,7 @@ #include "llbutton.h" #include "lluictrlfactory.h" #include "lldiriterator.h" +#include "llnotificationsutil.h" // project includes #include "llviewercontrol.h" @@ -147,7 +148,7 @@ void LLPanelSkins::apply() if (oldSkin != mSkin) { oldSkin=mSkin; - LLNotifications::instance().add("ChangeSkin"); + LLNotificationsUtil::add("ChangeSkin"); refresh(); } } diff --git a/indra/newview/llpanelweb.cpp b/indra/newview/llpanelweb.cpp index 955c4b668..9f60ecda4 100644 --- a/indra/newview/llpanelweb.cpp +++ b/indra/newview/llpanelweb.cpp @@ -37,6 +37,7 @@ // project includes #include "llcheckboxctrl.h" +#include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "llviewercontrol.h" #include "llviewermedia.h" @@ -116,7 +117,7 @@ void LLPanelWeb::cancel() // static void LLPanelWeb::onClickClearCache(void*) { - LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); + LLNotificationsUtil::add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); } //static @@ -135,7 +136,7 @@ bool LLPanelWeb::callback_clear_browser_cache(const LLSD& notification, const LL // static void LLPanelWeb::onClickClearCookies(void*) { - LLNotifications::instance().add("ConfirmClearCookies", LLSD(), LLSD(), callback_clear_cookies); + LLNotificationsUtil::add("ConfirmClearCookies", LLSD(), LLSD(), callback_clear_cookies); } //static diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 880b0a14e..1cd3b5162 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -58,7 +58,7 @@ #include "llinventorymodel.h" #include "llkeyboard.h" #include "lllineeditor.h" -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llradiogroup.h" #include "llscrolllistctrl.h" #include "lltextbox.h" @@ -287,7 +287,7 @@ BOOL LLPreviewGesture::canClose() else { // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotifications::instance().add("SaveChanges", LLSD(), LLSD(), + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) ); return FALSE; } @@ -1127,14 +1127,14 @@ void LLPreviewGesture::saveIfNeeded() if(0) // { - LLNotifications::instance().add("GestureSaveFailedTooManySteps"); + LLNotificationsUtil::add("GestureSaveFailedTooManySteps"); delete gesture; gesture = NULL; } else if (!ok) { - LLNotifications::instance().add("GestureSaveFailedTryAgain"); + LLNotificationsUtil::add("GestureSaveFailedTryAgain"); delete gesture; gesture = NULL; } @@ -1273,7 +1273,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, } else { - LLNotifications::instance().add("GestureSaveFailedObjectNotFound"); + LLNotificationsUtil::add("GestureSaveFailedObjectNotFound"); } } @@ -1289,7 +1289,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, llwarns << "Problem saving gesture: " << status << llendl; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); - LLNotifications::instance().add("GestureSaveFailedReason", args); + LLNotificationsUtil::add("GestureSaveFailedReason", args); } delete info; info = NULL; diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index df35fa406..98ed9a409 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -44,7 +44,7 @@ #include "llbutton.h" #include "llinventorymodel.h" #include "lllineeditor.h" -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llresmgr.h" #include "roles_constants.h" #include "llscrollbar.h" @@ -238,7 +238,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; } @@ -413,15 +413,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; @@ -632,7 +632,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data } else { - LLNotifications::instance().add("SaveNotecardFailObjectNotFound"); + LLNotificationsUtil::add("SaveNotecardFailObjectNotFound"); } } // Perform item copy to inventory @@ -657,7 +657,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; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index ac9d720c5..3019fca11 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -45,6 +45,7 @@ #include "llkeyboard.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llresmgr.h" #include "llscrollbar.h" #include "llscrollcontainer.h" @@ -708,7 +709,7 @@ 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; } } @@ -766,7 +767,7 @@ void LLScriptEdCore::onBtnHelp(void* userdata) LLScriptEdCore* corep = (LLScriptEdCore*)userdata; LLSD payload; payload["help_url"] = corep->mHelpURL; - LLNotifications::instance().add("WebLaunchLSLGuide", LLSD(), payload, onHelpWebDialog); + LLNotificationsUtil::add("WebLaunchLSLGuide", LLSD(), payload, onHelpWebDialog); } // static @@ -925,7 +926,7 @@ void LLScriptEdCore::onBtnUndoChanges( void* userdata ) LLScriptEdCore* self = (LLScriptEdCore*) userdata; if( !self->mEditor->tryToRevertToPristineState() ) { - LLNotifications::instance().add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, self, _1, _2)); + LLNotificationsUtil::add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, self, _1, _2)); } } @@ -1563,7 +1564,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; } @@ -1601,7 +1602,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; } @@ -1647,15 +1648,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; @@ -1995,15 +1996,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; } @@ -2097,7 +2098,7 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata ) else { runningCheckbox->set(!running); - LLNotifications::instance().add("CouldNotStartStopScript"); + LLNotificationsUtil::add("CouldNotStartStopScript"); } } @@ -2127,7 +2128,7 @@ void LLLiveLSLEditor::onReset(void *userdata) } else { - LLNotifications::instance().add("CouldNotStartStopScript"); + LLNotificationsUtil::add("CouldNotStartStopScript"); } } @@ -2221,7 +2222,7 @@ void LLLiveLSLEditor::saveIfNeeded() LLViewerObject* object = gObjectList.findObject(mObjectID); if(!object) { - LLNotifications::instance().add("SaveScriptFailObjectNotFound"); + LLNotificationsUtil::add("SaveScriptFailObjectNotFound"); return; } @@ -2229,7 +2230,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; } @@ -2433,7 +2434,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 { @@ -2494,7 +2495,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()); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index e23e662ec..9e0fa56b4 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -41,6 +41,7 @@ #include "llimagetga.h" #include "llinventoryview.h" #include "llinventory.h" +#include "llnotificationsutil.h" #include "llresmgr.h" #include "lltextbox.h" #include "lltextureview.h" @@ -436,13 +437,13 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success, { LLSD args; args["FILE"] = self->mSaveFileName; - LLNotifications::instance().add("CannotEncodeFile", args); + LLNotificationsUtil::add("CannotEncodeFile", args); } else if( !image_tga->save( self->mSaveFileName ) ) { LLSD args; args["FILE"] = self->mSaveFileName; - LLNotifications::instance().add("CannotWriteFile", args); + LLNotificationsUtil::add("CannotWriteFile", args); } else { @@ -455,7 +456,7 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success, if( self && !success ) { - LLNotifications::instance().add("CannotDownloadFile"); + LLNotificationsUtil::add("CannotDownloadFile"); } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e60243241..f9adea36b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -42,6 +42,7 @@ #include "lleconomy.h" #include "llgl.h" #include "llrender.h" +#include "llnotifications.h" #include "llpermissions.h" #include "llpermissionsflags.h" #include "llundo.h" @@ -67,6 +68,7 @@ #include "llinventorymodel.h" #include "llmenugl.h" #include "llmutelist.h" +#include "llnotificationsutil.h" #include "llstatusbar.h" #include "llsurface.h" #include "lltool.h" @@ -571,7 +573,7 @@ bool LLSelectMgr::linkObjects() { if (!LLSelectMgr::getInstance()->selectGetAllRootsValid()) { - LLNotifications::getInstance()->add("UnableToLinkWhileDownloading"); + LLNotificationsUtil::add("UnableToLinkWhileDownloading"); return true; } @@ -582,19 +584,19 @@ bool LLSelectMgr::linkObjects() args["COUNT"] = llformat("%d", object_count); int max = MAX_CHILDREN_PER_TASK+1; args["MAX"] = llformat("%d", max); - LLNotifications::getInstance()->add("UnableToLinkObjects", args); + LLNotificationsUtil::add("UnableToLinkObjects", args); return true; } if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) { - LLNotifications::instance().add("CannotLinkIncompleteSet"); + LLNotificationsUtil::add("CannotLinkIncompleteSet"); return true; } if (!LLSelectMgr::getInstance()->selectGetRootsModify()) { - LLNotifications::instance().add("CannotLinkModify"); + LLNotificationsUtil::add("CannotLinkModify"); return true; } @@ -605,7 +607,7 @@ bool LLSelectMgr::linkObjects() // we don't actually care if you're the owner, but novices are // the most likely to be stumped by this one, so offer the // easiest and most likely solution. - LLNotifications::instance().add("CannotLinkDifferentOwners"); + LLNotificationsUtil::add("CannotLinkDifferentOwners"); return true; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a228bb8f8..daa970787 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -72,6 +72,8 @@ #include "llmemorystream.h" #include "llmessageconfig.h" #include "llmoveview.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llregionhandle.h" #include "llsd.h" #include "llsdserialize.h" @@ -422,12 +424,12 @@ bool idle_startup() if (LLFeatureManager::getInstance()->isSafe()) { - LLNotifications::instance().add("DisplaySetToSafe"); + LLNotificationsUtil::add("DisplaySetToSafe"); } else if ((gSavedSettings.getS32("LastFeatureVersion") < LLFeatureManager::getInstance()->getVersion()) && (gSavedSettings.getS32("LastFeatureVersion") != 0)) { - LLNotifications::instance().add("DisplaySetToRecommended"); + LLNotificationsUtil::add("DisplaySetToRecommended"); } else if (!gViewerWindow->getInitAlert().empty()) { @@ -1862,7 +1864,7 @@ bool idle_startup() // Bounce back to the login screen. LLSD args; args["ERROR_MESSAGE"] = emsg.str(); - LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); + LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); reset_login(); gSavedSettings.setBOOL("AutoLogin", FALSE); show_connect_box = true; @@ -1882,7 +1884,7 @@ bool idle_startup() // Bounce back to the login screen. LLSD args; args["ERROR_MESSAGE"] = emsg.str(); - LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); + LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); reset_login(); gSavedSettings.setBOOL("AutoLogin", FALSE); show_connect_box = true; @@ -2691,7 +2693,7 @@ bool idle_startup() args["TYPE"] = "home"; args["HELP"] = "You may want to set a new home location."; } - LLNotifications::instance().add("AvatarMoved", args); + LLNotificationsUtil::add("AvatarMoved", args); } else { @@ -2792,7 +2794,7 @@ bool idle_startup() // initial outfit, but if the load hasn't started // already then something is wrong so fall back // to generic outfits. JC - LLNotifications::instance().add("WelcomeChooseSex", LLSD(), LLSD(), + LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(), callback_choose_gender); LLStartUp::setStartupState( STATE_CLEANUP ); return TRUE; @@ -2800,7 +2802,7 @@ bool idle_startup() if (wearables_time > MAX_WEARABLES_TIME) { - LLNotifications::instance().add("ClothingLoading"); + LLNotificationsUtil::add("ClothingLoading"); LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG); LLStartUp::setStartupState( STATE_CLEANUP ); return TRUE; @@ -3088,7 +3090,7 @@ void LLStartUp::deletePasswordFromDisk() void show_first_run_dialog() { - LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); + LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); } bool first_run_dialog_callback(const LLSD& notification, const LLSD& response) @@ -3375,7 +3377,7 @@ void use_circuit_callback(void**, S32 result) { // Make sure user knows something bad happened. JC LL_WARNS("AppInit") << "Backing up to login screen!" << LL_ENDL; - LLNotifications::instance().add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status); + LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status); reset_login(); } else @@ -3962,33 +3964,33 @@ bool LLStartUp::handleSocksProxy(bool reportOK) case SOCKS_OK: if (reportOK == true) { - LLNotifications::instance().add("SOCKS_CONNECT_OK", subs); + LLNotificationsUtil::add("SOCKS_CONNECT_OK", subs); } return true; break; case SOCKS_CONNECT_ERROR: // TCP Fail - LLNotifications::instance().add("SOCKS_CONNECT_ERROR", subs); + LLNotificationsUtil::add("SOCKS_CONNECT_ERROR", subs); break; case SOCKS_NOT_PERMITTED: // Socks5 server rule set refused connection - LLNotifications::instance().add("SOCKS_NOT_PERMITTED", subs); + LLNotificationsUtil::add("SOCKS_NOT_PERMITTED", subs); break; case SOCKS_NOT_ACCEPTABLE: // Selected authentication is not acceptable to server - LLNotifications::instance().add("SOCKS_NOT_ACCEPTABLE", subs); + LLNotificationsUtil::add("SOCKS_NOT_ACCEPTABLE", subs); break; case SOCKS_AUTH_FAIL: // Authentication failed - LLNotifications::instance().add("SOCKS_AUTH_FAIL", subs); + LLNotificationsUtil::add("SOCKS_AUTH_FAIL", subs); break; case SOCKS_UDP_FWD_NOT_GRANTED: // UDP forward request failed - LLNotifications::instance().add("SOCKS_UDP_FWD_NOT_GRANTED", subs); + LLNotificationsUtil::add("SOCKS_UDP_FWD_NOT_GRANTED", subs); break; case SOCKS_HOST_CONNECT_FAILED: // Failed to open a TCP channel to the socks server - LLNotifications::instance().add("SOCKS_HOST_CONNECT_FAILED", subs); + LLNotificationsUtil::add("SOCKS_HOST_CONNECT_FAILED", subs); break; } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 036d4f76f..e6838b499 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -80,6 +80,7 @@ #include "llfontgl.h" #include "llrect.h" #include "llerror.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "llstring.h" #include "message.h" @@ -794,7 +795,7 @@ static void onClickBuyCurrency(void* data) static void onClickHealth(void* ) { - LLNotifications::instance().add("NotSafe"); + LLNotificationsUtil::add("NotSafe"); } static void onClickScriptDebug(void*) @@ -804,22 +805,22 @@ static void onClickScriptDebug(void*) static void onClickFly(void* ) { - LLNotifications::instance().add("NoFly"); + LLNotificationsUtil::add("NoFly"); } static void onClickPush(void* ) { - LLNotifications::instance().add("PushRestricted"); + LLNotificationsUtil::add("PushRestricted"); } static void onClickVoice(void* ) { - LLNotifications::instance().add("NoVoice"); + LLNotificationsUtil::add("NoVoice"); } static void onClickBuild(void*) { - LLNotifications::instance().add("NoBuild"); + LLNotificationsUtil::add("NoBuild"); } static void onClickScripts(void*) @@ -827,15 +828,15 @@ static void onClickScripts(void*) LLViewerRegion* region = gAgent.getRegion(); if(region && region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) { - LLNotifications::instance().add("ScriptsStopped"); + LLNotificationsUtil::add("ScriptsStopped"); } else if(region && region->getRegionFlags() & REGION_FLAGS_SKIP_SCRIPTS) { - LLNotifications::instance().add("ScriptsNotRunning"); + LLNotificationsUtil::add("ScriptsNotRunning"); } else { - LLNotifications::instance().add("NoOutsideScripts"); + LLNotificationsUtil::add("NoOutsideScripts"); } } diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 09773d6c7..b1268fc1d 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -36,6 +36,7 @@ #include "lltoolselectland.h" #include "llgl.h" +#include "llnotificationsutil.h" #include "llrender.h" #include "message.h" @@ -673,7 +674,7 @@ void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp) LLSD args; args["REGION"] = regionp->getName(); - LLNotifications::instance().add("RegionNoTerraforming", args); + LLNotificationsUtil::add("RegionNoTerraforming", args); } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 7d3e44886..64fd39527 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -35,6 +35,8 @@ #include "message.h" #include "lltooldraganddrop.h" +#include "llnotificationsutil.h" + #include "llinstantmessage.h" #include "lldir.h" @@ -1087,7 +1089,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, hit_obj->fetchInventoryFromServer(); LLSD args; args["ERROR_MESSAGE"] = "Unable to add texture.\nPlease wait a few seconds and try again."; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); return FALSE; } if (hit_obj->getInventoryItemByAsset(item->getAssetUUID())) @@ -1580,7 +1582,7 @@ void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, LLSD payload; payload["agent_id"] = to_agent; payload["item_id"] = item->getUUID(); - LLNotifications::instance().add("CannotCopyWarning", LLSD(), payload, + LLNotificationsUtil::add("CannotCopyWarning", LLSD(), payload, &LLToolDragAndDrop::handleCopyProtectedItem); } } @@ -1604,12 +1606,12 @@ bool LLToolDragAndDrop::handleCopyProtectedItem(const LLSD& notification, const } else { - LLNotifications::instance().add("CannotGiveItem"); + LLNotificationsUtil::add("CannotGiveItem"); } break; default: // no, cancel, whatever, who cares, not yes. - LLNotifications::instance().add("TransactionCancelled"); + LLNotificationsUtil::add("TransactionCancelled"); break; } return false; @@ -1709,18 +1711,18 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, } if(!complete) { - LLNotifications::instance().add("IncompleteInventory"); + LLNotificationsUtil::add("IncompleteInventory"); return; } count = items.count() + cats.count(); if(count > MAX_ITEMS) { - LLNotifications::instance().add("TooManyItems"); + LLNotificationsUtil::add("TooManyItems"); return; } else if(count == 0) { - LLNotifications::instance().add("NoItems"); + LLNotificationsUtil::add("NoItems"); return; } else @@ -1738,7 +1740,7 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, LLSD payload; payload["agent_id"] = to_agent; payload["folder_id"] = cat->getUUID(); - LLNotifications::instance().add("CannotCopyCountItems", args, payload, &LLToolDragAndDrop::handleCopyProtectedCategory); + LLNotificationsUtil::add("CannotCopyCountItems", args, payload, &LLToolDragAndDrop::handleCopyProtectedCategory); } } } @@ -1774,12 +1776,12 @@ bool LLToolDragAndDrop::handleCopyProtectedCategory(const LLSD& notification, co } else { - LLNotifications::instance().add("CannotGiveCategory"); + LLNotificationsUtil::add("CannotGiveCategory"); } break; default: // no, cancel, whatever, who cares, not yes. - LLNotifications::instance().add("TransactionCancelled"); + LLNotificationsUtil::add("TransactionCancelled"); break; } return false; @@ -1811,12 +1813,12 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, S32 count = items.count() + cats.count(); if(count > MAX_ITEMS) { - LLNotifications::instance().add("TooManyItems"); + LLNotificationsUtil::add("TooManyItems"); return; } else if(count == 0) { - LLNotifications::instance().add("NoItems"); + LLNotificationsUtil::add("NoItems"); return; } else @@ -2562,7 +2564,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( // destroy clothing items. if (!gAgentWearables.areWearablesLoaded()) { - LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded"); + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return ACCEPT_NO; } @@ -2657,7 +2659,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( // destroy clothing items. if (!gAgentWearables.areWearablesLoaded()) { - LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded"); + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return ACCEPT_NO; } } diff --git a/indra/newview/lltrans.cpp b/indra/newview/lltrans.cpp index b6a2382a9..187782d5e 100644 --- a/indra/newview/lltrans.cpp +++ b/indra/newview/lltrans.cpp @@ -36,6 +36,7 @@ #include "llxmlnode.h" #include "lluictrlfactory.h" #include "llalertdialog.h" +#include "llnotificationsutil.h" #include @@ -93,7 +94,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil:: LLSD args; args["STRING_NAME"] = xml_desc; LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL; - LLNotifications::instance().add("MissingString", args); + LLNotificationsUtil::add("MissingString", args); return xml_desc; } diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index 8aca75b43..f4f23c85a 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -23,9 +23,7 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -/* -Ported to Phoenix by Wolfspirit Magic. -*/ + #include "llviewerprecompiledheaders.h" #include "llviewerdisplayname.h" @@ -39,7 +37,7 @@ Ported to Phoenix by Wolfspirit Magic. #include "llavatarnamecache.h" #include "llhttpclient.h" #include "llhttpnode.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llui.h" // getLanguage() namespace LLViewerDisplayName @@ -194,7 +192,7 @@ class LLDisplayNameUpdate : public LLHTTPNode args["OLD_NAME"] = old_display_name; args["SLID"] = av_name.mUsername; args["NEW_NAME"] = av_name.mDisplayName; - LLNotifications::instance().add("DisplayNameUpdate", args); + LLNotificationsUtil::add("DisplayNameUpdate", args); if (agent_id == gAgent.getID()) { LLViewerDisplayName::sNameChangedSignal(); diff --git a/indra/newview/llviewerdisplayname.h b/indra/newview/llviewerdisplayname.h index 6066cc880..16d59ae43 100644 --- a/indra/newview/llviewerdisplayname.h +++ b/indra/newview/llviewerdisplayname.h @@ -23,9 +23,7 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -/* -Ported to Phoenix by Wolfspirit Magic. -*/ + #ifndef LLVIEWERDISPLAYNAME_H #define LLVIEWERDISPLAYNAME_H diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index c48e6eea8..2231172b7 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llviewerinventory.h" +#include "llnotificationsutil.h" #include "message.h" #include "indra_constants.h" @@ -193,7 +194,7 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const // *FIX: deal with this better. llwarns << "LLViewerInventoryItem::updateServer() - for incomplete item" << llendl; - LLNotifications::instance().add("IncompleteInventoryItem"); + LLNotificationsUtil::add("IncompleteInventoryItem"); return; } LLInventoryModel::LLCategoryUpdate up(mParentUUID, is_new ? 1 : 0); @@ -444,7 +445,7 @@ void LLViewerInventoryCategory::updateServer(BOOL is_new) const // communicate that change with the server. if ( (LLFolderType::FT_NONE != mPreferredType) && (LLFolderType::FT_OUTFIT != mPreferredType) ) { - LLNotifications::instance().add("CannotModifyProtectedCategories"); + LLNotificationsUtil::add("CannotModifyProtectedCategories"); return; } @@ -468,7 +469,7 @@ void LLViewerInventoryCategory::removeFromServer( void ) // communicate that change with the server. if ( (LLFolderType::FT_NONE != mPreferredType) && (LLFolderType::FT_OUTFIT != mPreferredType) ) { - LLNotifications::instance().add("CannotRemoveProtectedCategories"); + LLNotificationsUtil::add("CannotRemoveProtectedCategories"); return; } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 4b086f808..1c6957e3d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -43,7 +43,9 @@ #include "llpluginclassmedia.h" +#include "llnotifications.h" #include "llevent.h" // LLSimpleListener +#include "llnotificationsutil.h" #include "lluuid.h" #include "llkeyboard.h" @@ -334,7 +336,7 @@ bool LLViewerMediaImpl::initializeMedia(const std::string& mime_type) LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << mime_type << LL_ENDL; LLSD args; args["MIME_TYPE"] = mime_type; - LLNotifications::instance().add("NoPlugin", args); + LLNotificationsUtil::add("NoPlugin", args); return false; } @@ -440,7 +442,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL; LLSD args; args["MIME_TYPE"] = media_type; - LLNotifications::instance().add("NoPlugin", args); + LLNotificationsUtil::add("NoPlugin", args); return NULL; } @@ -1124,7 +1126,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* self, LLPluginClass { LLSD args; args["PLUGIN"] = LLMIMETypes::implType(mMimeType); - LLNotifications::instance().add("MediaPluginFailed", args); + LLNotificationsUtil::add("MediaPluginFailed", args); } break; default: diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 089af342e..0debf03b6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -44,6 +44,8 @@ #include "indra_constants.h" #include "llassetstorage.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llchat.h" #include "llfeaturemanager.h" #include "llfocusmgr.h" @@ -3005,14 +3007,14 @@ class LLAvatarFreeze : public view_listener_t // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e | OK args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname); // [/RLVa:KB] - LLNotifications::instance().add("FreezeAvatarFullname", + LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, callback_freeze); } else { - LLNotifications::instance().add("FreezeAvatar", + LLNotificationsUtil::add("FreezeAvatar", LLSD(), payload, callback_freeze); @@ -3147,14 +3149,14 @@ class LLAvatarEject : public view_listener_t // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e | OK args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname); // [/RLVa:KB] - LLNotifications::instance().add("EjectAvatarFullname", + LLNotificationsUtil::add("EjectAvatarFullname", args, payload, callback_eject); } else { - LLNotifications::instance().add("EjectAvatarFullname", + LLNotificationsUtil::add("EjectAvatarFullname", LLSD(), payload, callback_eject); @@ -3170,14 +3172,14 @@ class LLAvatarEject : public view_listener_t // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e | OK args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname); // [/RLVa:KB] - LLNotifications::instance().add("EjectAvatarFullnameNoBan", + LLNotificationsUtil::add("EjectAvatarFullnameNoBan", args, payload, callback_eject); } else { - LLNotifications::instance().add("EjectAvatarNoBan", + LLNotificationsUtil::add("EjectAvatarNoBan", LLSD(), payload, callback_eject); @@ -3290,11 +3292,11 @@ class LLAvatarGiveCard : public view_listener_t transaction_id.generate(); msg->addUUIDFast(_PREHASH_TransactionID, transaction_id); msg->sendReliable(dest_host); - LLNotifications::instance().add("OfferedCard", args); + LLNotificationsUtil::add("OfferedCard", args); } else { - LLNotifications::instance().add("CantOfferCallingCard", old_args); + LLNotificationsUtil::add("CantOfferCallingCard", old_args); } } return true; @@ -3335,7 +3337,7 @@ void handle_leave_group(void *) { LLSD args; args["GROUP"] = gAgent.getGroupName(); - LLNotifications::instance().add("GroupLeaveConfirmMember", args, LLSD(), callback_leave_group); + LLNotificationsUtil::add("GroupLeaveConfirmMember", args, LLSD(), callback_leave_group); } } @@ -3398,7 +3400,7 @@ void handle_buy_object(LLSaleInfo sale_info) { if(!LLSelectMgr::getInstance()->selectGetAllRootsValid()) { - LLNotifications::instance().add("UnableToBuyWhileDownloading"); + LLNotificationsUtil::add("UnableToBuyWhileDownloading"); return; } @@ -3407,7 +3409,7 @@ void handle_buy_object(LLSaleInfo sale_info) BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { - LLNotifications::instance().add("CannotBuyObjectsFromDifferentOwners"); + LLNotificationsUtil::add("CannotBuyObjectsFromDifferentOwners"); return; } @@ -3417,7 +3419,7 @@ void handle_buy_object(LLSaleInfo sale_info) valid &= LLSelectMgr::getInstance()->selectGetAggregatePermissions(ag_perm); if(!valid || !sale_info.isForSale() || !perm.allowTransferTo(gAgent.getID())) { - LLNotifications::instance().add("ObjectNotForSale"); + LLNotificationsUtil::add("ObjectNotForSale"); return; } @@ -3630,12 +3632,12 @@ void set_god_level(U8 god_level) if(god_level > GOD_NOT) { args["LEVEL"] = llformat("%d",(S32)god_level); - LLNotifications::instance().add("EnteringGodMode", args); + LLNotificationsUtil::add("EnteringGodMode", args); } else { args["LEVEL"] = llformat("%d",(S32)old_god_level); - LLNotifications::instance().add("LeavingGodMode", args); + LLNotificationsUtil::add("LeavingGodMode", args); } @@ -3882,7 +3884,7 @@ void request_friendship(const LLUUID& dest_id) } else { - LLNotifications::instance().add("CantOfferFriendship"); + LLNotificationsUtil::add("CantOfferFriendship"); } } } @@ -4282,7 +4284,7 @@ void disabled_duplicate(void*) { if (LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()) { - LLNotifications::instance().add("CopyFailed"); + LLNotificationsUtil::add("CopyFailed"); } } @@ -4415,7 +4417,7 @@ void handle_claim_public_land(void*) { if (LLViewerParcelMgr::getInstance()->getSelectionRegion() != gAgent.getRegion()) { - LLNotifications::instance().add("ClaimPublicLand"); + LLNotificationsUtil::add("ClaimPublicLand"); return; } @@ -4693,7 +4695,7 @@ class LLObjectReturn : public view_listener_t mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); - LLNotifications::instance().add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2)); + LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2)); return true; } @@ -5084,7 +5086,7 @@ void show_buy_currency(const char* extra) args["EXTRA"] = extra; } args["URL"] = BUY_CURRENCY_URL; - LLNotifications::instance().add("PromptGoToCurrencyPage", args, LLSD(), callback_show_buy_currency); + LLNotificationsUtil::add("PromptGoToCurrencyPage", args, LLSD(), callback_show_buy_currency); } void handle_buy_currency(void*) @@ -5976,7 +5978,7 @@ class LLWorldSetBusy : public view_listener_t else { gAgent.setBusy(); - LLNotifications::instance().add("BusyModeSet"); + LLNotificationsUtil::add("BusyModeSet"); } return true; } @@ -6009,7 +6011,7 @@ class LLWorldCreateLandmark : public view_listener_t if (!agent_parcel->getAllowLandmark() && !LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK)) { - LLNotifications::instance().add("CannotCreateLandmarkNotOwner"); + LLNotificationsUtil::add("CannotCreateLandmarkNotOwner"); return true; } @@ -8952,7 +8954,7 @@ void handle_save_to_xml(void*) LLFloater* frontmost = gFloaterView->getFrontmost(); if (!frontmost) { - LLNotifications::instance().add("NoFrontmostFloater"); + LLNotificationsUtil::add("NoFrontmostFloater"); return; } diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 2c1aecaf8..db4ca65dd 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -77,6 +77,7 @@ #include "llassetuploadresponders.h" #include "lleconomy.h" #include "llhttpclient.h" +#include "llnotificationsutil.h" #include "llmemberlistener.h" #include "llsdserialize.h" #include "llstring.h" @@ -206,7 +207,7 @@ bool AIFileUpload::is_valid(std::string const& filename, ELoadFilter type) // No extension LLSD args; args["FILE"] = short_name; - LLNotifications::instance().add("NoFileExtension", args); + LLNotificationsUtil::add("NoFileExtension", args); return false; } else @@ -249,7 +250,7 @@ bool AIFileUpload::is_valid(std::string const& filename, ELoadFilter type) LLSD args; args["EXTENSION"] = ext; args["VALIDS"] = valid_extensions; - LLNotifications::instance().add("InvalidFileExtension", args); + LLNotificationsUtil::add("InvalidFileExtension", args); return false; } }//end else (non-null extension) @@ -354,7 +355,7 @@ class LLFileUploadBulk : public view_listener_t if(expected_upload_cost) msg.append(llformat("\nWARNING: Each upload costs L$%d if it's not temporary.",expected_upload_cost)); args["MESSAGE"] = msg; - LLNotifications::instance().add("GenericAlertYesNoCancel", args, LLSD(), onConfirmBulkUploadTemp); + LLNotificationsUtil::add("GenericAlertYesNoCancel", args, LLSD(), onConfirmBulkUploadTemp); return true; } @@ -959,7 +960,7 @@ void upload_new_resource(const std::string& src_filename, std::string name, llwarns << error_message << llendl; LLSD args; args["ERROR_MESSAGE"] = error_message; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); if(LLFile::remove(filename) == -1) { lldebugs << "unable to remove temp file" << llendl; @@ -1021,7 +1022,7 @@ void temp_upload_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt LLSD args; args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType); args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); - LLNotifications::instance().add("CannotUploadReason", args); + LLNotificationsUtil::add("CannotUploadReason", args); } LLUploadDialog::modalUploadFinished(); @@ -1114,7 +1115,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt LLSD args; args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType); args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); - LLNotifications::instance().add("CannotUploadReason", args); + LLNotificationsUtil::add("CannotUploadReason", args); } LLUploadDialog::modalUploadFinished(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7417404eb..16854280d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -101,8 +101,9 @@ #include "llinventoryview.h" #include "llmenugl.h" #include "llmutelist.h" -#include "llnotifications.h" #include "llnotify.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llpanelgrouplandmoney.h" #include "llselectmgr.h" #include "llstartup.h" @@ -741,7 +742,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) LLFloaterGroupInfo::showFromUUID(group_id); LLSD args; args["MESSAGE"] = message; - LLNotifications::instance().add("JoinGroup", args, notification["payload"]); + LLNotificationsUtil::add("JoinGroup", args, notification["payload"]); return false; } if(option == 0 && !group_id.isNull()) @@ -760,7 +761,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) LLSD args; args["NAME"] = name; args["INVITE"] = message; - LLNotifications::instance().add("JoinedTooManyGroupsMember", args, notification["payload"]); + LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]); } } @@ -778,7 +779,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) // asking about a fee. LLSD next_payload = notification["payload"]; next_payload["fee"] = 0; - LLNotifications::instance().add("JoinGroupCanAfford", + LLNotificationsUtil::add("JoinGroupCanAfford", args, next_payload); } @@ -1954,7 +1955,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Note: don't put the message in the IM history, even though was sent // via the IM mechanism. - LLNotifications::instance().add("SystemMessageTip",args); + LLNotificationsUtil::add("SystemMessageTip",args); break; case IM_NOTHING_SPECIAL: @@ -2055,7 +2056,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Message to everyone from GOD args["NAME"] = name; args["MESSAGE"] = message; - LLNotifications::instance().add("GodMessage", args); + LLNotificationsUtil::add("GodMessage", args); // Treat like a system message and put in chat history. // Claim to be from a local agent so it doesn't go into @@ -2136,7 +2137,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // This is a block, modeless dialog. //*TODO:translate args["MESSAGE"] = message; - LLNotifications::instance().add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessage", args); } break; case IM_GROUP_NOTICE: @@ -2272,7 +2273,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = message; - LLNotifications::instance().add("JoinGroup", args, payload, join_group_response); + LLNotificationsUtil::add("JoinGroup", args, payload, join_group_response); } } break; @@ -2372,7 +2373,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["NAME"] = (!fRlvObfuscate) ? name : RlvStrings::getAnonym(name); // [/RLVa:KB] //args["NAME"] = name; - LLNotifications::instance().add("InventoryAccepted", args); + LLNotificationsUtil::add("InventoryAccepted", args); break; } case IM_INVENTORY_DECLINED: @@ -2383,7 +2384,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["NAME"] = (!fRlvObfuscate) ? name : RlvStrings::getAnonym(name); // [/RLVa:KB] //args["NAME"] = name; - LLNotifications::instance().add("InventoryDeclined", args); + LLNotificationsUtil::add("InventoryDeclined", args); break; } case IM_GROUP_VOTE: @@ -2394,7 +2395,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD payload; payload["group_id"] = session_id; - LLNotifications::instance().add("GroupVote", args, payload); + LLNotificationsUtil::add("GroupVote", args, payload); } break; @@ -2541,7 +2542,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Construct a viewer alert for this message. args["NAME"] = name; args["MESSAGE"] = message; - LLNotifications::instance().add("ObjectMessage", args); + LLNotificationsUtil::add("ObjectMessage", args); } break; case IM_BUSY_AUTO_RESPONSE: @@ -2609,7 +2610,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["from_id"] = from_id; payload["lure_id"] = session_id; payload["godlike"] = FALSE; - //LLNotifications::instance().add("TeleportOffered", args, payload); + //LLNotificationsUtil::add("TeleportOffered", args, payload); // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b if ( (rlv_handler_t::isEnabled()) && @@ -2620,7 +2621,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - LLNotifications::instance().add("TeleportOffered", args, payload); + LLNotificationsUtil::add("TeleportOffered", args, payload); // if(binary_bucket_size) { @@ -2681,7 +2682,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // } // [/RLVa:KB] - //LLNotifications::instance().add("TeleportOffered", args, payload); + //LLNotificationsUtil::add("TeleportOffered", args, payload); } } break; @@ -2718,7 +2719,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["URL"] = url; LLSD payload; payload["url"] = url; - LLNotifications::instance().add("GotoURL", args, payload ); + LLNotificationsUtil::add("GotoURL", args, payload ); } break; @@ -2745,12 +2746,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if(message.empty()) { //support for frienship offers from clients before July 2008 - LLNotifications::instance().add("OfferFriendshipNoMessage", args, payload); + LLNotificationsUtil::add("OfferFriendshipNoMessage", args, payload); } else { args["[MESSAGE]"] = message; - LLNotifications::instance().add("OfferFriendship", args, payload); + LLNotificationsUtil::add("OfferFriendship", args, payload); } } } @@ -2768,7 +2769,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) send_generic_message("requestonlinenotification", strings); args["NAME"] = name; - LLNotifications::instance().add("FriendshipAccepted", args); + LLNotificationsUtil::add("FriendshipAccepted", args); } break; @@ -2891,7 +2892,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**) static SH_SpamHandler spam_check("SGBlockCardSpam","SHSpamTime","SGSpamCount"); if(spam_check.isBlocked(source_id,source_id,"BlockedCards",args)) return; - LLNotifications::instance().add("OfferCallingCard", args, payload); + LLNotificationsUtil::add("OfferCallingCard", args, payload); } } else @@ -2902,12 +2903,12 @@ void process_offer_callingcard(LLMessageSystem* msg, void**) void process_accept_callingcard(LLMessageSystem* msg, void**) { - LLNotifications::instance().add("CallingCardAccepted"); + LLNotificationsUtil::add("CallingCardAccepted"); } void process_decline_callingcard(LLMessageSystem* msg, void**) { - LLNotifications::instance().add("CallingCardDeclined"); + LLNotificationsUtil::add("CallingCardDeclined"); } class ChatTranslationReceiver : public LLTranslate::TranslationReceiver @@ -3598,13 +3599,13 @@ public: { // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory S32 random_land = ll_rand( land_items.count() - 1 ); args["NAME"] = land_items[random_land]->getName(); - LLNotifications::instance().add("TeleportToLandmark",args); + LLNotificationsUtil::add("TeleportToLandmark",args); } if ( card_items.count() > 0 ) { // Show notification that they can now contact people. Use a random calling card from the inventory S32 random_card = ll_rand( card_items.count() - 1 ); args["NAME"] = card_items[random_card]->getName(); - LLNotifications::instance().add("TeleportToPerson",args); + LLNotificationsUtil::add("TeleportToPerson",args); } gInventory.removeObserver(this); @@ -3998,7 +3999,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { LLSD payload; payload["message"] = version_channel; - LLNotifications::instance().add("ServerVersionChanged", LLSD(), payload); + LLNotificationsUtil::add("ServerVersionChanged", LLSD(), payload); } gLastVersionChannel = version_channel; @@ -5255,7 +5256,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) // *TODO:translate LLSD args; args["MESSAGE"] = desc; - LLNotifications::instance().add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessage", args); // Also send notification to chat -- MC LLChat chat(desc); @@ -5467,20 +5468,20 @@ void process_alert_core(const std::string& message, BOOL modal) S32 mins = 0; LLStringUtil::convertToS32(text.substr(18), mins); args["MINUTES"] = llformat("%d",mins); - LLNotifications::instance().add("RegionRestartMinutes", args); + LLNotificationsUtil::add("RegionRestartMinutes", args); } else if (text.substr(0,17) == "RESTART_X_SECONDS") { S32 secs = 0; LLStringUtil::convertToS32(text.substr(18), secs); args["SECONDS"] = llformat("%d",secs); - LLNotifications::instance().add("RegionRestartSeconds", args); + LLNotificationsUtil::add("RegionRestartSeconds", args); } else { // *TODO:translate args["MESSAGE"] = text; - LLNotifications::instance().add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessage", args); } } else if (modal) @@ -5488,14 +5489,14 @@ void process_alert_core(const std::string& message, BOOL modal) // *TODO:translate LLSD args; args["ERROR_MESSAGE"] = message; - LLNotifications::instance().add("ErrorMessage", args); + LLNotificationsUtil::add("ErrorMessage", args); } else { // *TODO:translate LLSD args; args["MESSAGE"] = message; - LLNotifications::instance().add("SystemMessageTip", args); + LLNotificationsUtil::add("SystemMessageTip", args); } } @@ -5791,7 +5792,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) LLNotifications::instance().add(notification["name"], notification["substitutions"], notification["payload"]); // ...with description on top - LLNotifications::instance().add("DebitPermissionDetails"); + LLNotificationsUtil::add("DebitPermissionDetails"); } return false; } @@ -5920,7 +5921,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data) else { // fall back to default behavior if cautions are entirely disabled - LLNotifications::instance().add("ScriptQuestion", args, payload); + LLNotificationsUtil::add("ScriptQuestion", args, payload); } } @@ -6114,7 +6115,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**) } } - LLNotifications::instance().add("CouldNotTeleportReason", args); + LLNotificationsUtil::add("CouldNotTeleportReason", args); // Let the interested parties know that teleport failed. LLViewerParcelMgr::getInstance()->onTeleportFailed(); @@ -6343,11 +6344,11 @@ void handle_lure(const uuid_vec_t& ids) } if (gAgent.isGodlike()) { - LLNotifications::instance().add("OfferTeleportFromGod", edit_args, payload, handle_lure_callback); + LLNotificationsUtil::add("OfferTeleportFromGod", edit_args, payload, handle_lure_callback); } else { - LLNotifications::instance().add("OfferTeleport", edit_args, payload, handle_lure_callback); + LLNotificationsUtil::add("OfferTeleport", edit_args, payload, handle_lure_callback); } } @@ -6562,7 +6563,7 @@ void process_script_dialog(LLMessageSystem* msg, void**) { args["DEFAULT"] = default_text; payload["textbox"] = "true"; - LLNotifications::instance().add("ScriptTextBoxDialog", args, payload, callback_script_dialog); + LLNotificationsUtil::add("ScriptTextBoxDialog", args, payload, callback_script_dialog); } else { @@ -6630,7 +6631,7 @@ void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool args["OBJECTNAME"] = load_url_info["object_name"].asString(); args["NAME"] = owner_name; - LLNotifications::instance().add("LoadWebPage", args, load_url_info); + LLNotificationsUtil::add("LoadWebPage", args, load_url_info); } else { @@ -6686,7 +6687,7 @@ void callback_download_complete(void** data, S32 result, LLExtStat ext_status) std::string* filepath = (std::string*)data; LLSD args; args["DOWNLOAD_PATH"] = *filepath; - LLNotifications::instance().add("FinishedRawDownload", args); + LLNotificationsUtil::add("FinishedRawDownload", args); delete filepath; } diff --git a/indra/newview/llviewerobjectbackup.cpp b/indra/newview/llviewerobjectbackup.cpp index 35fa42c74..7f6325350 100644 --- a/indra/newview/llviewerobjectbackup.cpp +++ b/indra/newview/llviewerobjectbackup.cpp @@ -62,7 +62,7 @@ #include "llfloaternamedesc.h" #include "llfloatersnapshot.h" #include "llinventorymodel.h" // gInventory -#include "llnotify.h" +#include "llnotificationsutil.h" #include "llresourcedata.h" #include "llselectmgr.h" #include "llstatusbar.h" @@ -561,7 +561,7 @@ void LLObjectBackup::exportWorker(void *userdata) if (LLObjectBackup::getInstance()->mNonExportedTextures == LLObjectBackup::TEXTURE_OK) { LL_INFOS("ObjectBackup") << "Export successful and complete." << LL_ENDL; - LLNotifications::instance().add("ExportSuccessful"); + LLNotificationsUtil::add("ExportSuccessful"); } else { @@ -589,7 +589,7 @@ void LLObjectBackup::exportWorker(void *userdata) } LLSD args; args["REASON"] = reason; - LLNotifications::instance().add("ExportPartial", args); + LLNotificationsUtil::add("ExportPartial", args); } LLObjectBackup::getInstance()->close(); break; @@ -597,7 +597,7 @@ void LLObjectBackup::exportWorker(void *userdata) case EXPORT_FAILED: gIdleCallbacks.deleteFunction(exportWorker); LL_WARNS("ObjectBackup") << "Export process aborted." << LL_ENDL; - LLNotifications::instance().add("ExportFailed"); + LLNotificationsUtil::add("ExportFailed"); LLObjectBackup::getInstance()->close(); break; } diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index be304fc9f..b25cf7aea 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -43,6 +43,7 @@ #include "message.h" #include "llviewermediafocus.h" #include "llviewerparcelmediaautoplay.h" +#include "llnotificationsutil.h" #include "llviewerwindow.h" #include "llfirstuse.h" #include "llpluginclassmedia.h" @@ -120,7 +121,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel) // First use warning if( ! mediaUrl.empty() && gSavedSettings.getWarning("FirstStreamingVideo") ) { - LLNotifications::instance().add("ParcelCanPlayMedia", LLSD(), LLSD(), + LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), boost::bind(callback_play_media, _1, _2, parcel)); return; @@ -176,7 +177,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel) { gSavedSettings.setWarning("QuickTimeInstalled", FALSE); - LLNotifications::instance().add("NoQuickTime" ); + LLNotificationsUtil::add("NoQuickTime" ); }; } } @@ -777,7 +778,7 @@ void LLViewerParcelMedia::filterMedia(LLParcel* parcel, U32 type) if (media_action == "deny") { - LLNotifications::instance().add("MediaBlocked", args); + LLNotificationsUtil::add("MediaBlocked", args); if (type == 1) { LLViewerParcelMedia::stopStreamingMusic(); @@ -800,7 +801,7 @@ void LLViewerParcelMedia::filterMedia(LLParcel* parcel, U32 type) { args["TYPE"] = "audio"; } - LLNotifications::instance().add("MediaAlert", args, LLSD(), boost::bind(callback_media_alert, _1, _2, parcel, type, domain)); + LLNotificationsUtil::add("MediaAlert", args, LLSD(), boost::bind(callback_media_alert, _1, _2, parcel, type, domain)); } } @@ -838,7 +839,7 @@ void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParc } LLViewerParcelMedia::saveDomainFilterList(); args["LISTED"] = "whitelisted"; - LLNotifications::instance().add("MediaListed", args); + LLNotificationsUtil::add("MediaListed", args); } if (type == 0) { @@ -862,7 +863,7 @@ void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParc } if (option == 1) // Deny { - LLNotifications::instance().add("MediaBlocked", args); + LLNotificationsUtil::add("MediaBlocked", args); } else // Blacklist { @@ -877,7 +878,7 @@ void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParc } LLViewerParcelMedia::saveDomainFilterList(); args["LISTED"] = "blacklisted"; - LLNotifications::instance().add("MediaListed", args); + LLNotificationsUtil::add("MediaListed", args); } } @@ -928,7 +929,7 @@ void LLViewerParcelMedia::clearDomainFilterList() sAllowedMedia.clear(); sDeniedMedia.clear(); saveDomainFilterList(); - LLNotifications::instance().add("MediaFiltersCleared"); + LLNotificationsUtil::add("MediaFiltersCleared"); SLFloaterMediaFilter::setDirty(); } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 1a697b778..2ea62561c 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -39,6 +39,8 @@ #include "indra_constants.h" #include "llcachename.h" #include "llgl.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "llsecondlifeurls.h" #include "message.h" @@ -523,7 +525,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, if (region != region_other) { - LLNotifications::instance().add("CantSelectLandFromMultipleRegions"); + LLNotificationsUtil::add("CantSelectLandFromMultipleRegions"); mSelected = FALSE; notifyObservers(); return NULL; @@ -952,7 +954,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id) { if (!mSelected) { - LLNotifications::instance().add("CannotSetLandOwnerNothingSelected"); + LLNotificationsUtil::add("CannotSetLandOwnerNothingSelected"); return; } @@ -967,7 +969,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id) if (!region) { // TODO: Add a force owner version of this alert. - LLNotifications::instance().add("CannotContentifyNoRegion"); + LLNotificationsUtil::add("CannotContentifyNoRegion"); return; } @@ -975,7 +977,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id) LLViewerRegion *region2 = LLWorld::getInstance()->getRegionFromPosGlobal( east_north_region_check ); if (region != region2) { - LLNotifications::instance().add("CannotSetLandOwnerMultipleRegions"); + LLNotificationsUtil::add("CannotSetLandOwnerMultipleRegions"); return; } @@ -1020,13 +1022,13 @@ void LLViewerParcelMgr::sendParcelGodForceToContent() { if (!mSelected) { - LLNotifications::instance().add("CannotContentifyNothingSelected"); + LLNotificationsUtil::add("CannotContentifyNothingSelected"); return; } LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); if (!region) { - LLNotifications::instance().add("CannotContentifyNoRegion"); + LLNotificationsUtil::add("CannotContentifyNoRegion"); return; } @@ -1044,14 +1046,14 @@ void LLViewerParcelMgr::sendParcelRelease() { if (!mSelected) { - LLNotifications::instance().add("CannotReleaseLandNothingSelected"); + LLNotificationsUtil::add("CannotReleaseLandNothingSelected"); return; } LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); if (!region) { - LLNotifications::instance().add("CannotReleaseLandNoRegion"); + LLNotificationsUtil::add("CannotReleaseLandNoRegion"); return; } @@ -1106,14 +1108,14 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy( { if (!mSelected || !mCurrentParcel) { - LLNotifications::instance().add("CannotBuyLandNothingSelected"); + LLNotificationsUtil::add("CannotBuyLandNothingSelected"); return NULL; } LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); if (!region) { - LLNotifications::instance().add("CannotBuyLandNoRegion"); + LLNotificationsUtil::add("CannotBuyLandNoRegion"); return NULL; } @@ -1131,7 +1133,7 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy( if (region != region2) { - LLNotifications::instance().add("CantBuyLandAcrossMultipleRegions"); + LLNotificationsUtil::add("CantBuyLandAcrossMultipleRegions"); return NULL; } } @@ -1213,18 +1215,18 @@ void LLViewerParcelMgr::sendParcelDeed(const LLUUID& group_id) { if (!mSelected || !mCurrentParcel) { - LLNotifications::instance().add("CannotDeedLandNothingSelected"); + LLNotificationsUtil::add("CannotDeedLandNothingSelected"); return; } if(group_id.isNull()) { - LLNotifications::instance().add("CannotDeedLandNoGroup"); + LLNotificationsUtil::add("CannotDeedLandNoGroup"); return; } LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); if (!region) { - LLNotifications::instance().add("CannotDeedLandNoRegion"); + LLNotificationsUtil::add("CannotDeedLandNoRegion"); return; } @@ -2073,11 +2075,11 @@ void LLViewerParcelMgr::deedLandToGroup() std::string full_name; gCacheName->getFullName(mCurrentParcel->getOwnerID(),full_name); args["NAME"] = full_name; - LLNotifications::instance().add("DeedLandToGroupWithContribution",args, LLSD(), deedAlertCB); + LLNotificationsUtil::add("DeedLandToGroupWithContribution",args, LLSD(), deedAlertCB); } else { - LLNotifications::instance().add("DeedLandToGroup",args, LLSD(), deedAlertCB); + LLNotificationsUtil::add("DeedLandToGroup",args, LLSD(), deedAlertCB); } } @@ -2103,26 +2105,26 @@ void LLViewerParcelMgr::startReleaseLand() { if (!mSelected) { - LLNotifications::instance().add("CannotReleaseLandNothingSelected"); + LLNotificationsUtil::add("CannotReleaseLandNothingSelected"); return; } if (mRequestResult == PARCEL_RESULT_NO_DATA) { - LLNotifications::instance().add("CannotReleaseLandWatingForServer"); + LLNotificationsUtil::add("CannotReleaseLandWatingForServer"); return; } if (mRequestResult == PARCEL_RESULT_MULTIPLE) { - LLNotifications::instance().add("CannotReleaseLandSelected"); + LLNotificationsUtil::add("CannotReleaseLandSelected"); return; } if (!isParcelOwnedByAgent(mCurrentParcel, GP_LAND_RELEASE) && !(gAgent.canManageEstate())) { - LLNotifications::instance().add("CannotReleaseLandDontOwn"); + LLNotificationsUtil::add("CannotReleaseLandDontOwn"); return; } @@ -2130,7 +2132,7 @@ void LLViewerParcelMgr::startReleaseLand() LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(parcel_center); if (!region) { - LLNotifications::instance().add("CannotReleaseLandRegionNotFound"); + LLNotificationsUtil::add("CannotReleaseLandRegionNotFound"); return; } /* @@ -2139,21 +2141,21 @@ void LLViewerParcelMgr::startReleaseLand() { LLSD args; args["REGION"] = region->getName(); - LLNotifications::instance().add("CannotReleaseLandNoTransfer", args); + LLNotificationsUtil::add("CannotReleaseLandNoTransfer", args); return; } */ if (!mCurrentParcelSelection->mWholeParcelSelected) { - LLNotifications::instance().add("CannotReleaseLandPartialSelection"); + LLNotificationsUtil::add("CannotReleaseLandPartialSelection"); return; } // Compute claim price LLSD args; args["AREA"] = llformat("%d",mCurrentParcel->getArea()); - LLNotifications::instance().add("ReleaseLandWarning", args, LLSD(), releaseAlertCB); + LLNotificationsUtil::add("ReleaseLandWarning", args, LLSD(), releaseAlertCB); } bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const @@ -2231,13 +2233,13 @@ void LLViewerParcelMgr::startDivideLand() { if (!mSelected) { - LLNotifications::instance().add("CannotDivideLandNothingSelected"); + LLNotificationsUtil::add("CannotDivideLandNothingSelected"); return; } if (mCurrentParcelSelection->mWholeParcelSelected) { - LLNotifications::instance().add("CannotDivideLandPartialSelection"); + LLNotificationsUtil::add("CannotDivideLandPartialSelection"); return; } @@ -2245,7 +2247,7 @@ void LLViewerParcelMgr::startDivideLand() payload["west_south_border"] = ll_sd_from_vector3d(mWestSouth); payload["east_north_border"] = ll_sd_from_vector3d(mEastNorth); - LLNotifications::instance().add("LandDivideWarning", LLSD(), payload, callbackDivideLand); + LLNotificationsUtil::add("LandDivideWarning", LLSD(), payload, callbackDivideLand); } // static @@ -2259,7 +2261,7 @@ bool LLViewerParcelMgr::callbackDivideLand(const LLSD& notification, const LLSD& LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(parcel_center); if (!region) { - LLNotifications::instance().add("CannotDivideLandNoRegion"); + LLNotificationsUtil::add("CannotDivideLandNoRegion"); return false; } @@ -2288,19 +2290,19 @@ void LLViewerParcelMgr::startJoinLand() { if (!mSelected) { - LLNotifications::instance().add("CannotJoinLandNothingSelected"); + LLNotificationsUtil::add("CannotJoinLandNothingSelected"); return; } if (mCurrentParcelSelection->mWholeParcelSelected) { - LLNotifications::instance().add("CannotJoinLandEntireParcelSelected"); + LLNotificationsUtil::add("CannotJoinLandEntireParcelSelected"); return; } if (!mCurrentParcelSelection->mSelectedMultipleOwners) { - LLNotifications::instance().add("CannotJoinLandSelection"); + LLNotificationsUtil::add("CannotJoinLandSelection"); return; } @@ -2308,7 +2310,7 @@ void LLViewerParcelMgr::startJoinLand() payload["west_south_border"] = ll_sd_from_vector3d(mWestSouth); payload["east_north_border"] = ll_sd_from_vector3d(mEastNorth); - LLNotifications::instance().add("JoinLandWarning", LLSD(), payload, callbackJoinLand); + LLNotificationsUtil::add("JoinLandWarning", LLSD(), payload, callbackJoinLand); } // static @@ -2322,7 +2324,7 @@ bool LLViewerParcelMgr::callbackJoinLand(const LLSD& notification, const LLSD& r LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(parcel_center); if (!region) { - LLNotifications::instance().add("CannotJoinLandNoRegion"); + LLNotificationsUtil::add("CannotJoinLandNoRegion"); return false; } @@ -2351,19 +2353,19 @@ void LLViewerParcelMgr::startDeedLandToGroup() { if (!mSelected || !mCurrentParcel) { - LLNotifications::instance().add("CannotDeedLandNothingSelected"); + LLNotificationsUtil::add("CannotDeedLandNothingSelected"); return; } if (mRequestResult == PARCEL_RESULT_NO_DATA) { - LLNotifications::instance().add("CannotDeedLandWaitingForServer"); + LLNotificationsUtil::add("CannotDeedLandWaitingForServer"); return; } if (mRequestResult == PARCEL_RESULT_MULTIPLE) { - LLNotifications::instance().add("CannotDeedLandMultipleSelected"); + LLNotificationsUtil::add("CannotDeedLandMultipleSelected"); return; } @@ -2371,7 +2373,7 @@ void LLViewerParcelMgr::startDeedLandToGroup() LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(parcel_center); if (!region) { - LLNotifications::instance().add("CannotDeedLandNoRegion"); + LLNotificationsUtil::add("CannotDeedLandNoRegion"); return; } @@ -2383,7 +2385,7 @@ void LLViewerParcelMgr::startDeedLandToGroup() { LLSD args; args["REGION"] = region->getName(); - LLNotifications::instance().add("CannotDeedLandNoTransfer", args); + LLNotificationsUtil::add("CannotDeedLandNoTransfer", args); return; } } diff --git a/indra/newview/llviewerpluginmanager.cpp b/indra/newview/llviewerpluginmanager.cpp index fdd48736e..4dc8b0e14 100644 --- a/indra/newview/llviewerpluginmanager.cpp +++ b/indra/newview/llviewerpluginmanager.cpp @@ -32,7 +32,7 @@ #include "llviewerprecompiledheaders.h" #include "llviewerpluginmanager.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" void LLViewerPluginManager::destroyPlugin() { @@ -61,6 +61,6 @@ void LLViewerPluginManager::send_plugin_failure_warning(std::string const& plugi LL_WARNS("Plugin") << "plugin intialization failed for plugin: " << plugin_basename << LL_ENDL; LLSD args; args["MIME_TYPE"] = plugin_basename; // FIXME: Use different notification. - LLNotifications::instance().add("NoPlugin", args); + LLNotificationsUtil::add("NoPlugin", args); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index dc62a0e0c..3ee8be54f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -191,6 +191,9 @@ #include "llviewernetwork.h" #include "llpostprocess.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" + #include "llfloatertest.h" // HACK! #include "llfloaternotificationsconsole.h" @@ -5217,7 +5220,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, LLSD args; args["RESX"] = llformat("%d",size.mX); args["RESY"] = llformat("%d",size.mY); - LLNotifications::instance().add("ResolutionSwitchFail", args); + LLNotificationsUtil::add("ResolutionSwitchFail", args); size = old_size; // for reshape below } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 8110e02b8..1d350d635 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -38,6 +38,7 @@ #include "llviewercontrol.h" #include "llagentcamera.h" +#include "llnotificationsutil.h" #include "llviewerwindow.h" #include "lldrawable.h" #include "llface.h" @@ -222,7 +223,7 @@ void LLVOGrass::initClass() { LLSD args; args["SPECIES"] = err; - LLNotifications::instance().add("ErrorUndefinedGrasses", args); + LLNotificationsUtil::add("ErrorUndefinedGrasses", args); } for (S32 i = 0; i < GRASS_MAX_BLADES; ++i) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 5fef0f877..53b7177ce 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -62,6 +62,7 @@ #include "llfirstuse.h" #include "llviewerwindow.h" #include "llviewercamera.h" +#include "llnotificationsutil.h" #include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel #include "llfloaterchat.h" // for LLFloaterChat::addChat() @@ -7040,7 +7041,7 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode if (!sAlertedUser) { //sAlertedUser = TRUE; - LLNotifications::instance().add("VoiceVersionMismatch"); + LLNotificationsUtil::add("VoiceVersionMismatch"); gSavedSettings.setBOOL("EnableVoiceChat", FALSE); // toggles listener } } diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 8a5093bcb..08dbc4df5 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -57,6 +57,7 @@ #include "noise.h" #include "pipeline.h" #include "llspatialpartition.h" +#include "llnotificationsutil.h" #include "llviewerwindow.h" extern LLPipeline gPipeline; @@ -267,7 +268,7 @@ void LLVOTree::initClass() { LLSD args; args["SPECIES"] = err; - LLNotifications::instance().add("ErrorUndefinedTrees", args); + LLNotificationsUtil::add("ErrorUndefinedTrees", args); } }; diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 72deff26d..a8adbb527 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -41,6 +41,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llagentwearables.h" +#include "llnotificationsutil.h" #include "llassetuploadresponders.h" #include "llviewerwindow.h" #include "llfloatercustomize.h" @@ -1021,7 +1022,7 @@ void LLWearable::saveNewAsset() LLSD args; args["NAME"] = mName; - LLNotifications::instance().add("CannotSaveWearableOutOfSpace", args); + LLNotificationsUtil::add("CannotSaveWearableOutOfSpace", args); return; } @@ -1069,7 +1070,7 @@ void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userda llwarns << buffer << " Status: " << status << llendl; LLSD args; args["NAME"] = type_name; - LLNotifications::instance().add("CannotSaveToAssetStore", args); + LLNotificationsUtil::add("CannotSaveToAssetStore", args); } // Delete temp file diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 0ab91c58e..7b514cf04 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -41,7 +41,7 @@ #include "llviewerinventory.h" //#include "llfloaterchat.h" #include "llviewerstats.h" -#include "llnotify.h" +#include "llnotificationsutil.h" // Globals LLWearableList gWearableList; // Globally constructed; be careful that there's no dependency with gAgent. @@ -191,16 +191,16 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID args["TYPE"] = LLAssetType::lookupHumanReadable(data->mAssetType); if (isNewWearable) { - LLNotifications::instance().add("InvalidWearable"); + LLNotificationsUtil::add("InvalidWearable"); } else if (data->mName.empty()) { - LLNotifications::instance().add("FailedToFindWearableUnnamed", args); + LLNotificationsUtil::add("FailedToFindWearableUnnamed", args); } else { args["DESC"] = data->mName; - LLNotifications::instance().add("FailedToFindWearable", args); + LLNotificationsUtil::add("FailedToFindWearable", args); } } // Always call callback; wearable will be NULL if we failed diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index 474d7b181..abb9cd03f 100644 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -102,7 +102,7 @@ void LLWLDayCycle::loadDayCycle(const std::string & fileName) // alert the user LLSD args; args["SKY"] = day_data[i][1].asString(); - LLNotifications::instance().add("WLMissingSky", args); + LLNotifications::instance().add("WLMissingSky", args, LLSD()); continue; } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index df409ff14..c45551516 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -18,6 +18,7 @@ #include "llagent.h" #include "llappviewer.h" #include "llavatarnamecache.h" +#include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "llversionviewer.h" #include "llviewermenu.h" @@ -43,7 +44,7 @@ void RlvNotifications::notifyBehaviour(ERlvBehaviour eBhvr, ERlvParamType eType) { LLSD argsNotify; argsNotify["MESSAGE"] = strMsg; - LLNotifications::instance().add("SystemMessageTip", argsNotify); + LLNotificationsUtil::add("SystemMessageTip", argsNotify); } } #endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR @@ -53,7 +54,7 @@ void RlvNotifications::notifyBlocked(const std::string& strRlvString) { LLSD argsNotify; argsNotify["MESSAGE"] = RlvStrings::getString(strRlvString); - LLNotifications::instance().add("SystemMessageTip", argsNotify); + LLNotificationsUtil::add("SystemMessageTip", argsNotify); } // Checked: 2009-11-11 (RLVa-1.1.0a) | Added: RLVa-1.1.0a @@ -65,7 +66,7 @@ void RlvNotifications::notifyBlockedViewXXX(const char* pstrAssetType) LLSD argsNotify; argsNotify["MESSAGE"] = strMsg; - LLNotifications::instance().add("SystemMessageTip", argsNotify); + LLNotificationsUtil::add("SystemMessageTip", argsNotify); } // Checked: 2009-11-13 (RLVa-1.1.0b) | Modified: RLVa-1.1.0b @@ -437,7 +438,7 @@ void RlvUtil::notifyFailedAssertion(const std::string& strAssert, const std::str LLSD argsNotify; argsNotify["MESSAGE"] = llformat("RLVa assertion failure: %s (%s - %d)", strAssert.c_str(), strFile.c_str(), nLine); - LLNotifications::instance().add("SystemMessageTip", argsNotify); + LLNotificationsUtil::add("SystemMessageTip", argsNotify); } // Checked: 2010-03-27 (RLVa-1.1.3a) | Modified: RLVa-1.2.0b diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 4a160f394..b7959c31b 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -20,6 +20,7 @@ #include "llgesturemgr.h" #include "llinventoryview.h" #include "llinventorybridge.h" +#include "llnotificationsutil.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" @@ -351,7 +352,7 @@ void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAc // [See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items] if (!gAgentWearables.areWearablesLoaded()) { - LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded"); + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return; } LLVOAvatar* pAvatar = gAgent.getAvatarObject(); @@ -1043,7 +1044,7 @@ bool rlvCanDeleteOrReturn() LLSD args; args["MESSAGE"] = llformat("RestrainedLove Support will be %s after you restart", (rlv_handler_t::isEnabled()) ? "disabled" : "enabled" ); - LLNotifications::instance().add("GenericAlert", args); + LLNotificationsUtil::add("GenericAlert", args); #endif } // Checked: 2009-07-08 (RLVa-1.0.0e)