aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-13 17:59:04 -0700
committerMcCabe Maxsted2011-04-13 17:59:04 -0700
commitc58055f30d8ccd594b216f01c56641393b330c14 (patch)
tree9b0c276df8e8b8a54ecbb8b0f33312ce6134d19d /linden/indra
parentDon't create temporary LLRect objects for spellchecking in every draw either (diff)
downloadmeta-impy-c58055f30d8ccd594b216f01c56641393b330c14.zip
meta-impy-c58055f30d8ccd594b216f01c56641393b330c14.tar.gz
meta-impy-c58055f30d8ccd594b216f01c56641393b330c14.tar.bz2
meta-impy-c58055f30d8ccd594b216f01c56641393b330c14.tar.xz
Ugly workaround for LLStyle issue when parsing textboxes for html while editing them.
This might be fixed in Viewer 2? If not, sadness. Also, added html parsing for picks and classified ads while I was there
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelavatar.cpp27
-rw-r--r--linden/indra/newview/llpanelclassified.cpp10
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.cpp14
-rw-r--r--linden/indra/newview/llpanelpick.cpp10
4 files changed, 44 insertions, 17 deletions
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp
index 612d9a5..c261a18 100644
--- a/linden/indra/newview/llpanelavatar.cpp
+++ b/linden/indra/newview/llpanelavatar.cpp
@@ -1992,11 +1992,15 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
1992 LLTextEditor* about_field = self->mPanelSecondLife->getChild<LLTextEditor>("about"); 1992 LLTextEditor* about_field = self->mPanelSecondLife->getChild<LLTextEditor>("about");
1993 if (about_field) 1993 if (about_field)
1994 { 1994 {
1995 about_field->setParseHTML(TRUE); 1995 if (self->mAllowEdit && (self->mAvatarID == agent_id))
1996 about_field->appendColoredText(about_text, false, false, 1996 {
1997 (self->mAllowEdit && (self->mAvatarID == agent_id)) ? 1997 about_field->setText(about_text);
1998 gColors.getColor("TextFgColor") : 1998 }
1999 gColors.getColor("TextFgReadOnlyColor")); 1999 else
2000 {
2001 about_field->setParseHTML(TRUE);
2002 about_field->appendColoredText(about_text, false, false, gColors.getColor("TextFgReadOnlyColor"));
2003 }
2000 } 2004 }
2001 2005
2002 self->mPanelSecondLife->setPartnerID(partner_id); 2006 self->mPanelSecondLife->setPartnerID(partner_id);
@@ -2007,11 +2011,14 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
2007 about_field = self->mPanelFirstLife->getChild<LLTextEditor>("about"); 2011 about_field = self->mPanelFirstLife->getChild<LLTextEditor>("about");
2008 if (about_field) 2012 if (about_field)
2009 { 2013 {
2010 about_field->setParseHTML(TRUE); 2014 if (self->mAllowEdit && (self->mAvatarID == agent_id))
2011 about_field->appendColoredText(fl_about_text, false, false, 2015 {
2012 (self->mAllowEdit && (self->mAvatarID == agent_id)) ? 2016 }
2013 gColors.getColor("TextFgColor") : 2017 else
2014 gColors.getColor("TextFgReadOnlyColor")); 2018 {
2019 about_field->setParseHTML(TRUE);
2020 about_field->appendColoredText(fl_about_text, false, false, gColors.getColor("TextFgReadOnlyColor"));
2021 }
2015 } 2022 }
2016 2023
2017 LLTextureCtrl* image_ctrl = self->mPanelFirstLife->getChild<LLTextureCtrl>("img"); 2024 LLTextureCtrl* image_ctrl = self->mPanelFirstLife->getChild<LLTextureCtrl>("img");
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp
index 99b6cf6..b2504dc 100644
--- a/linden/indra/newview/llpanelclassified.cpp
+++ b/linden/indra/newview/llpanelclassified.cpp
@@ -660,7 +660,15 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void **
660 660
661 // Update UI controls 661 // Update UI controls
662 self->mNameEditor->setText(name); 662 self->mNameEditor->setText(name);
663 self->mDescEditor->setText(desc); 663 if (self->mCreatorID == gAgent.getID())
664 {
665 self->mDescEditor->setText(desc);
666 }
667 else
668 {
669 self->mDescEditor->setParseHTML(TRUE);
670 self->mDescEditor->appendColoredText(desc, false, false, gColors.getColor("TextFgReadOnlyColor"));
671 }
664 self->mSnapshotCtrl->setImageAssetID(snapshot_id); 672 self->mSnapshotCtrl->setImageAssetID(snapshot_id);
665 self->mLocationEditor->setText(location_text); 673 self->mLocationEditor->setText(location_text);
666 self->mLocationChanged = false; 674 self->mLocationChanged = false;
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp
index 9aa70f7..8e61c60 100644
--- a/linden/indra/newview/llpanelgroupgeneral.cpp
+++ b/linden/indra/newview/llpanelgroupgeneral.cpp
@@ -814,11 +814,15 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
814 814
815 if (mEditCharter) 815 if (mEditCharter)
816 { 816 {
817 mEditCharter->setParseHTML(TRUE); 817 if (mAllowEdit && can_change_ident)
818 mEditCharter->appendColoredText(gdatap->mCharter, false, false, 818 {
819 (mAllowEdit && can_change_ident) ? 819 mEditCharter->setText(gdatap->mCharter);
820 gColors.getColor("TextFgColor") : 820 }
821 gColors.getColor("TextFgReadOnlyColor")); 821 else
822 {
823 mEditCharter->setParseHTML(TRUE);
824 mEditCharter->appendColoredText(gdatap->mCharter, false, false, gColors.getColor("TextFgReadOnlyColor"));
825 }
822 mEditCharter->resetDirty(); 826 mEditCharter->resetDirty();
823 } 827 }
824 828
diff --git a/linden/indra/newview/llpanelpick.cpp b/linden/indra/newview/llpanelpick.cpp
index 3417b17..bf5d7f4 100644
--- a/linden/indra/newview/llpanelpick.cpp
+++ b/linden/indra/newview/llpanelpick.cpp
@@ -360,7 +360,15 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **)
360 360
361 // Update UI controls 361 // Update UI controls
362 self->mNameEditor->setText(std::string(name)); 362 self->mNameEditor->setText(std::string(name));
363 self->mDescEditor->setText(std::string(desc)); 363 if (self->mCreatorID == gAgent.getID())
364 {
365 self->mDescEditor->setText(std::string(desc));
366 }
367 else
368 {
369 self->mDescEditor->setParseHTML(TRUE);
370 self->mDescEditor->appendColoredText(std::string(desc), false, false, gColors.getColor("TextFgReadOnlyColor"));
371 }
364 self->mSnapshotCtrl->setImageAssetID(snapshot_id); 372 self->mSnapshotCtrl->setImageAssetID(snapshot_id);
365 self->mLocationEditor->setText(location_text); 373 self->mLocationEditor->setText(location_text);
366 self->mEnabledCheck->set(enabled); 374 self->mEnabledCheck->set(enabled);