From 1ddfb4c5dd436fc1a9a867d0a2b9980483a3d3fd Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 4 Mar 2010 13:16:28 -0700 Subject: Applied Kitty Barnett's patch for Search/Replace in notecards. --- linden/indra/llui/lltexteditor.cpp | 72 ++++----- linden/indra/llui/lltexteditor.h | 2 + linden/indra/newview/CMakeLists.txt | 2 + linden/indra/newview/llfloatersearchreplace.cpp | 114 ++++++++++++++ linden/indra/newview/llfloatersearchreplace.h | 32 ++++ linden/indra/newview/llpreview.cpp | 21 +++ linden/indra/newview/llpreviewnotecard.cpp | 12 ++ linden/indra/newview/llpreviewnotecard.h | 2 + linden/indra/newview/llpreviewscript.cpp | 165 ++------------------- linden/indra/newview/llpreviewscript.h | 3 +- .../skins/default/xui/da/floater_script_search.xml | 13 -- .../default/xui/da/floater_search_replace.xml | 13 ++ .../skins/default/xui/de/floater_script_search.xml | 13 -- .../default/xui/de/floater_search_replace.xml | 13 ++ .../default/xui/en-us/floater_script_search.xml | 40 ----- .../default/xui/en-us/floater_search_replace.xml | 40 +++++ .../skins/default/xui/es/floater_script_search.xml | 15 -- .../default/xui/es/floater_search_replace.xml | 15 ++ .../skins/default/xui/fr/floater_script_search.xml | 15 -- .../default/xui/fr/floater_search_replace.xml | 15 ++ .../skins/default/xui/hu/floater_script_search.xml | 14 -- .../default/xui/hu/floater_search_replace.xml | 14 ++ .../skins/default/xui/it/floater_script_search.xml | 15 -- .../default/xui/it/floater_search_replace.xml | 15 ++ .../skins/default/xui/ja/floater_script_search.xml | 13 -- .../default/xui/ja/floater_search_replace.xml | 13 ++ .../skins/default/xui/ko/floater_script_search.xml | 13 -- .../default/xui/ko/floater_search_replace.xml | 13 ++ .../skins/default/xui/pl/floater_script_search.xml | 14 -- .../default/xui/pl/floater_search_replace.xml | 14 ++ .../skins/default/xui/pt/floater_script_search.xml | 15 -- .../default/xui/pt/floater_search_replace.xml | 15 ++ .../skins/default/xui/ru/floater_script_search.xml | 16 -- .../default/xui/ru/floater_search_replace.xml | 16 ++ .../skins/default/xui/tr/floater_script_search.xml | 14 -- .../default/xui/tr/floater_search_replace.xml | 14 ++ .../skins/default/xui/uk/floater_script_search.xml | 16 -- .../default/xui/uk/floater_search_replace.xml | 16 ++ .../skins/default/xui/zh/floater_script_search.xml | 13 -- .../default/xui/zh/floater_search_replace.xml | 13 ++ 40 files changed, 477 insertions(+), 426 deletions(-) create mode 100644 linden/indra/newview/llfloatersearchreplace.cpp create mode 100644 linden/indra/newview/llfloatersearchreplace.h create mode 100644 linden/indra/newview/skins/default/xui/da/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/de/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/en-us/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/es/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/fr/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/hu/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/it/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/ja/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/ko/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/pl/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/ru/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/tr/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/uk/floater_search_replace.xml create mode 100644 linden/indra/newview/skins/default/xui/zh/floater_search_replace.xml diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 7c05239..b0229be 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -648,6 +648,7 @@ void LLTextEditor::selectNext(const std::string& search_text_in, BOOL case_insen } setCursorPos(loc); + scrollToPos(mCursorPos); mIsSelecting = TRUE; mSelectionEnd = mCursorPos; @@ -3413,6 +3414,43 @@ void LLTextEditor::setCursorAndScrollToEnd() needsScroll(); } +void LLTextEditor::scrollToPos(S32 pos) +{ + mScrollbar->setDocSize( getLineCount() ); + + S32 line, offset; + getLineAndOffset(pos, &line, &offset ); + + S32 page_size = mScrollbar->getPageSize(); + + if( line < mScrollbar->getDocPos() ) + { + // scroll so that the cursor is at the top of the page + mScrollbar->setDocPos( line ); + } + else if( line >= mScrollbar->getDocPos() + page_size - 1 ) + { + S32 new_pos = 0; + if( line < mScrollbar->getDocSize() - 1 ) + { + // scroll so that the cursor is one line above the bottom of the page, + new_pos = line - page_size + 1; + } + else + { + // if there is less than a page of text remaining, scroll so that the cursor is at the bottom + new_pos = mScrollbar->getDocPosMax(); + } + mScrollbar->setDocPos( new_pos ); + } + + // Check if we've scrolled to bottom for callback if asked for callback + if (mOnScrollEndCallback && mOnScrollEndData && (mScrollbar->getDocPos() == mScrollbar->getDocPosMax())) + { + mOnScrollEndCallback(mOnScrollEndData); + } +} + void LLTextEditor::getLineAndColumnForPosition( S32 position, S32* line, S32* col, BOOL include_wordwrap ) { if( include_wordwrap ) @@ -3490,45 +3528,13 @@ void LLTextEditor::endOfDoc() // Sets the scrollbar from the cursor position void LLTextEditor::updateScrollFromCursor() { - mScrollbar->setDocSize( getLineCount() ); - if (mReadOnly) { // no cursor in read only mode return; } - S32 line, offset; - getLineAndOffset( mCursorPos, &line, &offset ); - - S32 page_size = mScrollbar->getPageSize(); - - if( line < mScrollbar->getDocPos() ) - { - // scroll so that the cursor is at the top of the page - mScrollbar->setDocPos( line ); - } - else if( line >= mScrollbar->getDocPos() + page_size - 1 ) - { - S32 new_pos = 0; - if( line < mScrollbar->getDocSize() - 1 ) - { - // scroll so that the cursor is one line above the bottom of the page, - new_pos = line - page_size + 1; - } - else - { - // if there is less than a page of text remaining, scroll so that the cursor is at the bottom - new_pos = mScrollbar->getDocPosMax(); - } - mScrollbar->setDocPos( new_pos ); - } - - // Check if we've scrolled to bottom for callback if asked for callback - if (mOnScrollEndCallback && mOnScrollEndData && (mScrollbar->getDocPos() == mScrollbar->getDocPosMax())) - { - mOnScrollEndCallback(mOnScrollEndData); - } + scrollToPos(mCursorPos); } void LLTextEditor::reshape(S32 width, S32 height, BOOL called_from_parent) diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index a62f01d..f26bf3b 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h @@ -171,6 +171,7 @@ public: void setCursor(S32 row, S32 column); void setCursorPos(S32 offset); void setCursorAndScrollToEnd(); + void scrollToPos(S32 pos); void getLineAndColumnForPosition( S32 position, S32* line, S32* col, BOOL include_wordwrap ); void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ); @@ -263,6 +264,7 @@ public: static bool isPartOfWord(llwchar c) { return (c == '_') || LLStringOps::isAlnum((char)c); } + BOOL isReadOnly() { return mReadOnly; } protected: // // Methods diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index d4b618f..464bb83 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -195,6 +195,7 @@ set(viewer_SOURCE_FILES llfloaterregioninfo.cpp llfloaterreporter.cpp llfloaterscriptdebug.cpp + llfloatersearchreplace.cpp llfloatersellland.cpp llfloatersettingsdebug.cpp llfloatersnapshot.cpp @@ -617,6 +618,7 @@ set(viewer_HEADER_FILES llfloaterproperties.h llfloaterregioninfo.h llfloaterreporter.h + llfloatersearchreplace.h llfloaterscriptdebug.h llfloatersellland.h llfloatersettingsdebug.h diff --git a/linden/indra/newview/llfloatersearchreplace.cpp b/linden/indra/newview/llfloatersearchreplace.cpp new file mode 100644 index 0000000..a339a54 --- /dev/null +++ b/linden/indra/newview/llfloatersearchreplace.cpp @@ -0,0 +1,114 @@ +#include "llviewerprecompiledheaders.h" +#include "llcheckboxctrl.h" +#include "llfocusmgr.h" +#include "lluictrlfactory.h" + +#include "llfloatersearchreplace.h" + +const S32 SEARCH_REPLACE_WIDTH = 300; +const S32 SEARCH_REPLACE_HEIGHT = 120; +const std::string SEARCH_REPLACE_TITLE = "Search and Replace"; + +LLFloaterSearchReplace* LLFloaterSearchReplace::sInstance = NULL; + +LLFloaterSearchReplace::LLFloaterSearchReplace() : mEditor(NULL), + LLFloater(std::string("searchreplace"), LLRect(0, 0, SEARCH_REPLACE_WIDTH, SEARCH_REPLACE_HEIGHT), SEARCH_REPLACE_TITLE) +{ + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_search_replace.xml"); +} + +LLFloaterSearchReplace::~LLFloaterSearchReplace() +{ + sInstance = NULL; +} + +void LLFloaterSearchReplace::open() +{ + LLFloater::open(); + + if (mEditor) + { + bool fReadOnly = mEditor->isReadOnly(); + childSetEnabled("replace_label", !fReadOnly); + childSetEnabled("replace_text", !fReadOnly); + childSetEnabled("replace_btn", !fReadOnly); + childSetEnabled("replace_all_btn", !fReadOnly); + } + + childSetFocus("search_text", TRUE); +} + +BOOL LLFloaterSearchReplace::postBuild() +{ + childSetAction("search_btn", onBtnSearch, this); + childSetAction("replace_btn", onBtnReplace, this); + childSetAction("replace_all_btn", onBtnReplaceAll, this); + + setDefaultBtn("search_btn"); + + return TRUE; +} + +void LLFloaterSearchReplace::show(LLTextEditor* editor) +{ + if (!sInstance) + { + sInstance = new LLFloaterSearchReplace(); + } + + if ( (sInstance) && (editor) ) + { + sInstance->mEditor = editor; + + LLFloater* newdependee, *olddependee = sInstance->getDependee(); + LLView* viewp = editor->getParent(); + while (viewp) + { + newdependee = dynamic_cast(viewp); + if (newdependee) + { + if (newdependee != olddependee) + { + if (olddependee) + olddependee->removeDependentFloater(sInstance); + + if (!newdependee->getHost()) + newdependee->addDependentFloater(sInstance); + else + newdependee->getHost()->addDependentFloater(sInstance); + } + break; + } + viewp = viewp->getParent(); + } + + sInstance->open(); + } +} + +void LLFloaterSearchReplace::onBtnSearch(void* userdata) +{ + if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) ) + return; + + LLCheckBoxCtrl* caseChk = sInstance->getChild("case_text"); + sInstance->mEditor->selectNext(sInstance->childGetText("search_text"), caseChk->get()); +} + +void LLFloaterSearchReplace::onBtnReplace(void* userdata) +{ + if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) ) + return; + + LLCheckBoxCtrl* caseChk = sInstance->getChild("case_text"); + sInstance->mEditor->replaceText(sInstance->childGetText("search_text"), sInstance->childGetText("replace_text"), caseChk->get()); +} + +void LLFloaterSearchReplace::onBtnReplaceAll(void* userdata) +{ + if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) ) + return; + + LLCheckBoxCtrl* caseChk = sInstance->getChild("case_text"); + sInstance->mEditor->replaceTextAll(sInstance->childGetText("search_text"), sInstance->childGetText("replace_text"), caseChk->get()); +} diff --git a/linden/indra/newview/llfloatersearchreplace.h b/linden/indra/newview/llfloatersearchreplace.h new file mode 100644 index 0000000..9dcd035 --- /dev/null +++ b/linden/indra/newview/llfloatersearchreplace.h @@ -0,0 +1,32 @@ +#ifndef LL_LLFLOATERSEARCHREPLACE_H +#define LL_LLFLOATERSEARCHREPLACE_H + +#include "llfloater.h" +#include "lltexteditor.h" + +class LLFloaterSearchReplace : public LLFloater +{ +private: + LLFloaterSearchReplace(); + virtual ~LLFloaterSearchReplace(); + +public: + virtual void open(); + virtual BOOL postBuild(); + +public: + static void show(LLTextEditor* editor); + + static void onBtnSearch(void* userdata); + static void onBtnReplace(void* userdata); + static void onBtnReplaceAll(void* userdata); + + static LLFloaterSearchReplace* getInstance() { return sInstance; } + +private: + LLTextEditor* mEditor; + + static LLFloaterSearchReplace* sInstance; +}; + +#endif // LL_LLFLOATERSEARCHREPLACE_H diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp index 6e7c6e3..f679a75 100644 --- a/linden/indra/newview/llpreview.cpp +++ b/linden/indra/newview/llpreview.cpp @@ -47,6 +47,9 @@ #include "llviewerobjectlist.h" #include "lldbstrings.h" #include "llagent.h" +#include "llfloatersearchreplace.h" +#include "llpreviewnotecard.h" +#include "llpreviewscript.h" #include "llvoavatar.h" #include "llselectmgr.h" #include "llinventoryview.h" @@ -576,6 +579,24 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) { opened_preview->loadAsset(); } + + LLFloater* search_floater = LLFloaterSearchReplace::getInstance(); + if ( (search_floater) && (search_floater->getDependee() == this) ) + { + LLPreviewNotecard* notecard_preview; LLPreviewLSL* script_preview; + if ( (notecard_preview = dynamic_cast(opened_preview)) != NULL ) + { + LLFloaterSearchReplace::show(notecard_preview->getEditor()); + } + else if ( (script_preview = dynamic_cast(opened_preview)) != NULL ) + { + LLFloaterSearchReplace::show(script_preview->getEditor()); + } + else + { + search_floater->setVisible(FALSE); + } + } } //static diff --git a/linden/indra/newview/llpreviewnotecard.cpp b/linden/indra/newview/llpreviewnotecard.cpp index 976023f..04f8004 100644 --- a/linden/indra/newview/llpreviewnotecard.cpp +++ b/linden/indra/newview/llpreviewnotecard.cpp @@ -40,6 +40,7 @@ #include "llassetuploadresponders.h" #include "llviewerwindow.h" #include "llbutton.h" +#include "llfloatersearchreplace.h" #include "llinventorymodel.h" #include "lllineeditor.h" #include "llnotify.h" @@ -213,6 +214,12 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) return TRUE; } + if(('F' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) + { + LLFloaterSearchReplace::show(getChild("Notecard Editor")); + return TRUE; + } + return LLPreview::handleKeyHere(key, mask); } @@ -647,4 +654,9 @@ void LLPreviewNotecard::reshape(S32 width, S32 height, BOOL called_from_parent) } } +LLTextEditor* LLPreviewNotecard::getEditor() +{ + return getChild("Notecard Editor"); +} + // EOF diff --git a/linden/indra/newview/llpreviewnotecard.h b/linden/indra/newview/llpreviewnotecard.h index f5cd2bb..6563acd 100644 --- a/linden/indra/newview/llpreviewnotecard.h +++ b/linden/indra/newview/llpreviewnotecard.h @@ -43,6 +43,7 @@ // This class allows us to edit notecards //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLTextEditor; class LLViewerTextEditor; class LLButton; @@ -84,6 +85,7 @@ public: // asset system. :( void refreshFromInventory(); + LLTextEditor* getEditor(); protected: virtual void loadAsset(); diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index 2718c2f..9369a3a 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp @@ -76,6 +76,7 @@ #include "lldir.h" #include "llcombobox.h" //#include "llfloaterchat.h" +#include "llfloatersearchreplace.h" #include "llviewerstats.h" #include "llviewertexteditor.h" #include "llviewerwindow.h" @@ -147,147 +148,6 @@ static bool have_script_upload_cap(LLUUID& object_id) } /// --------------------------------------------------------------------------- -/// LLFloaterScriptSearch -/// --------------------------------------------------------------------------- -class LLFloaterScriptSearch : public LLFloater -{ -public: - LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core); - ~LLFloaterScriptSearch(); - - static void show(LLScriptEdCore* editor_core); - static void onBtnSearch(void* userdata); - void handleBtnSearch(); - - static void onBtnReplace(void* userdata); - void handleBtnReplace(); - - static void onBtnReplaceAll(void* userdata); - void handleBtnReplaceAll(); - - LLScriptEdCore* getEditorCore() { return mEditorCore; } - static LLFloaterScriptSearch* getInstance() { return sInstance; } - - void open(); /*Flawfinder: ignore*/ - -private: - - LLScriptEdCore* mEditorCore; - - static LLFloaterScriptSearch* sInstance; -}; - -LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL; - -LLFloaterScriptSearch::LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core) - : LLFloater("script search",rect,title), mEditorCore(editor_core) -{ - - LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_search.xml"); - - childSetAction("search_btn", onBtnSearch,this); - childSetAction("replace_btn", onBtnReplace,this); - childSetAction("replace_all_btn", onBtnReplaceAll,this); - - setDefaultBtn("search_btn"); - - if (!getHost()) - { - LLRect curRect = getRect(); - translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop); - } - - sInstance = this; - - childSetFocus("search_text", TRUE); - - // find floater in which script panel is embedded - LLView* viewp = (LLView*)editor_core; - while(viewp) - { - LLFloater* floaterp = dynamic_cast(viewp); - if (floaterp) - { - floaterp->addDependentFloater(this); - break; - } - viewp = viewp->getParent(); - } -} - -//static -void LLFloaterScriptSearch::show(LLScriptEdCore* editor_core) -{ - if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core) - { - sInstance->close(); - delete sInstance; - } - - if (!sInstance) - { - S32 left = 0; - S32 top = 0; - gFloaterView->getNewFloaterPosition(&left,&top); - - // sInstance will be assigned in the constructor. - new LLFloaterScriptSearch("Script Search",LLRect(left,top,left + SCRIPT_SEARCH_WIDTH,top - SCRIPT_SEARCH_HEIGHT),editor_core); - } - - sInstance->open(); /*Flawfinder: ignore*/ -} - -LLFloaterScriptSearch::~LLFloaterScriptSearch() -{ - sInstance = NULL; -} - -// static -void LLFloaterScriptSearch::onBtnSearch(void *userdata) -{ - LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata; - self->handleBtnSearch(); -} - -void LLFloaterScriptSearch::handleBtnSearch() -{ - LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->selectNext(childGetText("search_text"), caseChk->get()); -} - -// static -void LLFloaterScriptSearch::onBtnReplace(void *userdata) -{ - LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata; - self->handleBtnReplace(); -} - -void LLFloaterScriptSearch::handleBtnReplace() -{ - LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->replaceText(childGetText("search_text"), childGetText("replace_text"), caseChk->get()); -} - -// static -void LLFloaterScriptSearch::onBtnReplaceAll(void *userdata) -{ - LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata; - self->handleBtnReplaceAll(); -} - -void LLFloaterScriptSearch::handleBtnReplaceAll() -{ - LLCheckBoxCtrl* caseChk = getChild("case_text"); - mEditorCore->mEditor->replaceTextAll(childGetText("search_text"), childGetText("replace_text"), caseChk->get()); -} - -void LLFloaterScriptSearch::open() /*Flawfinder: ignore*/ -{ - LLFloater::open(); /*Flawfinder: ignore*/ - childSetFocus("search_text", TRUE); -} - -/// --------------------------------------------------------------------------- /// LLScriptEdCore /// --------------------------------------------------------------------------- @@ -385,14 +245,6 @@ LLScriptEdCore::LLScriptEdCore( LLScriptEdCore::~LLScriptEdCore() { deleteBridges(); - - // If the search window is up for this editor, close it. - LLFloaterScriptSearch* script_search = LLFloaterScriptSearch::getInstance(); - if (script_search && script_search->getEditorCore() == this) - { - script_search->close(); - delete script_search; - } } void LLScriptEdCore::initMenu() @@ -931,7 +783,10 @@ void LLScriptEdCore::onBtnLoadFromDisc( void* data ) void LLScriptEdCore::onSearchMenu(void* userdata) { LLScriptEdCore* sec = (LLScriptEdCore*)userdata; - LLFloaterScriptSearch::show(sec); + if ( (sec) && (sec->mEditor) ) + { + LLFloaterSearchReplace::show(sec->mEditor); + } } // static @@ -1335,7 +1190,10 @@ void LLPreviewLSL::onSearchReplace(void* userdata) { LLPreviewLSL* self = (LLPreviewLSL*)userdata; LLScriptEdCore* sec = self->mScriptEd; - LLFloaterScriptSearch::show(sec); + if ( (sec) && (sec->mEditor) ) + { + LLFloaterSearchReplace::show(sec->mEditor); + } } // static @@ -2155,7 +2013,10 @@ void LLLiveLSLEditor::onSearchReplace(void* userdata) LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; LLScriptEdCore* sec = self->mScriptEd; - LLFloaterScriptSearch::show(sec); + if ( (sec) && (sec->mEditor) ) + { + LLFloaterSearchReplace::show(sec->mEditor); + } } struct LLLiveLSLSaveData diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h index fc9ba4b..0d5c300 100644 --- a/linden/indra/newview/llpreviewscript.h +++ b/linden/indra/newview/llpreviewscript.h @@ -50,7 +50,6 @@ class LLScrollListCtrl; class LLViewerObject; struct LLEntryAndEdCore; class LLMenuBarGL; -class LLFloaterScriptSearch; class LLKeywordToken; // Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these. @@ -59,7 +58,6 @@ class LLScriptEdCore : public LLPanel friend class LLPreviewScript; friend class LLPreviewLSL; friend class LLLiveLSLEditor; - friend class LLFloaterScriptSearch; public: LLScriptEdCore( @@ -196,6 +194,7 @@ protected: static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); public: static LLPreviewLSL* getInstance(const LLUUID& uuid); + LLTextEditor* getEditor() { return mScriptEd->mEditor; } protected: static void* createScriptEdPanel(void* userdata); diff --git a/linden/indra/newview/skins/default/xui/da/floater_script_search.xml b/linden/indra/newview/skins/default/xui/da/floater_script_search.xml index 9f51d3b..e69de29 100644 --- a/linden/indra/newview/skins/default/xui/da/floater_script_search.xml +++ b/linden/indra/newview/skins/default/xui/da/floater_script_search.xml @@ -1,13 +0,0 @@ - - - -