summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexteditor.cpp
diff options
context:
space:
mode:
authorMonroe Williams <monroe@lindenlab.com>2007-08-02 01:18:34 +0000
committerMonroe Williams <monroe@lindenlab.com>2007-08-02 01:18:34 +0000
commit7138fb673ac3df46b9cb5f23d0d74e70fdd2b6b3 (patch)
tree3c34a3a180b5275bd4166b0056765c5868f56447 /indra/newview/llviewertexteditor.cpp
parentf6a10b3214d79df4e8f5768acaa68edbd2de5620 (diff)
Merge down from Branch_1-18-1:
svn merge --ignore-ancestry svn+ssh://svn.lindenlab.com/svn/linden/release@66449 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-1@67131
Diffstat (limited to 'indra/newview/llviewertexteditor.cpp')
-rw-r--r--indra/newview/llviewertexteditor.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 3969230197..2fff820602 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -1247,8 +1247,8 @@ void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item )
const F32 SOUND_GAIN = 1.0f;
if(gAudiop)
{
- gAudiop->triggerSound(
- item->getAssetUUID(), gAgentID, SOUND_GAIN, lpos_global);
+ F32 volume = SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX");
+ gAudiop->triggerSound(item->getAssetUUID(), gAgentID, volume, lpos_global);
}
showCopyToInvDialog( item );
}
@@ -1417,7 +1417,7 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF
LLViewerTextEditor* text_editor = new LLViewerTextEditor(name,
rect,
max_text_length,
- text,
+ "",
font,
allow_embedded_items);
@@ -1433,7 +1433,18 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF
node->getAttributeBOOL("hide_scrollbar",hide_scrollbar);
text_editor->setHideScrollbarForShortDocs(hide_scrollbar);
+ BOOL hide_border = !text_editor->mBorder->getVisible();
+ node->getAttributeBOOL("hide_border", hide_border);
+ text_editor->setBorderVisible(!hide_border);
+
+ BOOL parse_html = text_editor->mParseHTML;
+ node->getAttributeBOOL("allow_html", parse_html);
+ text_editor->setParseHTML(parse_html);
+
text_editor->initFromXML(node, parent);
+ // add text after all parameters have been set
+ text_editor->appendStyledText(text, FALSE, FALSE, NULL);
+
return text_editor;
}