summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-11-26 14:45:30 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-11-26 14:45:30 +0200
commit300f6f8b8e74fb5538beeb39b88ee9bccf9e8129 (patch)
treeadddad9a1a0096aaad26c4066f883228b1197c5d /indra
parent7d93032f08f134ba39a9008be7c0ee20db7ac59c (diff)
Revert "SL-13463 Add 'Reset scripts' button to Content tab of Build floater"
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelcontents.cpp11
-rw-r--r--indra/newview/llpanelcontents.h1
-rw-r--r--indra/newview/llviewermenu.cpp100
-rw-r--r--indra/newview/llviewermenu.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml13
5 files changed, 50 insertions, 76 deletions
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 116b23e595..3bae0cebfb 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -54,7 +54,6 @@
#include "lltrans.h"
#include "llviewerassettype.h"
#include "llviewerinventory.h"
-#include "llviewermenu.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
@@ -83,7 +82,6 @@ BOOL LLPanelContents::postBuild()
childSetAction("button new script",&LLPanelContents::onClickNewScript, this);
childSetAction("button permissions",&LLPanelContents::onClickPermissions, this);
- childSetAction("btn_reset_scripts", &LLPanelContents::onClickResetScripts, this);
mPanelInventoryObject = getChild<LLPanelObjectInventory>("contents_inventory");
@@ -108,7 +106,6 @@ void LLPanelContents::getState(LLViewerObject *objectp )
if( !objectp )
{
getChildView("button new script")->setEnabled(FALSE);
- getChildView("btn_reset_scripts")->setEnabled(FALSE);
return;
}
@@ -128,8 +125,6 @@ void LLPanelContents::getState(LLViewerObject *objectp )
((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
|| (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)));
- getChildView("btn_reset_scripts")->setEnabled(editable);
-
getChildView("button permissions")->setEnabled(!objectp->isPermanentEnforced());
mPanelInventoryObject->setEnabled(!objectp->isPermanentEnforced());
}
@@ -211,9 +206,3 @@ void LLPanelContents::onClickPermissions(void *userdata)
LLPanelContents* self = (LLPanelContents*)userdata;
gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterReg::showInstance("bulk_perms"));
}
-
-// static
-void LLPanelContents::onClickResetScripts(void *userdata)
-{
- handle_selected_script_action("reset");
-}
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index 5b1a57de42..6ecc78afa0 100644
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -53,7 +53,6 @@ public:
static void onClickNewScript(void*);
static void onClickPermissions(void*);
- static void onClickResetScripts(void*);
// Key suffix for "tentative" fields
static const char* TENTATIVE_SUFFIX;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index fbbe6ce4f2..dfe9a38d34 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7242,62 +7242,58 @@ class LLToolsSelectedScriptAction : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_selected_script_action(userdata.asString());
+ std::string action = userdata.asString();
+ bool mono = false;
+ std::string msg, name;
+ std::string title;
+ if (action == "compile mono")
+ {
+ name = "compile_queue";
+ mono = true;
+ msg = "Recompile";
+ title = LLTrans::getString("CompileQueueTitle");
+ }
+ if (action == "compile lsl")
+ {
+ name = "compile_queue";
+ msg = "Recompile";
+ title = LLTrans::getString("CompileQueueTitle");
+ }
+ else if (action == "reset")
+ {
+ name = "reset_queue";
+ msg = "Reset";
+ title = LLTrans::getString("ResetQueueTitle");
+ }
+ else if (action == "start")
+ {
+ name = "start_queue";
+ msg = "SetRunning";
+ title = LLTrans::getString("RunQueueTitle");
+ }
+ else if (action == "stop")
+ {
+ name = "stop_queue";
+ msg = "SetRunningNot";
+ title = LLTrans::getString("NotRunQueueTitle");
+ }
+ LLUUID id; id.generate();
+
+ LLFloaterScriptQueue* queue =LLFloaterReg::getTypedInstance<LLFloaterScriptQueue>(name, LLSD(id));
+ if (queue)
+ {
+ queue->setMono(mono);
+ queue_actions(queue, msg);
+ queue->setTitle(title);
+ }
+ else
+ {
+ LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL;
+ }
return true;
}
};
-void handle_selected_script_action(const std::string& action)
-{
- bool mono = false;
- std::string msg, name;
- std::string title;
- if (action == "compile mono")
- {
- name = "compile_queue";
- mono = true;
- msg = "Recompile";
- title = LLTrans::getString("CompileQueueTitle");
- }
- if (action == "compile lsl")
- {
- name = "compile_queue";
- msg = "Recompile";
- title = LLTrans::getString("CompileQueueTitle");
- }
- else if (action == "reset")
- {
- name = "reset_queue";
- msg = "Reset";
- title = LLTrans::getString("ResetQueueTitle");
- }
- else if (action == "start")
- {
- name = "start_queue";
- msg = "SetRunning";
- title = LLTrans::getString("RunQueueTitle");
- }
- else if (action == "stop")
- {
- name = "stop_queue";
- msg = "SetRunningNot";
- title = LLTrans::getString("NotRunQueueTitle");
- }
- LLUUID id; id.generate();
-
- LLFloaterScriptQueue* queue = LLFloaterReg::getTypedInstance<LLFloaterScriptQueue>(name, LLSD(id));
- if (queue)
- {
- queue->setMono(mono);
- queue_actions(queue, msg);
- queue->setTitle(title);
- }
- else
- {
- LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL;
- }
-}
-
void handle_selected_texture_info(void*)
{
for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin();
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index a9db65ecba..0f63c8cf58 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -112,7 +112,6 @@ void handle_object_edit();
void handle_attachment_edit(const LLUUID& inv_item_id);
void handle_attachment_touch(const LLUUID& inv_item_id);
bool enable_attachment_touch(const LLUUID& inv_item_id);
-void handle_selected_script_action(const std::string& action);
void handle_buy_land();
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 1377bad6cf..0abee2ff80 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2575,22 +2575,13 @@ even though the user gets a free copy.
border_visible="true"
bevel_style="in"
follows="left|top|right"
- height="300"
+ height="325"
layout="topleft"
left="10"
name="contents_inventory"
top="50"
width="275" />
- <button
- follows="left|bottom"
- height="23"
- label="Reset Scripts"
- layout="topleft"
- left="10"
- name="btn_reset_scripts"
- bottom="-1"
- width="118" />
- </panel>
+ </panel>
</tab_container>
<panel
follows="left|top"