summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp88
1 files changed, 45 insertions, 43 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index fcaf49c884..2fae78cdfb 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"
@@ -520,7 +522,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
if (region != region_other)
{
- LLNotifications::instance().add("CantSelectLandFromMultipleRegions");
+ LLNotificationsUtil::add("CantSelectLandFromMultipleRegions");
mSelected = FALSE;
notifyObservers();
return NULL;
@@ -943,7 +945,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
{
if (!mSelected)
{
- LLNotifications::instance().add("CannotSetLandOwnerNothingSelected");
+ LLNotificationsUtil::add("CannotSetLandOwnerNothingSelected");
return;
}
@@ -958,7 +960,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;
}
@@ -966,7 +968,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;
}
@@ -991,7 +993,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
bool callback_god_force_owner(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(0 == option)
{
LLMessageSystem* msg = gMessageSystem;
@@ -1011,13 +1013,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;
}
@@ -1035,14 +1037,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;
}
@@ -1097,14 +1099,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;
}
@@ -1122,7 +1124,7 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
if (region != region2)
{
- LLNotifications::instance().add("CantBuyLandAcrossMultipleRegions");
+ LLNotificationsUtil::add("CantBuyLandAcrossMultipleRegions");
return NULL;
}
}
@@ -1204,18 +1206,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;
}
@@ -2037,18 +2039,18 @@ void LLViewerParcelMgr::deedLandToGroup()
gCacheName->getName(mCurrentParcel->getOwnerID(), first_name, last_name);
args["FIRST_NAME"] = first_name;
args["LAST_NAME"] = last_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);
}
}
// static
bool LLViewerParcelMgr::deedAlertCB(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
@@ -2067,26 +2069,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;
}
@@ -2094,7 +2096,7 @@ void LLViewerParcelMgr::startReleaseLand()
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(parcel_center);
if (!region)
{
- LLNotifications::instance().add("CannotReleaseLandRegionNotFound");
+ LLNotificationsUtil::add("CannotReleaseLandRegionNotFound");
return;
}
/*
@@ -2103,21 +2105,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
@@ -2192,13 +2194,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;
}
@@ -2206,13 +2208,13 @@ 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
bool LLViewerParcelMgr::callbackDivideLand(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLVector3d west_south_d = ll_vector3d_from_sd(notification["payload"]["west_south_border"]);
LLVector3d east_north_d = ll_vector3d_from_sd(notification["payload"]["east_north_border"]);
LLVector3d parcel_center = (west_south_d + east_north_d) / 2.0;
@@ -2220,7 +2222,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;
}
@@ -2249,19 +2251,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;
}
@@ -2269,13 +2271,13 @@ 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
bool LLViewerParcelMgr::callbackJoinLand(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLVector3d west_south_d = ll_vector3d_from_sd(notification["payload"]["west_south_border"]);
LLVector3d east_north_d = ll_vector3d_from_sd(notification["payload"]["east_north_border"]);
LLVector3d parcel_center = (west_south_d + east_north_d) / 2.0;
@@ -2283,7 +2285,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;
}
@@ -2312,19 +2314,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;
}
@@ -2332,7 +2334,7 @@ void LLViewerParcelMgr::startDeedLandToGroup()
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(parcel_center);
if (!region)
{
- LLNotifications::instance().add("CannotDeedLandNoRegion");
+ LLNotificationsUtil::add("CannotDeedLandNoRegion");
return;
}
@@ -2344,7 +2346,7 @@ void LLViewerParcelMgr::startDeedLandToGroup()
{
LLSD args;
args["REGION"] = region->getName();
- LLNotifications::instance().add("CannotDeedLandNoTransfer", args);
+ LLNotificationsUtil::add("CannotDeedLandNoTransfer", args);
return;
}
}
@@ -2374,7 +2376,7 @@ void LLViewerParcelMgr::reclaimParcel()
// static
bool LLViewerParcelMgr::releaseAlertCB(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
// Send the release message, not a force