diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 3781b17d09..54c3aa3480 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -54,7 +54,7 @@ #include "lltrans.h" #include "llviewerassettype.h" #include "llviewerinventory.h" -#include "llviewermenu.h" +#include "llviewermenu.h" // Script reset in edit floater #include "llviewerobject.h" #include "llviewerregion.h" #include "llviewerwindow.h" @@ -87,7 +87,7 @@ BOOL LLPanelContents::postBuild() childSetAction("button new script",&LLPanelContents::onClickNewScript, this); childSetAction("button permissions",&LLPanelContents::onClickPermissions, this); - childSetAction("btn_reset_scripts", &LLPanelContents::onClickResetScripts, this); + childSetAction("btn_reset_scripts", &LLPanelContents::onClickResetScripts, this); // Script reset in edit floater childSetAction("button refresh",&LLPanelContents::onClickRefresh, this); mPanelInventoryObject = getChild("contents_inventory"); @@ -113,7 +113,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) if( !objectp ) { getChildView("button new script")->setEnabled(FALSE); - getChildView("btn_reset_scripts")->setEnabled(FALSE); + getChildView("btn_reset_scripts")->setEnabled(FALSE); // Script reset in edit floater return; } @@ -153,7 +153,6 @@ void LLPanelContents::getState(LLViewerObject *objectp ) // ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) // || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))); - // getChildView("btn_reset_scripts")->setEnabled(editable); BOOL objectIsOK = FALSE; if( editable && all_volume && ( (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1) ) ) { @@ -261,11 +260,13 @@ void LLPanelContents::onClickPermissions(void *userdata) gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterReg::showInstance("bulk_perms")); } +// Script reset in edit floater // static void LLPanelContents::onClickResetScripts(void *userdata) { handle_selected_script_action("reset"); } +// // static void LLPanelContents::onClickRefresh(void *userdata) diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h index 4b2999fa8e..6e0a79ad88 100644 --- a/indra/newview/llpanelcontents.h +++ b/indra/newview/llpanelcontents.h @@ -53,7 +53,7 @@ public: static void onClickNewScript(void*); static void onClickPermissions(void*); - static void onClickResetScripts(void*); + static void onClickResetScripts(void*); // Script reset in edit floater static void onClickRefresh(void*); // Key suffix for "tentative" fields diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5943c451df..0339558f8c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8975,11 +8975,62 @@ class LLToolsSelectedScriptAction : public view_listener_t { bool handleEvent(const LLSD& userdata) { + // Script reset in edit floater + //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(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; + //} handle_selected_script_action(userdata.asString()); + // return true; } }; +// Script reset in edit floater void handle_selected_script_action(const std::string& action) { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a @@ -9041,6 +9092,7 @@ void handle_selected_script_action(const std::string& action) LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL; } } +// void handle_selected_texture_info(void*) { diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 1ad4bc6160..85388a8149 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -126,7 +126,7 @@ 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_selected_script_action(const std::string& action); // Script reset in edit floater // area search // expose this function so other classes can call it