From 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Oct 2012 19:43:35 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system converted all remaining LLViewerStats to lltrace --- indra/newview/llpreviewscript.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 88727bf59b..059d5d4061 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -942,7 +942,8 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata) void LLScriptEdCore::doSave( BOOL close_after_save ) { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); + LLStatViewer::LSL_SAVES.add(1); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); if( mSaveCallback ) { @@ -1146,8 +1147,8 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { - - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); + LLStatViewer::LSL_SAVES.add(1); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); LLScriptEdCore* self = (LLScriptEdCore*) userdata; @@ -1670,7 +1671,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) @@ -1902,7 +1903,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/newview/llpreviewscript.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 059d5d4061..7607df5a55 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -943,7 +943,6 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata) void LLScriptEdCore::doSave( BOOL close_after_save ) { LLStatViewer::LSL_SAVES.add(1); - //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); if( mSaveCallback ) { @@ -1148,7 +1147,6 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { LLStatViewer::LSL_SAVES.add(1); - //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); LLScriptEdCore* self = (LLScriptEdCore*) userdata; @@ -1671,8 +1669,6 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset } else { - //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); - if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { @@ -1903,8 +1899,6 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, } else { - //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); - if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/newview/llpreviewscript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 050db136bc..f87a958fbc 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -942,7 +942,7 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata) void LLScriptEdCore::doSave( BOOL close_after_save ) { - LLStatViewer::LSL_SAVES.add(1); + add(LLStatViewer::LSL_SAVES, 1); if( mSaveCallback ) { @@ -1146,7 +1146,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { - LLStatViewer::LSL_SAVES.add(1); + add(LLStatViewer::LSL_SAVES, 1); LLScriptEdCore* self = (LLScriptEdCore*) userdata; -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llpreviewscript.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 516ecedbc8..bfc779c057 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1069,15 +1069,15 @@ struct LLEntryAndEdCore void LLScriptEdCore::deleteBridges() { - S32 count = mBridges.count(); + S32 count = mBridges.size(); LLEntryAndEdCore* eandc; for(S32 i = 0; i < count; i++) { - eandc = mBridges.get(i); + eandc = mBridges.at(i); delete eandc; mBridges[i] = NULL; } - mBridges.reset(); + mBridges.clear(); } // virtual -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llpreviewscript.cpp | 70 +++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index bfc779c057..70a280ca09 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -531,14 +531,14 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename) { if (filename.empty()) { - llwarns << "Empty file name" << llendl; + LL_WARNS() << "Empty file name" << LL_ENDL; return false; } LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ if (!file) { - llwarns << "Error opening " << filename << llendl; + LL_WARNS() << "Error opening " << filename << LL_ENDL; return false; } @@ -550,7 +550,7 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename) size_t nread = fread(buffer, 1, file_length, file); if (nread < file_length) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } buffer[nread] = '\0'; fclose(file); @@ -566,7 +566,7 @@ bool LLScriptEdCore::writeToFile(const std::string& filename) LLFILE* fp = LLFile::fopen(filename, "wb"); if (!fp) { - llwarns << "Unable to write to " << filename << llendl; + LL_WARNS() << "Unable to write to " << filename << LL_ENDL; LLSD row; row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; @@ -1021,8 +1021,8 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data) LLStringUtil::replaceChar(line, ',',' '); LLStringUtil::replaceChar(line, ')',' '); sscanf(line.c_str(), "%d %d", &row, &column); - //llinfos << "LLScriptEdCore::onErrorList() - " << row << ", " - //<< column << llendl; + //LL_INFOS() << "LLScriptEdCore::onErrorList() - " << row << ", " + //<< column << LL_ENDL; self->mEditor->setCursor(row, column); self->mEditor->setFocus(TRUE); } @@ -1289,7 +1289,7 @@ BOOL LLPreviewLSL::postBuild() // virtual void LLPreviewLSL::callbackLSLCompileSucceeded() { - llinfos << "LSL Bytecode saved" << llendl; + LL_INFOS() << "LSL Bytecode saved" << LL_ENDL; mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); closeIfNeeded(); @@ -1298,7 +1298,7 @@ void LLPreviewLSL::callbackLSLCompileSucceeded() // virtual void LLPreviewLSL::callbackLSLCompileFailed(const LLSD& compile_errors) { - llinfos << "Compile failed!" << llendl; + LL_INFOS() << "Compile failed!" << LL_ENDL; for(LLSD::array_const_iterator line = compile_errors.beginArray(); line < compile_errors.endArray(); @@ -1413,7 +1413,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save) // fails, go ahead and save the text anyway. void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/) { - // llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl; + // LL_INFOS() << "LLPreviewLSL::saveIfNeeded()" << LL_ENDL; if(!mScriptEd->hasChanged()) { return; @@ -1459,7 +1459,7 @@ void LLPreviewLSL::uploadAssetViaCaps(const std::string& url, const std::string& filename, const LLUUID& item_id) { - llinfos << "Update Agent Inventory via capability" << llendl; + LL_INFOS() << "Update Agent Inventory via capability" << LL_ENDL; LLSD body; body["item_id"] = item_id; body["target"] = "lsl2"; @@ -1492,7 +1492,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, asset_id.asString().c_str(), gAgent.isGodlike())) { - llinfos << "Compile failed!" << llendl; + LL_INFOS() << "Compile failed!" << LL_ENDL; //char command[256]; //sprintf(command, "type %s\n", err_filename.c_str()); //system(command); @@ -1530,7 +1530,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, } else { - llinfos << "Compile worked!" << llendl; + LL_INFOS() << "Compile worked!" << LL_ENDL; if(gAssetStorage) { getWindow()->incBusyCount(); @@ -1572,8 +1572,8 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 } else { - llwarns << "Inventory item for script " << info->mItemUUID - << " is no longer in agent inventory." << llendl; + LL_WARNS() << "Inventory item for script " << info->mItemUUID + << " is no longer in agent inventory." << LL_ENDL; } // Find our window and close it if requested. @@ -1592,7 +1592,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 } else { - llwarns << "Problem saving script: " << status << llendl; + LL_WARNS() << "Problem saving script: " << status << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("SaveScriptFailReason", args); @@ -1630,7 +1630,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d } else { - llwarns << "Problem saving LSL Bytecode (Preview)" << llendl; + LL_WARNS() << "Problem saving LSL Bytecode (Preview)" << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("SaveBytecodeFailReason", args); @@ -1642,8 +1642,8 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid - << llendl; + LL_DEBUGS() << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid + << LL_ENDL; LLUUID* item_uuid = (LLUUID*)user_data; LLPreviewLSL* preview = LLFloaterReg::findTypedInstance("preview_script", *item_uuid); if( preview ) @@ -1688,7 +1688,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset } preview->mAssetStatus = PREVIEW_ASSET_ERROR; - llwarns << "Problem loading script: " << status << llendl; + LL_WARNS() << "Problem loading script: " << status << LL_ENDL; } } delete item_uuid; @@ -1755,7 +1755,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, const LLUUID& item_id, bool is_script_running) { - lldebugs << "LSL Bytecode saved" << llendl; + LL_DEBUGS() << "LSL Bytecode saved" << LL_ENDL; mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); closeIfNeeded(); @@ -1764,7 +1764,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, // virtual void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) { - lldebugs << "Compile failed!" << llendl; + LL_DEBUGS() << "Compile failed!" << LL_ENDL; for(LLSD::array_const_iterator line = compile_errors.beginArray(); line < compile_errors.endArray(); line++) @@ -1783,7 +1783,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) void LLLiveLSLEditor::loadAsset() { - //llinfos << "LLLiveLSLEditor::loadAsset()" << llendl; + //LL_INFOS() << "LLLiveLSLEditor::loadAsset()" << LL_ENDL; if(!mIsNew) { LLViewerObject* object = gObjectList.findObject(mObjectUUID); @@ -1795,7 +1795,7 @@ void LLLiveLSLEditor::loadAsset() || gAgent.isGodlike())) { mItem = new LLViewerInventoryItem(item); - //llinfos << "asset id " << mItem->getAssetUUID() << llendl; + //LL_INFOS() << "asset id " << mItem->getAssetUUID() << LL_ENDL; } if(!gAgent.isGodlike() @@ -1887,8 +1887,8 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id - << llendl; + LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id + << LL_ENDL; LLUUID* xored_id = (LLUUID*)user_data; LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", *xored_id); @@ -1933,7 +1933,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType if (file.getLastBytesRead() != file_length || file_length <= 0) { - llwarns << "Error reading " << uuid << ":" << type << llendl; + LL_WARNS() << "Error reading " << uuid << ":" << type << LL_ENDL; } buffer[file_length] = '\0'; @@ -2156,7 +2156,7 @@ void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url, const LLUUID& item_id, BOOL is_running) { - llinfos << "Update Task Inventory via capability " << url << llendl; + LL_INFOS() << "Update Task Inventory via capability " << url << LL_ENDL; LLSD body; body["task_id"] = task_id; body["item_id"] = item_id; @@ -2195,7 +2195,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, gAgent.isGodlike())) { // load the error file into the error scrolllist - llinfos << "Compile failed!" << llendl; + LL_INFOS() << "Compile failed!" << LL_ENDL; if(NULL != (fp = LLFile::fopen(err_filename, "r"))) { char buffer[MAX_STRING]; /*Flawfinder: ignore*/ @@ -2233,12 +2233,12 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, } else { - llinfos << "Compile worked!" << llendl; + LL_INFOS() << "Compile worked!" << LL_ENDL; mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessfulSaving")); if(gAssetStorage) { - llinfos << "LLLiveLSLEditor::saveAsset " - << mItem->getAssetUUID() << llendl; + LL_INFOS() << "LLLiveLSLEditor::saveAsset " + << mItem->getAssetUUID() << LL_ENDL; getWindow()->incBusyCount(); mPendingUploads++; LLLiveLSLSaveData* data = NULL; @@ -2271,7 +2271,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da if (status) { - llwarns << "Unable to save text for a script." << llendl; + LL_WARNS() << "Unable to save text for a script." << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("CompileQueueSaveText", args); @@ -2302,7 +2302,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use return; if(0 ==status) { - llinfos << "LSL Bytecode saved" << llendl; + LL_INFOS() << "LSL Bytecode saved" << LL_ENDL; LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID if (self) { @@ -2328,8 +2328,8 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use } else { - llinfos << "Problem saving LSL Bytecode (Live Editor)" << llendl; - llwarns << "Unable to save a compiled script." << llendl; + LL_INFOS() << "Problem saving LSL Bytecode (Live Editor)" << LL_ENDL; + LL_WARNS() << "Unable to save a compiled script." << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); -- cgit v1.2.3 From ab71e294e00270aada33b283bdae7566ef93f6e2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 26 Dec 2013 12:34:50 +0200 Subject: MAINT-3570 FIXED Callbacks for menu item are added. --- indra/newview/llpreviewscript.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index e533be7f24..f6f9dc90a9 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -518,6 +518,10 @@ void LLScriptEdCore::initMenu() menuItem->setClickCallback(boost::bind(&LLTextEditor::selectAll, mEditor)); menuItem->setEnableCallback(boost::bind(&LLTextEditor::canSelectAll, mEditor)); + menuItem = getChild("Deselect"); + menuItem->setClickCallback(boost::bind(&LLTextEditor::deselect, mEditor)); + menuItem->setEnableCallback(boost::bind(&LLTextEditor::canDeselect, mEditor)); + menuItem = getChild("Search / Replace..."); menuItem->setClickCallback(boost::bind(&LLFloaterScriptSearch::show, this)); -- cgit v1.2.3 From da4ef4214247fba1f14d8d30f8b34c108a8f2eb0 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Tue, 28 Jan 2014 12:20:41 +0200 Subject: MAINT-3643 FIXED Copy previous search / replace strings in LSL editor --- indra/newview/llpreviewscript.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index f6f9dc90a9..53a5ed1476 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -192,11 +192,11 @@ public: private: LLScriptEdCore* mEditorCore; - static LLFloaterScriptSearch* sInstance; protected: LLLineEditor* mSearchBox; + LLLineEditor* mReplaceBox; void onSearchBoxCommit(); }; @@ -205,6 +205,7 @@ LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL; LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) : LLFloater(LLSD()), mSearchBox(NULL), + mReplaceBox(NULL), mEditorCore(editor_core) { buildFromFile("floater_script_search.xml"); @@ -227,6 +228,7 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) BOOL LLFloaterScriptSearch::postBuild() { + mReplaceBox = getChild("replace_text"); mSearchBox = getChild("search_text"); mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this)); mSearchBox->setCommitOnFocusLost(FALSE); @@ -242,8 +244,12 @@ BOOL LLFloaterScriptSearch::postBuild() //static void LLFloaterScriptSearch::show(LLScriptEdCore* editor_core) { + LLSD::String search_text; + LLSD::String replace_text; if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core) { + search_text=sInstance->mSearchBox->getValue().asString(); + replace_text=sInstance->mReplaceBox->getValue().asString(); sInstance->closeFloater(); delete sInstance; } @@ -252,6 +258,8 @@ void LLFloaterScriptSearch::show(LLScriptEdCore* editor_core) { // sInstance will be assigned in the constructor. new LLFloaterScriptSearch(editor_core); + sInstance->mSearchBox->setValue(search_text); + sInstance->mReplaceBox->setValue(replace_text); } sInstance->openFloater(); @@ -272,7 +280,7 @@ void LLFloaterScriptSearch::onBtnSearch(void *userdata) void LLFloaterScriptSearch::handleBtnSearch() { LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->selectNext(getChild("search_text")->getValue().asString(), caseChk->get()); + mEditorCore->mEditor->selectNext(mSearchBox->getValue().asString(), caseChk->get()); } // static @@ -285,7 +293,7 @@ void LLFloaterScriptSearch::onBtnReplace(void *userdata) void LLFloaterScriptSearch::handleBtnReplace() { LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->replaceText(getChild("search_text")->getValue().asString(), getChild("replace_text")->getValue().asString(), caseChk->get()); + mEditorCore->mEditor->replaceText(mSearchBox->getValue().asString(), mReplaceBox->getValue().asString(), caseChk->get()); } // static @@ -298,7 +306,7 @@ void LLFloaterScriptSearch::onBtnReplaceAll(void *userdata) void LLFloaterScriptSearch::handleBtnReplaceAll() { LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->replaceTextAll(getChild("search_text")->getValue().asString(), getChild("replace_text")->getValue().asString(), caseChk->get()); + mEditorCore->mEditor->replaceTextAll(mSearchBox->getValue().asString(), mReplaceBox->getValue().asString(), caseChk->get()); } bool LLFloaterScriptSearch::hasAccelerators() const @@ -329,7 +337,7 @@ void LLFloaterScriptSearch::onSearchBoxCommit() if (mEditorCore && mEditorCore->mEditor) { LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->selectNext(getChild("search_text")->getValue().asString(), caseChk->get()); + mEditorCore->mEditor->selectNext(mSearchBox->getValue().asString(), caseChk->get()); } } -- cgit v1.2.3 From 294d6777bf79bd843fc652f0b4fb4cd51cc2c0c1 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 3 Feb 2014 11:53:39 +0200 Subject: MAINT-3671 FIXED Rename title when new tab is added. --- indra/newview/llpreviewscript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 53a5ed1476..26c46d543c 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1879,7 +1879,7 @@ void LLLiveLSLEditor::loadAsset() mIsModifiable = item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE); - + refreshFromItem(); // This is commented out, because we don't completely // handle script exports yet. /* -- cgit v1.2.3