summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 44eb4361f1..8a1b703b13 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -71,6 +71,7 @@
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llfloaterimnearbychat.h"
+#include "llmarketplacefunctions.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpanelgrouplandmoney.h"
@@ -128,10 +129,7 @@ extern void on_new_message(const LLSD& msg);
//
// Constants
//
-const F32 BIRD_AUDIBLE_RADIUS = 32.0f;
-const F32 SIT_DISTANCE_FROM_TARGET = 0.25f;
const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f;
-static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting.
// Determine how quickly residents' scripts can issue question dialogs
// Allow bursts of up to 5 dialogs in 10 seconds. 10*2=20 seconds recovery if throttle kicks in
@@ -2411,7 +2409,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
BOOL is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
// object IMs contain sender object id in session_id (STORM-1209)
- || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id);
+ || (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id));
BOOL is_owned_by_me = FALSE;
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly");
@@ -5116,7 +5114,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
if (object)
{
LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation());
- if (!use_autopilot || isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot())
+ if (!use_autopilot || (isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot()))
{
//we're already sitting on this object, so don't autopilot
}
@@ -5882,7 +5880,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
LL_WARNS() << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
}
}
-
+
if (
(notificationID == "RegionEntryAccessBlocked") ||
(notificationID == "LandClaimAccessBlocked") ||
@@ -5963,7 +5961,25 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
make_ui_sound("UISndRestart");
}
-
+
+ // Special Marketplace update notification
+ if (notificationID == "SLM_UPDATE_FOLDER")
+ {
+ std::string state = llsdBlock["state"].asString();
+ if (state == "deleted")
+ {
+ // Perform the deletion viewer side, no alert shown in this case
+ LLMarketplaceData::instance().deleteListing(llsdBlock["listing_id"].asInteger());
+ return true;
+ }
+ else
+ {
+ // In general, no message will be displayed, all we want is to get the listing updated in the marketplace floater
+ // If getListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification()
+ return LLMarketplaceData::instance().getListing(llsdBlock["listing_id"].asInteger());
+ }
+ }
+
LLNotificationsUtil::add(notificationID, llsdBlock);
return true;
}
@@ -7117,8 +7133,6 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
//---------------------------------------------------------------------------
const S32 SCRIPT_DIALOG_MAX_BUTTONS = 12;
-const S32 SCRIPT_DIALOG_BUTTON_STR_SIZE = 24;
-const S32 SCRIPT_DIALOG_MAX_MESSAGE_SIZE = 512;
const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n";
bool callback_script_dialog(const LLSD& notification, const LLSD& response)