From 9fe563c9f310d45995e115311e9360e4efadd081 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 6 Jul 2016 00:51:28 -0400 Subject: [PATCH] Solve SV-2103: Estate Kick was Teleporting Home, which wasn't always a kick Estate Kick button now offers choice between Kicking Home and Kicking Out. Estate Ban always kicks out Translators: Please update SV-2103 in notifications.xml appropriately --- indra/newview/llfloateravatarlist.cpp | 8 +++++--- indra/newview/llviewermenu.cpp | 7 ++++--- indra/newview/skins/default/xui/en-us/notifications.xml | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index f23d8c6d3..ca5fc7fe0 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -1398,7 +1398,8 @@ static void cmd_freeze(const LLAvatarListEntry* entry) { send_freeze(entry->get static void cmd_unfreeze(const LLAvatarListEntry* entry) { send_freeze(entry->getID(), false); } static void cmd_eject(const LLAvatarListEntry* entry) { send_eject(entry->getID(), false); } static void cmd_ban(const LLAvatarListEntry* entry) { send_eject(entry->getID(), true); } -static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", entry->getID()); } +static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("kickestate", entry->getID()); } +static void cmd_estate_tp_home(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", entry->getID()); } static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); } void LLFloaterAvatarList::doCommand(avlist_command_t func, bool single/*=false*/) const @@ -1469,8 +1470,9 @@ void LLFloaterAvatarList::callbackEjectFromEstate(const LLSD& notification, cons { if (!instanceExists()) return; LLFloaterAvatarList& inst(instance()); - if (!LLNotification::getSelectedOption(notification, response)) // if == 0 - inst.doCommand(cmd_estate_eject); + S32 option = LLNotification::getSelectedOption(notification, response); + if (option != 2) + inst.doCommand(option ? cmd_estate_tp_home : cmd_estate_eject); } //static diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index db001fd10..608f1f3e8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9182,17 +9182,18 @@ class ListFreeze : public view_listener_t } }; -void estate_bulk_eject(const uuid_vec_t& ids, bool ban, S32 zero) +void estate_bulk_eject(const uuid_vec_t& ids, bool ban, S32 option) { - if (ids.empty() || zero != 0) return; + if (ids.empty() || option == (ban ? 1 : 2)) return; std::vector strings(2, gAgentID.asString()); // [0] = our agent id + const std::string request(option == 1 ? "teleporthomeuser" : "kickestate"); for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { LLUUID id(*it); if (id.isNull()) continue; strings[1] = id.asString(); // [1] = target agent id - LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", LLFloaterRegionInfo::getLastInvoice(), strings); + LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, request, LLFloaterRegionInfo::getLastInvoice(), strings); if (ban) LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, id); } diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index 29b956251..396907458 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -4164,9 +4164,10 @@ Remove estate manager for this estate only or for [ALL_ESTATES]? Kick [EVIL_USER] from this estate? confirm + canceltext="Cancel" + name="yesnocancelbuttons" + notext="Kick Home" + yestext="Kick"/>