diff options
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 5cb93e823d..d280cf1625 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -213,7 +213,7 @@ void LLFloaterScriptSearch::onBtnSearch(void *userdata) void LLFloaterScriptSearch::handleBtnSearch() { LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text"); - mEditorCore->mEditor->selectNext(childGetText("search_text"), caseChk->get()); + mEditorCore->mEditor->selectNext(getChild<LLUICtrl>("search_text")->getValue().asString(), caseChk->get()); } // static @@ -226,7 +226,7 @@ void LLFloaterScriptSearch::onBtnReplace(void *userdata) void LLFloaterScriptSearch::handleBtnReplace() { LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text"); - mEditorCore->mEditor->replaceText(childGetText("search_text"), childGetText("replace_text"), caseChk->get()); + mEditorCore->mEditor->replaceText(getChild<LLUICtrl>("search_text")->getValue().asString(), getChild<LLUICtrl>("replace_text")->getValue().asString(), caseChk->get()); } // static @@ -239,7 +239,7 @@ void LLFloaterScriptSearch::onBtnReplaceAll(void *userdata) void LLFloaterScriptSearch::handleBtnReplaceAll() { LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text"); - mEditorCore->mEditor->replaceTextAll(childGetText("search_text"), childGetText("replace_text"), caseChk->get()); + mEditorCore->mEditor->replaceTextAll(getChild<LLUICtrl>("search_text")->getValue().asString(), getChild<LLUICtrl>("replace_text")->getValue().asString(), caseChk->get()); } @@ -451,7 +451,7 @@ bool LLScriptEdCore::hasChanged() void LLScriptEdCore::draw() { BOOL script_changed = hasChanged(); - childSetEnabled("Save_btn", script_changed); + getChildView("Save_btn")->setEnabled(script_changed); if( mEditor->hasFocus() ) { @@ -463,11 +463,11 @@ void LLScriptEdCore::draw() args["[LINE]"] = llformat ("%d", line); args["[COLUMN]"] = llformat ("%d", column); cursor_pos = LLTrans::getString("CursorPos", args); - childSetText("line_col", cursor_pos); + getChild<LLUICtrl>("line_col")->setValue(cursor_pos); } else { - childSetText("line_col", LLStringUtil::null); + getChild<LLUICtrl>("line_col")->setValue(LLStringUtil::null); } updateDynamicHelp(); @@ -660,7 +660,7 @@ void LLScriptEdCore::onBtnDynamicHelp() if (parent) parent->addDependentFloater(live_help_floater, TRUE); live_help_floater->childSetCommitCallback("lock_check", onCheckLock, this); - live_help_floater->childSetValue("lock_check", gSavedSettings.getBOOL("ScriptHelpFollowsCursor")); + live_help_floater->getChild<LLUICtrl>("lock_check")->setValue(gSavedSettings.getBOOL("ScriptHelpFollowsCursor")); live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, this); live_help_floater->childSetAction("back_btn", onClickBack, this); live_help_floater->childSetAction("fwd_btn", onClickForward, this); @@ -953,10 +953,10 @@ BOOL LLPreviewLSL::postBuild() llassert(item); if (item) { - childSetText("desc", item->getDescription()); + getChild<LLUICtrl>("desc")->setValue(item->getDescription()); } childSetCommitCallback("desc", LLPreview::onText, this); - childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe); + getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); return LLPreview::postBuild(); } @@ -1034,8 +1034,8 @@ void LLPreviewLSL::loadAsset() mScriptEd->mFunctions->setEnabled(FALSE); mAssetStatus = PREVIEW_ASSET_LOADED; } - childSetVisible("lock", !is_modifiable); - mScriptEd->childSetEnabled("Insert...", is_modifiable); + getChildView("lock")->setVisible( !is_modifiable); + mScriptEd->getChildView("Insert...")->setEnabled(is_modifiable); } else { @@ -1423,14 +1423,14 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) : BOOL LLLiveLSLEditor::postBuild() { childSetCommitCallback("running", LLLiveLSLEditor::onRunningCheckboxClicked, this); - childSetEnabled("running", FALSE); + getChildView("running")->setEnabled(FALSE); childSetAction("Reset",&LLLiveLSLEditor::onReset,this); - childSetEnabled("Reset", TRUE); + getChildView("Reset")->setEnabled(TRUE); mMonoCheckbox = getChild<LLCheckBoxCtrl>("mono"); childSetCommitCallback("mono", &LLLiveLSLEditor::onMonoCheckboxClicked, this); - childSetEnabled("mono", FALSE); + getChildView("mono")->setEnabled(FALSE); mScriptEd->mEditor->makePristine(); mScriptEd->mEditor->setFocus(TRUE); |