From 117e22047c5752352342d64e3fb7ce00a4eb8113 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:04 -0500 Subject: Second Life viewer sources 1.18.1.2 --- linden/indra/newview/llviewertexteditor.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'linden/indra/newview/llviewertexteditor.cpp') diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index f6829d4..3369125 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp @@ -1267,8 +1267,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 ); } @@ -1437,7 +1437,7 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF LLViewerTextEditor* text_editor = new LLViewerTextEditor(name, rect, max_text_length, - text, + "", font, allow_embedded_items); @@ -1453,7 +1453,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; } -- cgit v1.1