From 42ed8e8ffadd6bd7d8784084e9a29badf5d75c5c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 29 Sep 2010 17:03:05 +0100 Subject: response is starting to limp along. --- indra/newview/llviewermessage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 26b7e0fb6d..b78c7b3d66 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6171,10 +6171,14 @@ const S32 SCRIPT_DIALOG_BUTTON_STR_SIZE = 24; const S32 SCRIPT_DIALOG_MAX_MESSAGE_SIZE = 512; const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n"; +#include "lllslconstants.h" bool callback_script_dialog(const LLSD& notification, const LLSD& response) { LLNotificationForm form(notification["form"]); - std::string button = LLNotification::getSelectedOptionName(response); + //std::string button = "booya";//LLNotification::getSelectedOptionName(response); + std::string button = response[TEXTBOX_MAGIC_TOKEN].asString().empty() ? + LLNotification::getSelectedOptionName(response) : + response[TEXTBOX_MAGIC_TOKEN].asString(); S32 button_idx = LLNotification::getSelectedOption(notification, response); // Didn't click "Ignore" if (button_idx != -1) -- cgit v1.2.3 From 578ee535644931ede7dd74741d905d04d8da7fd6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 29 Sep 2010 17:20:16 +0100 Subject: work on response integrity. --- indra/newview/llviewermessage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b78c7b3d66..f897f5e733 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6176,9 +6176,9 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) { LLNotificationForm form(notification["form"]); //std::string button = "booya";//LLNotification::getSelectedOptionName(response); - std::string button = response[TEXTBOX_MAGIC_TOKEN].asString().empty() ? - LLNotification::getSelectedOptionName(response) : - response[TEXTBOX_MAGIC_TOKEN].asString(); + std::string button = response.has(TEXTBOX_MAGIC_TOKEN) ? + response[TEXTBOX_MAGIC_TOKEN].asString() : + LLNotification::getSelectedOptionName(response); S32 button_idx = LLNotification::getSelectedOption(notification, response); // Didn't click "Ignore" if (button_idx != -1) -- cgit v1.2.3 From f7f3df3a2c0b7a87828c4a2c777d9a94502f3d4e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 29 Sep 2010 18:39:47 +0100 Subject: make empty textboxes return an empty string instead of doing nothing. I hope. --- indra/newview/llviewermessage.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f897f5e733..321100e140 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6176,10 +6176,20 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) { LLNotificationForm form(notification["form"]); //std::string button = "booya";//LLNotification::getSelectedOptionName(response); - std::string button = response.has(TEXTBOX_MAGIC_TOKEN) ? - response[TEXTBOX_MAGIC_TOKEN].asString() : - LLNotification::getSelectedOptionName(response); - S32 button_idx = LLNotification::getSelectedOption(notification, response); + llwarns << "ok: " << response << llendl; + std::string rtn_text; + S32 button_idx; + if (response[TEXTBOX_MAGIC_TOKEN].isDefined()) + { + rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + button_idx = 0; + } + else + { + rtn_text = LLNotification::getSelectedOptionName(response); + button_idx = LLNotification::getSelectedOption(notification, response); + } + llwarns << "rtn: " << rtn_text << " btnidx: " << button_idx << llendl; // Didn't click "Ignore" if (button_idx != -1) { @@ -6192,7 +6202,7 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) msg->addUUID("ObjectID", notification["payload"]["object_id"].asUUID()); msg->addS32("ChatChannel", notification["payload"]["chat_channel"].asInteger()); msg->addS32("ButtonIndex", button_idx); - msg->addString("ButtonLabel", button); + msg->addString("ButtonLabel", rtn_text); msg->sendReliable(LLHost(notification["payload"]["sender"].asString())); } -- cgit v1.2.3 From ca1821048583acedaae7e1dbfe83a0b058faee2c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 29 Sep 2010 19:00:55 +0100 Subject: more robustness for empty-but-not-aborted textboxes. --- indra/newview/llviewermessage.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 321100e140..3a8f76aca1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6179,15 +6179,14 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) llwarns << "ok: " << response << llendl; std::string rtn_text; S32 button_idx; - if (response[TEXTBOX_MAGIC_TOKEN].isDefined()) + button_idx = LLNotification::getSelectedOption(notification, response); + if (response[TEXTBOX_MAGIC_TOKEN].isString()) { rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); - button_idx = 0; } else { rtn_text = LLNotification::getSelectedOptionName(response); - button_idx = LLNotification::getSelectedOption(notification, response); } llwarns << "rtn: " << rtn_text << " btnidx: " << button_idx << llendl; // Didn't click "Ignore" -- cgit v1.2.3 From 4dfb0b7b2d76cf288cca34c23218c4769ec76991 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 29 Sep 2010 19:33:03 +0100 Subject: finally, properly(?) deal with submitting empty text. --- indra/newview/llviewermessage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3a8f76aca1..e284d8d154 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6180,9 +6180,12 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) std::string rtn_text; S32 button_idx; button_idx = LLNotification::getSelectedOption(notification, response); - if (response[TEXTBOX_MAGIC_TOKEN].isString()) + if (response[TEXTBOX_MAGIC_TOKEN].isDefined()) { - rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + if (response[TEXTBOX_MAGIC_TOKEN].isString()) + rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + else + rtn_text.clear(); // bool marks empty string } else { -- cgit v1.2.3 From de84d95ba083c5a2ab827b9b51849d30ab11c7d3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 30 Sep 2010 11:15:58 +0100 Subject: minor tidy-up. --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e284d8d154..02d27be4ec 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -37,6 +37,7 @@ #include "llfloaterreg.h" #include "llfollowcamparams.h" #include "llinventorydefines.h" +#include "lllslconstants.h" #include "llregionhandle.h" #include "llsdserialize.h" #include "llteleportflags.h" @@ -6171,7 +6172,6 @@ const S32 SCRIPT_DIALOG_BUTTON_STR_SIZE = 24; const S32 SCRIPT_DIALOG_MAX_MESSAGE_SIZE = 512; const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n"; -#include "lllslconstants.h" bool callback_script_dialog(const LLSD& notification, const LLSD& response) { LLNotificationForm form(notification["form"]); -- cgit v1.2.3 From 5b3f293453af7c54ef5c1913c706982ece8be1d0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 30 Sep 2010 12:06:44 +0100 Subject: more de-crufting. --- indra/newview/llviewermessage.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 02d27be4ec..dfd7b1092a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6175,8 +6175,7 @@ const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n"; bool callback_script_dialog(const LLSD& notification, const LLSD& response) { LLNotificationForm form(notification["form"]); - //std::string button = "booya";//LLNotification::getSelectedOptionName(response); - llwarns << "ok: " << response << llendl; + std::string rtn_text; S32 button_idx; button_idx = LLNotification::getSelectedOption(notification, response); @@ -6191,7 +6190,7 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) { rtn_text = LLNotification::getSelectedOptionName(response); } - llwarns << "rtn: " << rtn_text << " btnidx: " << button_idx << llendl; + // Didn't click "Ignore" if (button_idx != -1) { -- cgit v1.2.3 From 58f0e78cb491833440d85e105593bccc2d2aa4ab Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Tue, 12 Oct 2010 13:50:17 -0700 Subject: Initial work on viewer motion interpolation. Changes include: * InterpolationTime and InterpolationPhaseOut values in settings.xml to control new object interpolation code. Use zero to revert to old logic * Viewer motion interpolation lasts InterpolationTime and will start to phase out after InterpolationPhaseOut seconds * Changed LLWorld::getMinAllowedZ() to take a world-position as a parameter * Added LLVOAvatarSelf::resetRegionCrossingTimer() * Actually reset LLVOAvatarSelf::mRegionCrossingTimer so we get sensible timing data for region crossings * LLVOAvatarSelf::updateRegion() will update position value due to region changes Code reviewed by Ambroff * --- indra/newview/llviewermessage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 26b7e0fb6d..8120c37874 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3722,6 +3722,7 @@ void process_crossed_region(LLMessageSystem* msg, void**) return; } LL_INFOS("Messaging") << "process_crossed_region()" << LL_ENDL; + gAgentAvatarp->resetRegionCrossingTimer(); U32 sim_ip; msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip); -- cgit v1.2.3 From 3fa059409aad9d7b5aedb4ed112cb52da6990ac4 Mon Sep 17 00:00:00 2001 From: Bill Curtis Date: Mon, 8 Nov 2010 10:54:58 -0800 Subject: changes to read max-agent-groups from login.cgi response --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c35173a7d4..14e0d49088 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -633,7 +633,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = MAX_AGENT_GROUPS; + S32 max_groups = gMaxAgentGroups; if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.count() < max_groups) -- cgit v1.2.3 From ee8df375449e97476408417ec6dea0d6a8853d73 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 10 Nov 2010 15:22:49 -0800 Subject: fixing group invite name scrubbing to work with server changes --- indra/newview/llviewermessage.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 598ad7afc6..0ca30d5f3d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2509,15 +2509,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) invite_bucket = (struct invite_bucket_t*) &binary_bucket[0]; S32 membership_fee = ntohl(invite_bucket->membership_fee); - // IDEVO Clean up legacy name "Resident" in message constructed in - // lldatagroups.cpp - U32 pos = message.find(" has invited you to join a group.\n"); - if (pos != std::string::npos) - { - // use cleaned-up name from above - message = name + message.substr(pos); - } - LLSD payload; payload["transaction_id"] = session_id; payload["group_id"] = from_id; -- cgit v1.2.3 From d0de833d947b219eabae01abbb5750ad05e5e305 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 16 Nov 2010 23:26:08 +0200 Subject: STORM-563 FIXED Updated all localized XUI strings and notifications templates to use display names. Previously name substitutions were broken, so "[FIRST] [LAST]" was displayed instead of avatar name. Some of the affected notifications: * avatar went online/offline notification * object return notification * calling card offer * script dialog * auto-unmute notification. See the diff for more details. The fixes apply to all locales but English (which is already correct). Besides, I fixed calling card offer notification to display avatar name correctly. It was broken even in English. --- indra/newview/llviewermessage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7c0fc681a4..1f54940b25 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3031,6 +3031,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**) } else { + args["NAME"] = source_name; LLNotificationsUtil::add("OfferCallingCard", args, payload); } } -- cgit v1.2.3