From 64d9705ae21c42f4c7869a414e250c5de251b143 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 17 Aug 2012 03:56:38 +0000 Subject: Expanding region flags to 64 bits. Adding region protocol flags --- indra/newview/llviewermessage.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 903f4437a7..f399275c94 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4900,9 +4900,19 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) // Various hacks that aren't statistics, but are being handled here. // U32 max_tasks_per_region; - U32 region_flags; + U64 region_flags; msg->getU32("Region", "ObjectCapacity", max_tasks_per_region); - msg->getU32("Region", "RegionFlags", region_flags); + + if (msg->has(_PREHASH_RegionInfo)) + { + msg->getU64("RegionInfo", "RegionFlagsExtended", region_flags); + } + else + { + U32 flags = 0; + msg->getU32("Region", "RegionFlags", flags); + region_flags = flags; + } LLViewerRegion* regionp = gAgent.getRegion(); if (regionp) -- cgit v1.2.3 From c06c35609c6683731eaea283468f6b32af18fea2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 11 Oct 2012 00:09:04 +0000 Subject: Updating linux build to gcc4.6 --- indra/newview/llviewermessage.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f399275c94..2a904d393a 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -626,7 +626,6 @@ void send_sound_trigger(const LLUUID& sound_id, F32 gain) bool join_group_response(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - BOOL delete_context_data = TRUE; bool accept_invite = false; LLUUID group_id = notification["payload"]["group_id"].asUUID(); @@ -655,7 +654,6 @@ bool join_group_response(const LLSD& notification, const LLSD& response) } else { - delete_context_data = FALSE; LLSD args; args["NAME"] = name; LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]); @@ -668,7 +666,6 @@ bool join_group_response(const LLSD& notification, const LLSD& response) // sure the user is sure they want to join. if (fee > 0) { - delete_context_data = FALSE; LLSD args; args["COST"] = llformat("%d", fee); // Set the fee for next time to 0, so that we don't keep @@ -2768,11 +2765,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); } buffer = saved + message; - BOOL is_this_agent = FALSE; - if(from_id == gAgentID) - { - is_this_agent = TRUE; - } gIMMgr->addMessage( session_id, from_id, @@ -3386,7 +3378,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLColor4 color(1.0f, 1.0f, 1.0f, 1.0f); LLUUID from_id; LLUUID owner_id; - BOOL is_owned_by_me = FALSE; LLViewerObject* chatter; msg->getString("ChatData", "FromName", from_name); @@ -3471,13 +3462,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) gAgent.heardChat(chat.mFromID); } } - - is_owned_by_me = chatter->permYouOwner(); } if (is_audible) { - BOOL visible_in_chat_bubble = FALSE; + //BOOL visible_in_chat_bubble = FALSE; color.setVec(1.f,1.f,1.f,1.f); msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); @@ -3560,7 +3549,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (!is_muted && !is_busy) { - visible_in_chat_bubble = gSavedSettings.getBOOL("UseChatBubbles"); + //visible_in_chat_bubble = gSavedSettings.getBOOL("UseChatBubbles"); std::string formated_msg = ""; LLViewerChat::formatChatMsg(chat, formated_msg); LLChat chat_bubble = chat; -- cgit v1.2.3 From 474905badef4679bbce53306c49343703be38263 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Tue, 30 Apr 2013 16:04:41 -0700 Subject: MAINT-2646 Viewer should neither grant nor display prompts for unimplemented LSL permissions * Add the newer run time permissions to the viewer * Filter requested permissions by those the viewer knows about * Show a dialog indicating unknown permissions were requested and a new viewer will be needed to grant them. reviewed with Simon and Soft --- indra/newview/llviewermessage.cpp | 64 ++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 24 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3c0d6189ac..4efe345141 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -163,7 +163,11 @@ const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = "ChangePermissions", "TrackYourCamera", "ControlYourCamera", - "TeleportYourAgent" + "TeleportYourAgent", + "JoinAnExperience", + "SilentlyManageEstateAccess", + "OverrideYourAnimations", + "ScriptReturnObjects" }; const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = @@ -179,7 +183,11 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] = FALSE, // ChangePermissions FALSE, // TrackYourCamera, FALSE, // ControlYourCamera - FALSE // TeleportYourAgent + FALSE, // TeleportYourAgent + FALSE, // JoinAnExperience + FALSE, // SilentlyManageEstateAccess + FALSE, // OverrideYourAnimations + FALSE, // ScriptReturnObjects }; bool friendship_offer_callback(const LLSD& notification, const LLSD& response) @@ -6424,7 +6432,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data) LLSD args; args["OBJECTNAME"] = object_name; args["NAME"] = LLCacheName::cleanFullName(owner_name); - + S32 known_questions = 0; BOOL has_not_only_debit = questions ^ LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_DEBIT]; // check the received permission flags against each permission for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++) @@ -6432,7 +6440,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data) if (questions & LSCRIPTRunTimePermissionBits[i]) { count++; - + known_questions |= LSCRIPTRunTimePermissionBits[i]; // check whether permission question should cause special caution dialog caution |= (SCRIPT_QUESTION_IS_CAUTION[i]); @@ -6442,32 +6450,40 @@ void process_script_question(LLMessageSystem *msg, void **user_data) script_question += " " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n"; } } + args["QUESTIONS"] = script_question; - LLSD payload; - payload["task_id"] = taskid; - payload["item_id"] = itemid; - payload["sender"] = sender.getIPandPort(); - payload["questions"] = questions; - payload["object_name"] = object_name; - payload["owner_name"] = owner_name; - - // check whether cautions are even enabled or not - if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) + if (known_questions != questions) + { // This is in addition to the normal dialog. + LLNotificationsUtil::add("UnknownScriptQuestion",args); + } + + if (known_questions) { - if (caution) + LLSD payload; + payload["task_id"] = taskid; + payload["item_id"] = itemid; + payload["sender"] = sender.getIPandPort(); + payload["questions"] = known_questions; + payload["object_name"] = object_name; + payload["owner_name"] = owner_name; + + // check whether cautions are even enabled or not + if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) { - args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : ""; + if (caution) + { + args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : ""; + } + // display the caution permissions prompt + LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload); + } + else + { + // fall back to default behavior if cautions are entirely disabled + LLNotificationsUtil::add("ScriptQuestion", args, payload); } - // display the caution permissions prompt - LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload); - } - else - { - // fall back to default behavior if cautions are entirely disabled - LLNotificationsUtil::add("ScriptQuestion", args, payload); } - } } -- cgit v1.2.3 From 45a44225f5be261bf42d69c0c7ac01b1235c836c Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Fri, 3 May 2013 00:58:55 +0000 Subject: MAINT-2646 Viewer should neither grant nor display prompts for unimplemented LSL permissions * Change text of dialog * Add callback for mute button reviewed with Richard and Widely. --- indra/newview/llviewermessage.cpp | 66 ++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 22 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4efe345141..8cd0612226 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6290,6 +6290,19 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp } } +void script_question_mute(const LLUUID& item_id, const std::string& object_name); + +bool unknown_script_question_cb(const LLSD& notification, const LLSD& response) +{ + // Only care if they muted the object here. + if ( response["Mute"] ) // mute + { + LLUUID item_id = notification["payload"]["item_id"].asUUID(); + script_question_mute(item_id,notification["payload"]["object_name"].asString()); + } + return false; +} + bool script_question_cb(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -6340,34 +6353,42 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) if ( response["Mute"] ) // mute { - LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT)); - - // purge the message queue of any previously queued requests from the same source. DEV-4879 - class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher - { - public: - OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} - bool matches(const LLNotificationPtr notification) const - { - if (notification->getName() == "ScriptQuestionCaution" - || notification->getName() == "ScriptQuestion") - { - return (notification->getPayload()["item_id"].asUUID() == blocked_id); - } - return false; - } - private: - const LLUUID& blocked_id; - }; - - LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( - gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); + script_question_mute(item_id,notification["payload"]["object_name"].asString()); } return false; } + +void script_question_mute(const LLUUID& item_id, const std::string& object_name) +{ + LLMuteList::getInstance()->add(LLMute(item_id, object_name, LLMute::OBJECT)); + + // purge the message queue of any previously queued requests from the same source. DEV-4879 + class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher + { + public: + OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} + bool matches(const LLNotificationPtr notification) const + { + if (notification->getName() == "ScriptQuestionCaution" + || notification->getName() == "ScriptQuestion" + || notification->getName() == "UnknownScriptQuestion") + { + return (notification->getPayload()["item_id"].asUUID() == blocked_id); + } + return false; + } + private: + const LLUUID& blocked_id; + }; + + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); +} + static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_2("ScriptQuestionCaution", script_question_cb); +static LLNotificationFunctorRegistration unknown_script_question_cb_reg("UnknownScriptQuestion", unknown_script_question_cb); void process_script_question(LLMessageSystem *msg, void **user_data) { @@ -6455,6 +6476,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data) if (known_questions != questions) { // This is in addition to the normal dialog. + args["DOWNLOADURL"] = LLTrans::getString("ViewerDownloadURL"); LLNotificationsUtil::add("UnknownScriptQuestion",args); } -- cgit v1.2.3 From 8d0d645cd66e43a104089729685c3aa6c8c18917 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Fri, 3 May 2013 12:53:37 -0700 Subject: MAINT-2646 Viewer should neither grant nor display prompts for unimplemented LSL permissions * Switch mute to use task id. reviewed with Simon --- indra/newview/llviewermessage.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8cd0612226..fe68592c57 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6297,8 +6297,8 @@ bool unknown_script_question_cb(const LLSD& notification, const LLSD& response) // Only care if they muted the object here. if ( response["Mute"] ) // mute { - LLUUID item_id = notification["payload"]["item_id"].asUUID(); - script_question_mute(item_id,notification["payload"]["object_name"].asString()); + LLUUID task_id = notification["payload"]["task_id"].asUUID(); + script_question_mute(task_id,notification["payload"]["object_name"].asString()); } return false; } @@ -6353,15 +6353,15 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) if ( response["Mute"] ) // mute { - script_question_mute(item_id,notification["payload"]["object_name"].asString()); + script_question_mute(task_id,notification["payload"]["object_name"].asString()); } return false; } -void script_question_mute(const LLUUID& item_id, const std::string& object_name) +void script_question_mute(const LLUUID& task_id, const std::string& object_name) { - LLMuteList::getInstance()->add(LLMute(item_id, object_name, LLMute::OBJECT)); + LLMuteList::getInstance()->add(LLMute(task_id, object_name, LLMute::OBJECT)); // purge the message queue of any previously queued requests from the same source. DEV-4879 class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher @@ -6374,7 +6374,7 @@ void script_question_mute(const LLUUID& item_id, const std::string& object_name) || notification->getName() == "ScriptQuestion" || notification->getName() == "UnknownScriptQuestion") { - return (notification->getPayload()["item_id"].asUUID() == blocked_id); + return (notification->getPayload()["task_id"].asUUID() == blocked_id); } return false; } @@ -6383,7 +6383,7 @@ void script_question_mute(const LLUUID& item_id, const std::string& object_name) }; LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( - gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(task_id)); } static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb); -- cgit v1.2.3 From 50cee8d660d069611220ce57f2190702c022458c Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Fri, 3 May 2013 21:58:19 +0000 Subject: MAINT-2655: "Block button in permissions dialog prompt does not block object" * Fix mute button. --- indra/newview/llviewermessage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fe68592c57..ace16396db 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6476,8 +6476,13 @@ void process_script_question(LLMessageSystem *msg, void **user_data) if (known_questions != questions) { // This is in addition to the normal dialog. + LLSD payload; + payload["task_id"] = taskid; + payload["item_id"] = itemid; + payload["object_name"] = object_name; + args["DOWNLOADURL"] = LLTrans::getString("ViewerDownloadURL"); - LLNotificationsUtil::add("UnknownScriptQuestion",args); + LLNotificationsUtil::add("UnknownScriptQuestion",args,payload); } if (known_questions) -- cgit v1.2.3