From 3527e9c0423f8a3c10c9d6e93805540315b285b6 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 18 Jan 2019 16:12:49 +0200 Subject: SL-3488 Remove "Disable Selected" and "Disable All" Buttons --- indra/newview/llfloatertopobjects.cpp | 41 ++++------------------------------- 1 file changed, 4 insertions(+), 37 deletions(-) (limited to 'indra/newview/llfloatertopobjects.cpp') diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 3e6fc3dc0d..9b5b3a0fc9 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -78,8 +78,6 @@ LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key) mCommitCallbackRegistrar.add("TopObjects.ShowBeacon", boost::bind(&LLFloaterTopObjects::onClickShowBeacon, this)); mCommitCallbackRegistrar.add("TopObjects.ReturnSelected", boost::bind(&LLFloaterTopObjects::onReturnSelected, this)); mCommitCallbackRegistrar.add("TopObjects.ReturnAll", boost::bind(&LLFloaterTopObjects::onReturnAll, this)); - mCommitCallbackRegistrar.add("TopObjects.DisableSelected", boost::bind(&LLFloaterTopObjects::onDisableSelected, this)); - mCommitCallbackRegistrar.add("TopObjects.DisableAll", boost::bind(&LLFloaterTopObjects::onDisableAll, this)); mCommitCallbackRegistrar.add("TopObjects.Refresh", boost::bind(&LLFloaterTopObjects::onRefresh, this)); mCommitCallbackRegistrar.add("TopObjects.GetByObjectName", boost::bind(&LLFloaterTopObjects::onGetByObjectName, this)); mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName", boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this)); @@ -332,7 +330,7 @@ void LLFloaterTopObjects::onClickShowBeacon() showBeacon(); } -void LLFloaterTopObjects::doToObjects(int action, bool all) +void LLFloaterTopObjects::returnObjects(bool all) { LLMessageSystem *msg = gMessageSystem; @@ -356,14 +354,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all) } if (start_message) { - if (action == ACTION_RETURN) - { - msg->newMessageFast(_PREHASH_ParcelReturnObjects); - } - else - { - msg->newMessageFast(_PREHASH_ParcelDisableObjects); - } + msg->newMessageFast(_PREHASH_ParcelReturnObjects); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); @@ -397,7 +388,7 @@ bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD if(!instance) return false; if (option == 0) { - instance->doToObjects(ACTION_RETURN, true); + instance->returnObjects(true); } return false; } @@ -410,31 +401,7 @@ void LLFloaterTopObjects::onReturnAll() void LLFloaterTopObjects::onReturnSelected() { - doToObjects(ACTION_RETURN, false); -} - - -//static -bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance("top_objects"); - if(!instance) return false; - if (option == 0) - { - instance->doToObjects(ACTION_DISABLE, true); - } - return false; -} - -void LLFloaterTopObjects::onDisableAll() -{ - LLNotificationsUtil::add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll); -} - -void LLFloaterTopObjects::onDisableSelected() -{ - doToObjects(ACTION_DISABLE, false); + returnObjects(false); } -- cgit v1.2.3