aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-03-04 13:16:28 -0700
committerJacek Antonelli2010-03-11 19:03:52 -0600
commit1ddfb4c5dd436fc1a9a867d0a2b9980483a3d3fd (patch)
tree4ce9ece8150a60ab7292bd6cef3ff3c0dfcc4025 /linden/indra
parentApplied UnknownJointsCrashFix v2 from Cool Viewer. (diff)
downloadmeta-impy-1ddfb4c5dd436fc1a9a867d0a2b9980483a3d3fd.zip
meta-impy-1ddfb4c5dd436fc1a9a867d0a2b9980483a3d3fd.tar.gz
meta-impy-1ddfb4c5dd436fc1a9a867d0a2b9980483a3d3fd.tar.bz2
meta-impy-1ddfb4c5dd436fc1a9a867d0a2b9980483a3d3fd.tar.xz
Applied Kitty Barnett's patch for Search/Replace in notecards.
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llui/lltexteditor.cpp72
-rw-r--r--linden/indra/llui/lltexteditor.h2
-rw-r--r--linden/indra/newview/CMakeLists.txt2
-rw-r--r--linden/indra/newview/llfloatersearchreplace.cpp114
-rw-r--r--linden/indra/newview/llfloatersearchreplace.h32
-rw-r--r--linden/indra/newview/llpreview.cpp21
-rw-r--r--linden/indra/newview/llpreviewnotecard.cpp12
-rw-r--r--linden/indra/newview/llpreviewnotecard.h2
-rw-r--r--linden/indra/newview/llpreviewscript.cpp165
-rw-r--r--linden/indra/newview/llpreviewscript.h3
-rw-r--r--linden/indra/newview/skins/default/xui/da/floater_script_search.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/da/floater_search_replace.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/de/floater_script_search.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/de/floater_search_replace.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_script_search.xml40
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_search_replace.xml40
-rw-r--r--linden/indra/newview/skins/default/xui/es/floater_script_search.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/es/floater_search_replace.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/fr/floater_script_search.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/fr/floater_search_replace.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/hu/floater_script_search.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/hu/floater_search_replace.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/it/floater_script_search.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/it/floater_search_replace.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/ja/floater_script_search.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/ja/floater_search_replace.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/ko/floater_script_search.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/ko/floater_search_replace.xml13
-rwxr-xr-xlinden/indra/newview/skins/default/xui/pl/floater_script_search.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/pl/floater_search_replace.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/pt/floater_script_search.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/pt/floater_search_replace.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/ru/floater_script_search.xml16
-rw-r--r--linden/indra/newview/skins/default/xui/ru/floater_search_replace.xml16
-rw-r--r--linden/indra/newview/skins/default/xui/tr/floater_script_search.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/tr/floater_search_replace.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/uk/floater_script_search.xml16
-rw-r--r--linden/indra/newview/skins/default/xui/uk/floater_search_replace.xml16
-rw-r--r--linden/indra/newview/skins/default/xui/zh/floater_script_search.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/zh/floater_search_replace.xml13
40 files changed, 477 insertions, 426 deletions
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
648 } 648 }
649 649
650 setCursorPos(loc); 650 setCursorPos(loc);
651 scrollToPos(mCursorPos);
651 652
652 mIsSelecting = TRUE; 653 mIsSelecting = TRUE;
653 mSelectionEnd = mCursorPos; 654 mSelectionEnd = mCursorPos;
@@ -3413,6 +3414,43 @@ void LLTextEditor::setCursorAndScrollToEnd()
3413 needsScroll(); 3414 needsScroll();
3414} 3415}
3415 3416
3417void LLTextEditor::scrollToPos(S32 pos)
3418{
3419 mScrollbar->setDocSize( getLineCount() );
3420
3421 S32 line, offset;
3422 getLineAndOffset(pos, &line, &offset );
3423
3424 S32 page_size = mScrollbar->getPageSize();
3425
3426 if( line < mScrollbar->getDocPos() )
3427 {
3428 // scroll so that the cursor is at the top of the page
3429 mScrollbar->setDocPos( line );
3430 }
3431 else if( line >= mScrollbar->getDocPos() + page_size - 1 )
3432 {
3433 S32 new_pos = 0;
3434 if( line < mScrollbar->getDocSize() - 1 )
3435 {
3436 // scroll so that the cursor is one line above the bottom of the page,
3437 new_pos = line - page_size + 1;
3438 }
3439 else
3440 {
3441 // if there is less than a page of text remaining, scroll so that the cursor is at the bottom
3442 new_pos = mScrollbar->getDocPosMax();
3443 }
3444 mScrollbar->setDocPos( new_pos );
3445 }
3446
3447 // Check if we've scrolled to bottom for callback if asked for callback
3448 if (mOnScrollEndCallback && mOnScrollEndData && (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()))
3449 {
3450 mOnScrollEndCallback(mOnScrollEndData);
3451 }
3452}
3453
3416void LLTextEditor::getLineAndColumnForPosition( S32 position, S32* line, S32* col, BOOL include_wordwrap ) 3454void LLTextEditor::getLineAndColumnForPosition( S32 position, S32* line, S32* col, BOOL include_wordwrap )
3417{ 3455{
3418 if( include_wordwrap ) 3456 if( include_wordwrap )
@@ -3490,45 +3528,13 @@ void LLTextEditor::endOfDoc()
3490// Sets the scrollbar from the cursor position 3528// Sets the scrollbar from the cursor position
3491void LLTextEditor::updateScrollFromCursor() 3529void LLTextEditor::updateScrollFromCursor()
3492{ 3530{
3493 mScrollbar->setDocSize( getLineCount() );
3494
3495 if (mReadOnly) 3531 if (mReadOnly)
3496 { 3532 {
3497 // no cursor in read only mode 3533 // no cursor in read only mode
3498 return; 3534 return;
3499 } 3535 }
3500 3536
3501 S32 line, offset; 3537 scrollToPos(mCursorPos);
3502 getLineAndOffset( mCursorPos, &line, &offset );
3503
3504 S32 page_size = mScrollbar->getPageSize();
3505
3506 if( line < mScrollbar->getDocPos() )
3507 {
3508 // scroll so that the cursor is at the top of the page
3509 mScrollbar->setDocPos( line );
3510 }
3511 else if( line >= mScrollbar->getDocPos() + page_size - 1 )
3512 {
3513 S32 new_pos = 0;
3514 if( line < mScrollbar->getDocSize() - 1 )
3515 {
3516 // scroll so that the cursor is one line above the bottom of the page,
3517 new_pos = line - page_size + 1;
3518 }
3519 else
3520 {
3521 // if there is less than a page of text remaining, scroll so that the cursor is at the bottom
3522 new_pos = mScrollbar->getDocPosMax();
3523 }
3524 mScrollbar->setDocPos( new_pos );
3525 }
3526
3527 // Check if we've scrolled to bottom for callback if asked for callback
3528 if (mOnScrollEndCallback && mOnScrollEndData && (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()))
3529 {
3530 mOnScrollEndCallback(mOnScrollEndData);
3531 }
3532} 3538}
3533 3539
3534void LLTextEditor::reshape(S32 width, S32 height, BOOL called_from_parent) 3540void 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:
171 void setCursor(S32 row, S32 column); 171 void setCursor(S32 row, S32 column);
172 void setCursorPos(S32 offset); 172 void setCursorPos(S32 offset);
173 void setCursorAndScrollToEnd(); 173 void setCursorAndScrollToEnd();
174 void scrollToPos(S32 pos);
174 175
175 void getLineAndColumnForPosition( S32 position, S32* line, S32* col, BOOL include_wordwrap ); 176 void getLineAndColumnForPosition( S32 position, S32* line, S32* col, BOOL include_wordwrap );
176 void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ); 177 void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap );
@@ -263,6 +264,7 @@ public:
263 264
264 static bool isPartOfWord(llwchar c) { return (c == '_') || LLStringOps::isAlnum((char)c); } 265 static bool isPartOfWord(llwchar c) { return (c == '_') || LLStringOps::isAlnum((char)c); }
265 266
267 BOOL isReadOnly() { return mReadOnly; }
266protected: 268protected:
267 // 269 //
268 // Methods 270 // 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
195 llfloaterregioninfo.cpp 195 llfloaterregioninfo.cpp
196 llfloaterreporter.cpp 196 llfloaterreporter.cpp
197 llfloaterscriptdebug.cpp 197 llfloaterscriptdebug.cpp
198 llfloatersearchreplace.cpp
198 llfloatersellland.cpp 199 llfloatersellland.cpp
199 llfloatersettingsdebug.cpp 200 llfloatersettingsdebug.cpp
200 llfloatersnapshot.cpp 201 llfloatersnapshot.cpp
@@ -617,6 +618,7 @@ set(viewer_HEADER_FILES
617 llfloaterproperties.h 618 llfloaterproperties.h
618 llfloaterregioninfo.h 619 llfloaterregioninfo.h
619 llfloaterreporter.h 620 llfloaterreporter.h
621 llfloatersearchreplace.h
620 llfloaterscriptdebug.h 622 llfloaterscriptdebug.h
621 llfloatersellland.h 623 llfloatersellland.h
622 llfloatersettingsdebug.h 624 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 @@
1#include "llviewerprecompiledheaders.h"
2#include "llcheckboxctrl.h"
3#include "llfocusmgr.h"
4#include "lluictrlfactory.h"
5
6#include "llfloatersearchreplace.h"
7
8const S32 SEARCH_REPLACE_WIDTH = 300;
9const S32 SEARCH_REPLACE_HEIGHT = 120;
10const std::string SEARCH_REPLACE_TITLE = "Search and Replace";
11
12LLFloaterSearchReplace* LLFloaterSearchReplace::sInstance = NULL;
13
14LLFloaterSearchReplace::LLFloaterSearchReplace() : mEditor(NULL),
15 LLFloater(std::string("searchreplace"), LLRect(0, 0, SEARCH_REPLACE_WIDTH, SEARCH_REPLACE_HEIGHT), SEARCH_REPLACE_TITLE)
16{
17 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_search_replace.xml");
18}
19
20LLFloaterSearchReplace::~LLFloaterSearchReplace()
21{
22 sInstance = NULL;
23}
24
25void LLFloaterSearchReplace::open()
26{
27 LLFloater::open();
28
29 if (mEditor)
30 {
31 bool fReadOnly = mEditor->isReadOnly();
32 childSetEnabled("replace_label", !fReadOnly);
33 childSetEnabled("replace_text", !fReadOnly);
34 childSetEnabled("replace_btn", !fReadOnly);
35 childSetEnabled("replace_all_btn", !fReadOnly);
36 }
37
38 childSetFocus("search_text", TRUE);
39}
40
41BOOL LLFloaterSearchReplace::postBuild()
42{
43 childSetAction("search_btn", onBtnSearch, this);
44 childSetAction("replace_btn", onBtnReplace, this);
45 childSetAction("replace_all_btn", onBtnReplaceAll, this);
46
47 setDefaultBtn("search_btn");
48
49 return TRUE;
50}
51
52void LLFloaterSearchReplace::show(LLTextEditor* editor)
53{
54 if (!sInstance)
55 {
56 sInstance = new LLFloaterSearchReplace();
57 }
58
59 if ( (sInstance) && (editor) )
60 {
61 sInstance->mEditor = editor;
62
63 LLFloater* newdependee, *olddependee = sInstance->getDependee();
64 LLView* viewp = editor->getParent();
65 while (viewp)
66 {
67 newdependee = dynamic_cast<LLFloater*>(viewp);
68 if (newdependee)
69 {
70 if (newdependee != olddependee)
71 {
72 if (olddependee)
73 olddependee->removeDependentFloater(sInstance);
74
75 if (!newdependee->getHost())
76 newdependee->addDependentFloater(sInstance);
77 else
78 newdependee->getHost()->addDependentFloater(sInstance);
79 }
80 break;
81 }
82 viewp = viewp->getParent();
83 }
84
85 sInstance->open();
86 }
87}
88
89void LLFloaterSearchReplace::onBtnSearch(void* userdata)
90{
91 if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) )
92 return;
93
94 LLCheckBoxCtrl* caseChk = sInstance->getChild<LLCheckBoxCtrl>("case_text");
95 sInstance->mEditor->selectNext(sInstance->childGetText("search_text"), caseChk->get());
96}
97
98void LLFloaterSearchReplace::onBtnReplace(void* userdata)
99{
100 if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) )
101 return;
102
103 LLCheckBoxCtrl* caseChk = sInstance->getChild<LLCheckBoxCtrl>("case_text");
104 sInstance->mEditor->replaceText(sInstance->childGetText("search_text"), sInstance->childGetText("replace_text"), caseChk->get());
105}
106
107void LLFloaterSearchReplace::onBtnReplaceAll(void* userdata)
108{
109 if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) )
110 return;
111
112 LLCheckBoxCtrl* caseChk = sInstance->getChild<LLCheckBoxCtrl>("case_text");
113 sInstance->mEditor->replaceTextAll(sInstance->childGetText("search_text"), sInstance->childGetText("replace_text"), caseChk->get());
114}
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 @@
1#ifndef LL_LLFLOATERSEARCHREPLACE_H
2#define LL_LLFLOATERSEARCHREPLACE_H
3
4#include "llfloater.h"
5#include "lltexteditor.h"
6
7class LLFloaterSearchReplace : public LLFloater
8{
9private:
10 LLFloaterSearchReplace();
11 virtual ~LLFloaterSearchReplace();
12
13public:
14 virtual void open();
15 virtual BOOL postBuild();
16
17public:
18 static void show(LLTextEditor* editor);
19
20 static void onBtnSearch(void* userdata);
21 static void onBtnReplace(void* userdata);
22 static void onBtnReplaceAll(void* userdata);
23
24 static LLFloaterSearchReplace* getInstance() { return sInstance; }
25
26private:
27 LLTextEditor* mEditor;
28
29 static LLFloaterSearchReplace* sInstance;
30};
31
32#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 @@
47#include "llviewerobjectlist.h" 47#include "llviewerobjectlist.h"
48#include "lldbstrings.h" 48#include "lldbstrings.h"
49#include "llagent.h" 49#include "llagent.h"
50#include "llfloatersearchreplace.h"
51#include "llpreviewnotecard.h"
52#include "llpreviewscript.h"
50#include "llvoavatar.h" 53#include "llvoavatar.h"
51#include "llselectmgr.h" 54#include "llselectmgr.h"
52#include "llinventoryview.h" 55#include "llinventoryview.h"
@@ -576,6 +579,24 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click)
576 { 579 {
577 opened_preview->loadAsset(); 580 opened_preview->loadAsset();
578 } 581 }
582
583 LLFloater* search_floater = LLFloaterSearchReplace::getInstance();
584 if ( (search_floater) && (search_floater->getDependee() == this) )
585 {
586 LLPreviewNotecard* notecard_preview; LLPreviewLSL* script_preview;
587 if ( (notecard_preview = dynamic_cast<LLPreviewNotecard*>(opened_preview)) != NULL )
588 {
589 LLFloaterSearchReplace::show(notecard_preview->getEditor());
590 }
591 else if ( (script_preview = dynamic_cast<LLPreviewLSL*>(opened_preview)) != NULL )
592 {
593 LLFloaterSearchReplace::show(script_preview->getEditor());
594 }
595 else
596 {
597 search_floater->setVisible(FALSE);
598 }
599 }
579} 600}
580 601
581//static 602//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 @@
40#include "llassetuploadresponders.h" 40#include "llassetuploadresponders.h"
41#include "llviewerwindow.h" 41#include "llviewerwindow.h"
42#include "llbutton.h" 42#include "llbutton.h"
43#include "llfloatersearchreplace.h"
43#include "llinventorymodel.h" 44#include "llinventorymodel.h"
44#include "lllineeditor.h" 45#include "lllineeditor.h"
45#include "llnotify.h" 46#include "llnotify.h"
@@ -213,6 +214,12 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
213 return TRUE; 214 return TRUE;
214 } 215 }
215 216
217 if(('F' == key) && (MASK_CONTROL == (mask & MASK_CONTROL)))
218 {
219 LLFloaterSearchReplace::show(getChild<LLViewerTextEditor>("Notecard Editor"));
220 return TRUE;
221 }
222
216 return LLPreview::handleKeyHere(key, mask); 223 return LLPreview::handleKeyHere(key, mask);
217} 224}
218 225
@@ -647,4 +654,9 @@ void LLPreviewNotecard::reshape(S32 width, S32 height, BOOL called_from_parent)
647 } 654 }
648} 655}
649 656
657LLTextEditor* LLPreviewNotecard::getEditor()
658{
659 return getChild<LLViewerTextEditor>("Notecard Editor");
660}
661
650// EOF 662// 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 @@
43// This class allows us to edit notecards 43// This class allows us to edit notecards
44//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 44//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45 45
46class LLTextEditor;
46class LLViewerTextEditor; 47class LLViewerTextEditor;
47class LLButton; 48class LLButton;
48 49
@@ -84,6 +85,7 @@ public:
84 // asset system. :( 85 // asset system. :(
85 void refreshFromInventory(); 86 void refreshFromInventory();
86 87
88 LLTextEditor* getEditor();
87protected: 89protected:
88 90
89 virtual void loadAsset(); 91 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 @@
76#include "lldir.h" 76#include "lldir.h"
77#include "llcombobox.h" 77#include "llcombobox.h"
78//#include "llfloaterchat.h" 78//#include "llfloaterchat.h"
79#include "llfloatersearchreplace.h"
79#include "llviewerstats.h" 80#include "llviewerstats.h"
80#include "llviewertexteditor.h" 81#include "llviewertexteditor.h"
81#include "llviewerwindow.h" 82#include "llviewerwindow.h"
@@ -147,147 +148,6 @@ static bool have_script_upload_cap(LLUUID& object_id)
147} 148}
148 149
149/// --------------------------------------------------------------------------- 150/// ---------------------------------------------------------------------------
150/// LLFloaterScriptSearch
151/// ---------------------------------------------------------------------------
152class LLFloaterScriptSearch : public LLFloater
153{
154public:
155 LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core);
156 ~LLFloaterScriptSearch();
157
158 static void show(LLScriptEdCore* editor_core);
159 static void onBtnSearch(void* userdata);
160 void handleBtnSearch();
161
162 static void onBtnReplace(void* userdata);
163 void handleBtnReplace();
164
165 static void onBtnReplaceAll(void* userdata);
166 void handleBtnReplaceAll();
167
168 LLScriptEdCore* getEditorCore() { return mEditorCore; }
169 static LLFloaterScriptSearch* getInstance() { return sInstance; }
170
171 void open(); /*Flawfinder: ignore*/
172
173private:
174
175 LLScriptEdCore* mEditorCore;
176
177 static LLFloaterScriptSearch* sInstance;
178};
179
180LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL;
181
182LLFloaterScriptSearch::LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core)
183 : LLFloater("script search",rect,title), mEditorCore(editor_core)
184{
185
186 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_search.xml");
187
188 childSetAction("search_btn", onBtnSearch,this);
189 childSetAction("replace_btn", onBtnReplace,this);
190 childSetAction("replace_all_btn", onBtnReplaceAll,this);
191
192 setDefaultBtn("search_btn");
193
194 if (!getHost())
195 {
196 LLRect curRect = getRect();
197 translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
198 }
199
200 sInstance = this;
201
202 childSetFocus("search_text", TRUE);
203
204 // find floater in which script panel is embedded
205 LLView* viewp = (LLView*)editor_core;
206 while(viewp)
207 {
208 LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
209 if (floaterp)
210 {
211 floaterp->addDependentFloater(this);
212 break;
213 }
214 viewp = viewp->getParent();
215 }
216}
217
218//static
219void LLFloaterScriptSearch::show(LLScriptEdCore* editor_core)
220{
221 if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core)
222 {
223 sInstance->close();
224 delete sInstance;
225 }
226
227 if (!sInstance)
228 {
229 S32 left = 0;
230 S32 top = 0;
231 gFloaterView->getNewFloaterPosition(&left,&top);
232
233 // sInstance will be assigned in the constructor.
234 new LLFloaterScriptSearch("Script Search",LLRect(left,top,left + SCRIPT_SEARCH_WIDTH,top - SCRIPT_SEARCH_HEIGHT),editor_core);
235 }
236
237 sInstance->open(); /*Flawfinder: ignore*/
238}
239
240LLFloaterScriptSearch::~LLFloaterScriptSearch()
241{
242 sInstance = NULL;
243}
244
245// static
246void LLFloaterScriptSearch::onBtnSearch(void *userdata)
247{
248 LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata;
249 self->handleBtnSearch();
250}
251
252void LLFloaterScriptSearch::handleBtnSearch()
253{
254 LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
255 mEditorCore->mEditor->selectNext(childGetText("search_text"), caseChk->get());
256}
257
258// static
259void LLFloaterScriptSearch::onBtnReplace(void *userdata)
260{
261 LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata;
262 self->handleBtnReplace();
263}
264
265void LLFloaterScriptSearch::handleBtnReplace()
266{
267 LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
268 mEditorCore->mEditor->replaceText(childGetText("search_text"), childGetText("replace_text"), caseChk->get());
269}
270
271// static
272void LLFloaterScriptSearch::onBtnReplaceAll(void *userdata)
273{
274 LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata;
275 self->handleBtnReplaceAll();
276}
277
278void LLFloaterScriptSearch::handleBtnReplaceAll()
279{
280 LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
281 mEditorCore->mEditor->replaceTextAll(childGetText("search_text"), childGetText("replace_text"), caseChk->get());
282}
283
284void LLFloaterScriptSearch::open() /*Flawfinder: ignore*/
285{
286 LLFloater::open(); /*Flawfinder: ignore*/
287 childSetFocus("search_text", TRUE);
288}
289
290/// ---------------------------------------------------------------------------
291/// LLScriptEdCore 151/// LLScriptEdCore
292/// --------------------------------------------------------------------------- 152/// ---------------------------------------------------------------------------
293 153
@@ -385,14 +245,6 @@ LLScriptEdCore::LLScriptEdCore(
385LLScriptEdCore::~LLScriptEdCore() 245LLScriptEdCore::~LLScriptEdCore()
386{ 246{
387 deleteBridges(); 247 deleteBridges();
388
389 // If the search window is up for this editor, close it.
390 LLFloaterScriptSearch* script_search = LLFloaterScriptSearch::getInstance();
391 if (script_search && script_search->getEditorCore() == this)
392 {
393 script_search->close();
394 delete script_search;
395 }
396} 248}
397 249
398void LLScriptEdCore::initMenu() 250void LLScriptEdCore::initMenu()
@@ -931,7 +783,10 @@ void LLScriptEdCore::onBtnLoadFromDisc( void* data )
931void LLScriptEdCore::onSearchMenu(void* userdata) 783void LLScriptEdCore::onSearchMenu(void* userdata)
932{ 784{
933 LLScriptEdCore* sec = (LLScriptEdCore*)userdata; 785 LLScriptEdCore* sec = (LLScriptEdCore*)userdata;
934 LLFloaterScriptSearch::show(sec); 786 if ( (sec) && (sec->mEditor) )
787 {
788 LLFloaterSearchReplace::show(sec->mEditor);
789 }
935} 790}
936 791
937// static 792// static
@@ -1335,7 +1190,10 @@ void LLPreviewLSL::onSearchReplace(void* userdata)
1335{ 1190{
1336 LLPreviewLSL* self = (LLPreviewLSL*)userdata; 1191 LLPreviewLSL* self = (LLPreviewLSL*)userdata;
1337 LLScriptEdCore* sec = self->mScriptEd; 1192 LLScriptEdCore* sec = self->mScriptEd;
1338 LLFloaterScriptSearch::show(sec); 1193 if ( (sec) && (sec->mEditor) )
1194 {
1195 LLFloaterSearchReplace::show(sec->mEditor);
1196 }
1339} 1197}
1340 1198
1341// static 1199// static
@@ -2155,7 +2013,10 @@ void LLLiveLSLEditor::onSearchReplace(void* userdata)
2155 LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; 2013 LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
2156 2014
2157 LLScriptEdCore* sec = self->mScriptEd; 2015 LLScriptEdCore* sec = self->mScriptEd;
2158 LLFloaterScriptSearch::show(sec); 2016 if ( (sec) && (sec->mEditor) )
2017 {
2018 LLFloaterSearchReplace::show(sec->mEditor);
2019 }
2159} 2020}
2160 2021
2161struct LLLiveLSLSaveData 2022struct 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;
50class LLViewerObject; 50class LLViewerObject;
51struct LLEntryAndEdCore; 51struct LLEntryAndEdCore;
52class LLMenuBarGL; 52class LLMenuBarGL;
53class LLFloaterScriptSearch;
54class LLKeywordToken; 53class LLKeywordToken;
55 54
56// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these. 55// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these.
@@ -59,7 +58,6 @@ class LLScriptEdCore : public LLPanel
59 friend class LLPreviewScript; 58 friend class LLPreviewScript;
60 friend class LLPreviewLSL; 59 friend class LLPreviewLSL;
61 friend class LLLiveLSLEditor; 60 friend class LLLiveLSLEditor;
62 friend class LLFloaterScriptSearch;
63 61
64public: 62public:
65 LLScriptEdCore( 63 LLScriptEdCore(
@@ -196,6 +194,7 @@ protected:
196 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); 194 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
197public: 195public:
198 static LLPreviewLSL* getInstance(const LLUUID& uuid); 196 static LLPreviewLSL* getInstance(const LLUUID& uuid);
197 LLTextEditor* getEditor() { return mScriptEd->mEditor; }
199protected: 198protected:
200 static void* createScriptEdPanel(void* userdata); 199 static void* createScriptEdPanel(void* userdata);
201 200
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 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Script søgning">
3 <check_box label="Store/små bogstaver har ingen betydning" name="case_text" />
4 <button label="Søg" label_selected="Søg" name="search_btn" />
5 <button label="Erstat" label_selected="Erstat" name="replace_btn" />
6 <button label="Erstat alle" label_selected="Erstat alle" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 Søg
9 </text>
10 <text type="string" length="1" name="txt2">
11 Erstat
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/da/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/da/floater_search_replace.xml
new file mode 100644
index 0000000..8291f39
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/da/floater_search_replace.xml
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Søg / Erstat">
3 <check_box label="Store/små bogstaver har ingen betydning" name="case_text" />
4 <button label="Søg" label_selected="Søg" name="search_btn" />
5 <button label="Erstat" label_selected="Erstat" name="replace_btn" />
6 <button label="Erstat alle" label_selected="Erstat alle" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 Søg
9 </text>
10 <text type="string" length="1" name="txt2">
11 Erstat
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/de/floater_script_search.xml b/linden/indra/newview/skins/default/xui/de/floater_script_search.xml
index 54045ed..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/de/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/de/floater_script_search.xml
@@ -1,13 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Skriptsuche">
3 <check_box label="Groß-/Kleinschreibung irrelevant" name="case_text" />
4 <button label="Suchen" label_selected="Suchen" name="search_btn" />
5 <button label="Ersetzen" label_selected="Ersetzen" name="replace_btn" />
6 <button label="Alle ersetzen" label_selected="Alle ersetzen" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 Suchen
9 </text>
10 <text type="string" length="1" name="txt2">
11 Ersetzen
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/de/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/de/floater_search_replace.xml
new file mode 100644
index 0000000..30e83b9
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/de/floater_search_replace.xml
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Suchen / Ersetzen">
3 <check_box label="Groß-/Kleinschreibung irrelevant" name="case_text" />
4 <button label="Suchen" label_selected="Suchen" name="search_btn" />
5 <button label="Ersetzen" label_selected="Ersetzen" name="replace_btn" />
6 <button label="Alle ersetzen" label_selected="Alle ersetzen" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 Suchen
9 </text>
10 <text type="string" length="1" name="txt2">
11 Ersetzen
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_script_search.xml b/linden/indra/newview/skins/default/xui/en-us/floater_script_search.xml
index d8e6cb5..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_script_search.xml
@@ -1,40 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-423" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" can_tear_off="true" enabled="true" height="120"
4 left="223" min_height="100" min_width="100" mouse_opaque="true"
5 name="script search" title="Script Search" width="300">
6 <check_box bottom="-77" control_name="LSLFindCaseInsensitivity" enabled="true" follows="left|top" font="SansSerifSmall"
7 height="16" initial_value="false" label="Case Insensitive" left="55"
8 mouse_opaque="true" name="case_text" radio_style="false" width="240" />
9 <button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
10 label="Search" label_selected="Search" left="10" mouse_opaque="true"
11 name="search_btn" scale_image="true" width="90" />
12 <button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
13 label="Replace" label_selected="Replace" left="105" mouse_opaque="true"
14 name="replace_btn" scale_image="true" width="90" />
15 <button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
16 label="Replace All" label_selected="Replace All" left="200"
17 mouse_opaque="true" name="replace_all_btn" scale_image="true" width="90" />
18 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
19 bottom="-37" drop_shadow_visible="true" enabled="true" follows="left|top"
20 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="5"
21 mouse_opaque="true" name="txt" v_pad="0" width="45">
22 Search
23 </text>
24 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
25 bottom="-58" drop_shadow_visible="true" enabled="true" follows="left|top"
26 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="5"
27 mouse_opaque="true" name="txt2" v_pad="0" width="45">
28 Replace
29 </text>
30 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-37"
31 enabled="true" follows="left|top" font="SansSerifSmall"
32 handle_edit_keys_directly="false" height="16" left="55" max_length="254"
33 mouse_opaque="true" name="search_text" select_all_on_focus_received="false"
34 select_on_focus="false" width="240" />
35 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-58"
36 enabled="true" follows="left|top" font="SansSerifSmall"
37 handle_edit_keys_directly="false" height="16" left="55" max_length="254"
38 mouse_opaque="true" name="replace_text"
39 select_all_on_focus_received="false" select_on_focus="false" width="240" />
40</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/en-us/floater_search_replace.xml
new file mode 100644
index 0000000..930cf37
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_search_replace.xml
@@ -0,0 +1,40 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-423" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" can_tear_off="true" enabled="true" height="120"
4 left="223" min_height="100" min_width="100" mouse_opaque="true"
5 name="script search" title="Search / Replace" width="300">
6 <check_box bottom="-77" control_name="LSLFindCaseInsensitivity" enabled="true" follows="left|top" font="SansSerifSmall"
7 height="16" initial_value="false" label="Case Insensitive" left="55"
8 mouse_opaque="true" name="case_text" radio_style="false" width="240" />
9 <button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
10 label="Search" label_selected="Search" left="10" mouse_opaque="true"
11 name="search_btn" scale_image="true" width="90" />
12 <button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
13 label="Replace" label_selected="Replace" left="105" mouse_opaque="true"
14 name="replace_btn" scale_image="true" width="90" />
15 <button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
16 label="Replace All" label_selected="Replace All" left="200"
17 mouse_opaque="true" name="replace_all_btn" scale_image="true" width="90" />
18 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
19 bottom="-37" drop_shadow_visible="true" enabled="true" follows="left|top"
20 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="5"
21 mouse_opaque="true" name="search_label" v_pad="0" width="45">
22 Search
23 </text>
24 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
25 bottom="-58" drop_shadow_visible="true" enabled="true" follows="left|top"
26 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="5"
27 mouse_opaque="true" name="replace_label" v_pad="0" width="45">
28 Replace
29 </text>
30 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-37"
31 enabled="true" follows="left|top" font="SansSerifSmall"
32 handle_edit_keys_directly="false" height="16" left="55" max_length="254"
33 mouse_opaque="true" name="search_text" select_all_on_focus_received="false"
34 select_on_focus="false" width="240" />
35 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-58"
36 enabled="true" follows="left|top" font="SansSerifSmall"
37 handle_edit_keys_directly="false" height="16" left="55" max_length="254"
38 mouse_opaque="true" name="replace_text"
39 select_all_on_focus_received="false" select_on_focus="false" width="240" />
40</floater>
diff --git a/linden/indra/newview/skins/default/xui/es/floater_script_search.xml b/linden/indra/newview/skins/default/xui/es/floater_script_search.xml
index b5fd403..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/es/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/es/floater_script_search.xml
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="script search" title="Buscar en el script" width="320">
3 <check_box label="Indiferente mays./mins." name="case_text" left="75"/>
4 <button label="Buscar" label_selected="Buscar" name="search_btn" width="85"/>
5 <button label="Reemplazar" label_selected="Reemplazar" name="replace_btn" left="100" width="85"/>
6 <button label="Reemplazar todos" label_selected="Reemplazar todos" name="replace_all_btn" left="190" width="122"/>
7 <text length="1" name="txt" type="string" width="65">
8 Buscar
9 </text>
10 <text length="1" name="txt2" type="string" width="65">
11 Reemplazar
12 </text>
13 <line_editor left="75" name="search_text" width="240" />
14 <line_editor left="75" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/es/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/es/floater_search_replace.xml
new file mode 100644
index 0000000..83bf327
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/es/floater_search_replace.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="script search" title="Buscar / Reemplazar" width="320">
3 <check_box label="Indiferente mays./mins." name="case_text" left="75"/>
4 <button label="Buscar" label_selected="Buscar" name="search_btn" width="85"/>
5 <button label="Reemplazar" label_selected="Reemplazar" name="replace_btn" left="100" width="85"/>
6 <button label="Reemplazar todos" label_selected="Reemplazar todos" name="replace_all_btn" left="190" width="122"/>
7 <text length="1" name="txt" type="string" width="65">
8 Buscar
9 </text>
10 <text length="1" name="txt2" type="string" width="65">
11 Reemplazar
12 </text>
13 <line_editor left="75" name="search_text" width="240" />
14 <line_editor left="75" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/fr/floater_script_search.xml b/linden/indra/newview/skins/default/xui/fr/floater_script_search.xml
index abc1e79..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/fr/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/fr/floater_script_search.xml
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Recherche de scripts" width="320">
3 <check_box label="Non sensible à la casse" name="case_text" left="75"/>
4 <button label="Rechercher" label_selected="Rechercher" name="search_btn" width="96"/>
5 <button label="Remplacer" label_selected="Remplacer" name="replace_btn" left="111" width="96"/>
6 <button label="Tout remplacer" label_selected="Tout remplacer" name="replace_all_btn" left="212" width="96"/>
7 <text type="string" length="1" name="txt" width="65">
8 Rechercher
9 </text>
10 <text type="string" length="1" name="txt2" width="65">
11 Remplacer
12 </text>
13 <line_editor left="75" name="search_text" width="240" />
14 <line_editor left="75" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/fr/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/fr/floater_search_replace.xml
new file mode 100644
index 0000000..03df021
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/fr/floater_search_replace.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Rechercher/Remplacer" width="320">
3 <check_box label="Non sensible à la casse" name="case_text" left="75"/>
4 <button label="Rechercher" label_selected="Rechercher" name="search_btn" width="96"/>
5 <button label="Remplacer" label_selected="Remplacer" name="replace_btn" left="111" width="96"/>
6 <button label="Tout remplacer" label_selected="Tout remplacer" name="replace_all_btn" left="212" width="96"/>
7 <text type="string" length="1" name="txt" width="65">
8 Rechercher
9 </text>
10 <text type="string" length="1" name="txt2" width="65">
11 Remplacer
12 </text>
13 <line_editor left="75" name="search_text" width="240" />
14 <line_editor left="75" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/hu/floater_script_search.xml b/linden/indra/newview/skins/default/xui/hu/floater_script_search.xml
index 9049ca8..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/hu/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/hu/floater_script_search.xml
@@ -1,14 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Kód keresése">
3 <check_box label="Kis- és nagybetű érzékeny" name="case_text" />
4 <button label="Keres" label_selected="Keres" name="search_btn" left="4"/>
5 <button label="Cserél" label_selected="Cserél" name="replace_btn" left="95"/>
6 <button label="Összeset cserél" label_selected="Összeset cserél"
7 name="replace_all_btn" width="110" left="186"/>
8 <text type="string" length="1" name="txt">
9 Keresés
10 </text>
11 <text type="string" length="1" name="txt2">
12 Csere
13 </text>
14</floater>
diff --git a/linden/indra/newview/skins/default/xui/hu/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/hu/floater_search_replace.xml
new file mode 100644
index 0000000..3a7c954
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/hu/floater_search_replace.xml
@@ -0,0 +1,14 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Keresés / Cserél">
3 <check_box label="Kis- és nagybetű érzékeny" name="case_text" />
4 <button label="Keres" label_selected="Keres" name="search_btn" left="4"/>
5 <button label="Cserél" label_selected="Cserél" name="replace_btn" left="95"/>
6 <button label="Összeset cserél" label_selected="Összeset cserél"
7 name="replace_all_btn" width="110" left="186"/>
8 <text type="string" length="1" name="txt">
9 Keresés
10 </text>
11 <text type="string" length="1" name="txt2">
12 Csere
13 </text>
14</floater>
diff --git a/linden/indra/newview/skins/default/xui/it/floater_script_search.xml b/linden/indra/newview/skins/default/xui/it/floater_script_search.xml
index 470fb76..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/it/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/it/floater_script_search.xml
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="script search" title="Cerca Script" width="320">
3 <check_box label="Senza distinzione tra maiuscole e minuscole" name="case_text" left="65"/>
4 <button label="Cerca" label_selected="Cerca" name="search_btn" width="85"/>
5 <button label="Sostituisci" label_selected="Sostituisci" name="replace_btn" left="100" width="85"/>
6 <button label="Sostituisci tutto" label_selected="Sostituisci tutto" name="replace_all_btn" left="190" width="122"/>
7 <text name="txt" width="60">
8 Cerca
9 </text>
10 <text name="txt2" width="60">
11 Sostituisci
12 </text>
13 <line_editor left="65" name="search_text" width="240" />
14 <line_editor left="65" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/it/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/it/floater_search_replace.xml
new file mode 100644
index 0000000..1ce0162
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/it/floater_search_replace.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="script search" title="Cerca / Modifica" width="320">
3 <check_box label="Senza distinzione tra maiuscole e minuscole" name="case_text" left="65"/>
4 <button label="Cerca" label_selected="Cerca" name="search_btn" width="85"/>
5 <button label="Sostituisci" label_selected="Sostituisci" name="replace_btn" left="100" width="85"/>
6 <button label="Sostituisci tutto" label_selected="Sostituisci tutto" name="replace_all_btn" left="190" width="122"/>
7 <text name="txt" width="60">
8 Cerca
9 </text>
10 <text name="txt2" width="60">
11 Sostituisci
12 </text>
13 <line_editor left="65" name="search_text" width="240" />
14 <line_editor left="65" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/ja/floater_script_search.xml b/linden/indra/newview/skins/default/xui/ja/floater_script_search.xml
index 2accc0f..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/ja/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/ja/floater_script_search.xml
@@ -1,13 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="スクリプト検索">
3 <check_box label="大文字と小文字を区別しない" name="case_text" />
4 <button label="検索" label_selected="検索" name="search_btn" />
5 <button label="置換" label_selected="置換" name="replace_btn" />
6 <button label="すべて置換" label_selected="すべて置換" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 検索
9 </text>
10 <text type="string" length="1" name="txt2">
11 置換
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/ja/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/ja/floater_search_replace.xml
new file mode 100644
index 0000000..dbcef8b
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/ja/floater_search_replace.xml
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="検索/置換">
3 <check_box label="大文字と小文字を区別しない" name="case_text" />
4 <button label="検索" label_selected="検索" name="search_btn" />
5 <button label="置換" label_selected="置換" name="replace_btn" />
6 <button label="すべて置換" label_selected="すべて置換" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 検索
9 </text>
10 <text type="string" length="1" name="txt2">
11 置換
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/ko/floater_script_search.xml b/linden/indra/newview/skins/default/xui/ko/floater_script_search.xml
index 614523a..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/ko/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/ko/floater_script_search.xml
@@ -1,13 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="스크립트 검색">
3 <check_box label="영문 대소문자 구분 안 함" name="case_text" />
4 <button label="검색" label_selected="검색" name="search_btn" />
5 <button label="대체" label_selected="대체" name="replace_btn" />
6 <button label="모두 대체" label_selected="모두 대체" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 검색
9 </text>
10 <text type="string" length="1" name="txt2">
11 대체
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/ko/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/ko/floater_search_replace.xml
new file mode 100644
index 0000000..a8a2203
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/ko/floater_search_replace.xml
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="검색 / 대체">
3 <check_box label="영문 대소문자 구분 안 함" name="case_text" />
4 <button label="검색" label_selected="검색" name="search_btn" />
5 <button label="대체" label_selected="대체" name="replace_btn" />
6 <button label="모두 대체" label_selected="모두 대체" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 검색
9 </text>
10 <text type="string" length="1" name="txt2">
11 대체
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/pl/floater_script_search.xml b/linden/indra/newview/skins/default/xui/pl/floater_script_search.xml
index d00f1c2..e69de29 100755
--- a/linden/indra/newview/skins/default/xui/pl/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/pl/floater_script_search.xml
@@ -1,14 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Szukaj Skryptu">
3 <check_box label="CapsLoock Nieaktywny" name="case_text" />
4 <button label="Szukaj" label_selected="Szukaj" name="search_btn" />
5 <button label="Zamień" label_selected="Zamień" name="replace_btn" />
6 <button label="Zamień Wszystko" label_selected="Zamień Wszystko"
7 name="replace_all_btn" />
8 <text type="string" length="1" name="txt">
9 Szukaj
10 </text>
11 <text type="string" length="1" name="txt2">
12 Zamień
13 </text>
14</floater>
diff --git a/linden/indra/newview/skins/default/xui/pl/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/pl/floater_search_replace.xml
new file mode 100644
index 0000000..8c3d7b8
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/pl/floater_search_replace.xml
@@ -0,0 +1,14 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Szukaj / Zamień">
3 <check_box label="CapsLoock Nieaktywny" name="case_text" />
4 <button label="Szukaj" label_selected="Szukaj" name="search_btn" />
5 <button label="Zamień" label_selected="Zamień" name="replace_btn" />
6 <button label="Zamień Wszystko" label_selected="Zamień Wszystko"
7 name="replace_all_btn" />
8 <text type="string" length="1" name="txt">
9 Szukaj
10 </text>
11 <text type="string" length="1" name="txt2">
12 Zamień
13 </text>
14</floater>
diff --git a/linden/indra/newview/skins/default/xui/pt/floater_script_search.xml b/linden/indra/newview/skins/default/xui/pt/floater_script_search.xml
index 4bd81e3..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/pt/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/pt/floater_script_search.xml
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="script search" title="Busca de Script" width="320">
3 <check_box label="Não diferenciar Maiúsculas de Minúsculas" name="case_text" left="75"/>
4 <button label="Buscar" label_selected="Buscar" name="search_btn" width="85"/>
5 <button label="Substituir" label_selected="Substituir" name="replace_btn" left="100" width="85"/>
6 <button label="Substituir Tudo" label_selected="Substituir Tudo" name="replace_all_btn" left="190" width="122"/>
7 <text length="1" name="txt" type="string" width="65">
8 Buscar
9 </text>
10 <text length="1" name="txt2" type="string" width="65">
11 Substituir
12 </text>
13 <line_editor left="75" name="search_text" width="240" />
14 <line_editor left="75" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/pt/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/pt/floater_search_replace.xml
new file mode 100644
index 0000000..5248e08
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/pt/floater_search_replace.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="script search" title="Buscar / Substituir" width="320">
3 <check_box label="Não diferenciar Maiúsculas de Minúsculas" name="case_text" left="75"/>
4 <button label="Buscar" label_selected="Buscar" name="search_btn" width="85"/>
5 <button label="Substituir" label_selected="Substituir" name="replace_btn" left="100" width="85"/>
6 <button label="Substituir Tudo" label_selected="Substituir Tudo" name="replace_all_btn" left="190" width="122"/>
7 <text length="1" name="txt" type="string" width="65">
8 Buscar
9 </text>
10 <text length="1" name="txt2" type="string" width="65">
11 Substituir
12 </text>
13 <line_editor left="75" name="search_text" width="240" />
14 <line_editor left="75" name="replace_text" width="240" />
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/ru/floater_script_search.xml b/linden/indra/newview/skins/default/xui/ru/floater_script_search.xml
index d7ced55..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/ru/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/ru/floater_script_search.xml
@@ -1,16 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Поиск скриптов" width="320">
3 <check_box label="Без учета регистра" name="case_text" left="65"/>
4 <button label="Поиск" label_selected="Поиск" name="search_btn" width="85" />
5 <button label="Замена" label_selected="Заменить" name="replace_btn" left="100" width="85" />
6 <button label="Заменить все" label_selected="Заменить все"
7 name="replace_all_btn" left="190" width="122"/>
8 <text type="string" length="1" name="txt" width="60">
9 Поиск
10 </text>
11 <text type="string" length="1" name="txt2" width="60">
12 Заменить
13 </text>
14 <line_editor left="65" name="search_text" width="240" />
15 <line_editor left="65" name="replace_text" width="240" />
16</floater>
diff --git a/linden/indra/newview/skins/default/xui/ru/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/ru/floater_search_replace.xml
new file mode 100644
index 0000000..20f1a44
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/ru/floater_search_replace.xml
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Найти / Заменить" width="320">
3 <check_box label="Без учета регистра" name="case_text" left="65"/>
4 <button label="Поиск" label_selected="Поиск" name="search_btn" width="85" />
5 <button label="Замена" label_selected="Заменить" name="replace_btn" left="100" width="85" />
6 <button label="Заменить все" label_selected="Заменить все"
7 name="replace_all_btn" left="190" width="122"/>
8 <text type="string" length="1" name="txt" width="60">
9 Поиск
10 </text>
11 <text type="string" length="1" name="txt2" width="60">
12 Заменить
13 </text>
14 <line_editor left="65" name="search_text" width="240" />
15 <line_editor left="65" name="replace_text" width="240" />
16</floater>
diff --git a/linden/indra/newview/skins/default/xui/tr/floater_script_search.xml b/linden/indra/newview/skins/default/xui/tr/floater_script_search.xml
index fb494e5..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/tr/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/tr/floater_script_search.xml
@@ -1,14 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Betik arama">
3 <check_box label="Harf duyarsız" name="case_text" />
4 <button label="Ara" label_selected="Ara" name="search_btn" left="4"/>
5 <button label="Değiştir" label_selected="Değiştir" name="replace_btn" left="95"/>
6 <button label="Tümünü değiştir" label_selected="Tümünü değiştir"
7 name="replace_all_btn" width="110" left="186"/>
8 <text type="string" length="1" name="txt">
9 Ara
10 </text>
11 <text type="string" length="1" name="txt2">
12 Değiştir
13 </text>
14</floater>
diff --git a/linden/indra/newview/skins/default/xui/tr/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/tr/floater_search_replace.xml
new file mode 100644
index 0000000..86cf2a1
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/tr/floater_search_replace.xml
@@ -0,0 +1,14 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Ara/değiştir">
3 <check_box label="Harf duyarsız" name="case_text" />
4 <button label="Ara" label_selected="Ara" name="search_btn" left="4"/>
5 <button label="Değiştir" label_selected="Değiştir" name="replace_btn" left="95"/>
6 <button label="Tümünü değiştir" label_selected="Tümünü değiştir"
7 name="replace_all_btn" width="110" left="186"/>
8 <text type="string" length="1" name="txt">
9 Ara
10 </text>
11 <text type="string" length="1" name="txt2">
12 Değiştir
13 </text>
14</floater>
diff --git a/linden/indra/newview/skins/default/xui/uk/floater_script_search.xml b/linden/indra/newview/skins/default/xui/uk/floater_script_search.xml
index 5aaa303..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/uk/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/uk/floater_script_search.xml
@@ -1,16 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Пошук скриптів" width="320">
3 <check_box label="Без учета регистра" name="case_text" left="65"/>
4 <button label="Пошук" label_selected="Пошук" name="search_btn" width="85" />
5 <button label="Заміна" label_selected="Замінити" name="replace_btn" left="100" width="85"/>
6 <button label="Замінити все" label_selected="Замінити все"
7 name="replace_all_btn" left="190" width="122"/>
8 <text type="string" length="1" name="txt" width="60">
9 Пошук
10 </text>
11 <text type="string" length="1" name="txt2" width="60">
12 Замінити
13 </text>
14 <line_editor left="65" name="search_text" width="240" />
15 <line_editor left="65" name="replace_text" width="240" />
16</floater>
diff --git a/linden/indra/newview/skins/default/xui/uk/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/uk/floater_search_replace.xml
new file mode 100644
index 0000000..9a1d0a3
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/uk/floater_search_replace.xml
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="Знайти / Замінити" width="320">
3 <check_box label="Без учета регистра" name="case_text" left="65"/>
4 <button label="Пошук" label_selected="Пошук" name="search_btn" width="85" />
5 <button label="Заміна" label_selected="Замінити" name="replace_btn" left="100" width="85"/>
6 <button label="Замінити все" label_selected="Замінити все"
7 name="replace_all_btn" left="190" width="122"/>
8 <text type="string" length="1" name="txt" width="60">
9 Пошук
10 </text>
11 <text type="string" length="1" name="txt2" width="60">
12 Замінити
13 </text>
14 <line_editor left="65" name="search_text" width="240" />
15 <line_editor left="65" name="replace_text" width="240" />
16</floater>
diff --git a/linden/indra/newview/skins/default/xui/zh/floater_script_search.xml b/linden/indra/newview/skins/default/xui/zh/floater_script_search.xml
index 81ba081..e69de29 100644
--- a/linden/indra/newview/skins/default/xui/zh/floater_script_search.xml
+++ b/linden/indra/newview/skins/default/xui/zh/floater_script_search.xml
@@ -1,13 +0,0 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="脚本搜索">
3 <check_box label="不区分大小写" name="case_text" />
4 <button label="查找" label_selected="查找" name="search_btn" />
5 <button label="替换" label_selected="替换" name="replace_btn" />
6 <button label="全部替换" label_selected="全部替换" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 查找
9 </text>
10 <text type="string" length="1" name="txt2">
11 替换
12 </text>
13</floater>
diff --git a/linden/indra/newview/skins/default/xui/zh/floater_search_replace.xml b/linden/indra/newview/skins/default/xui/zh/floater_search_replace.xml
new file mode 100644
index 0000000..d21b657
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/zh/floater_search_replace.xml
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="script search" title="查找 / 替换">
3 <check_box label="不区分大小写" name="case_text" />
4 <button label="查找" label_selected="查找" name="search_btn" />
5 <button label="替换" label_selected="替换" name="replace_btn" />
6 <button label="全部替换" label_selected="全部替换" name="replace_all_btn" />
7 <text type="string" length="1" name="txt">
8 查找
9 </text>
10 <text type="string" length="1" name="txt2">
11 替换
12 </text>
13</floater>