summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r--indra/newview/llfloaterland.cpp56
1 files changed, 29 insertions, 27 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 015a947d91..ed0f24d160 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"
@@ -239,7 +240,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
BOOL LLFloaterLand::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLFloaterLand::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChange, this, _2));
LLTabContainer* tab = getChild<LLTabContainer>("landtab");
@@ -347,13 +348,14 @@ BOOL LLPanelLandGeneral::postBuild()
{
mEditName = getChild<LLLineEditor>("Name");
mEditName->setCommitCallback(onCommitAny, this);
- childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe);
+ childSetPrevalidate("Name", LLLineEditor::prevalidateASCIIPrintableNoPipe);
mEditDesc = getChild<LLTextEditor>("Description");
mEditDesc->setCommitOnFocusLost(TRUE);
mEditDesc->setCommitCallback(onCommitAny, this);
- childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe);
-
+ // No prevalidate function - historically the prevalidate function was broken,
+ // allowing residents to put in characters like U+2661 WHITE HEART SUIT, so
+ // preserve that ability.
mTextSalePending = getChild<LLTextBox>("SalePending");
mTextOwnerLabel = getChild<LLTextBox>("Owner:");
@@ -913,7 +915,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
@@ -925,7 +927,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
{
if(parcelp->getForSale())
{
- LLNotifications::instance().add("CannotStartAuctionAlreadyForSale");
+ LLNotificationsUtil::add("CannotStartAuctionAlreadyForSale");
}
else
{
@@ -938,7 +940,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
@@ -1284,7 +1286,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)
{
@@ -1294,7 +1296,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co
LLSD args;
if (owner_id == gAgentID)
{
- LLNotifications::instance().add("OwnedObjectsReturned");
+ LLNotificationsUtil::add("OwnedObjectsReturned");
}
else
{
@@ -1302,7 +1304,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co
gCacheName->getName(owner_id, first, last);
args["FIRST"] = first;
args["LAST"] = last;
- LLNotifications::instance().add("OtherObjectsReturned", args);
+ LLNotificationsUtil::add("OtherObjectsReturned", args);
}
send_return_objects_message(parcel->getLocalID(), RT_OWNER);
}
@@ -1316,7 +1318,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)
{
@@ -1326,7 +1328,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);
}
}
@@ -1338,13 +1340,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);
}
}
@@ -1356,7 +1358,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)
{
@@ -1370,12 +1372,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));
@@ -1412,11 +1414,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));
}
}
@@ -1626,14 +1628,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));
}
}
@@ -1654,7 +1656,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
@@ -1679,7 +1681,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
{
@@ -1687,7 +1689,7 @@ 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
{
@@ -1695,7 +1697,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
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));
}
}
}
@@ -2164,7 +2166,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
if (!allow_other_scripts && region && region->getAllowDamage())
{
- LLNotifications::instance().add("UnableToDisableOutsideScripts");
+ LLNotificationsUtil::add("UnableToDisableOutsideScripts");
return;
}
@@ -2208,7 +2210,7 @@ void LLPanelLandOptions::onClickSet(void* userdata)
if (agent_parcel->getLocalID() != selected_parcel->getLocalID())
{
- LLNotifications::instance().add("MustBeInParcel");
+ LLNotificationsUtil::add("MustBeInParcel");
return;
}