Changed tag color from global to account setting. Patch submitted by Satomi Ahn (FIRE-2752)

Ansariel 2011-11-16 19:58:41 +01:00
parent 970369361a
commit 2963cba30f
5 changed files with 21 additions and 22 deletions

View File

@ -1409,23 +1409,6 @@
<integer>1</integer>
</map>
<key>FirestormTagColor</key>
<map>
<key>Comment</key>
<string>The tag color you wish to have.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1</real>
<real>0</real>
<real>0</real>
<real>1.0</real>
</array>
</map>
<key>CrashHostUrl</key>
<map>
<key>Comment</key>

View File

@ -423,6 +423,22 @@
<real>1.0</real>
</array>
</map>
<key>FirestormTagColor</key>
<map>
<key>Comment</key>
<string>The tag color you wish to have.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1</real>
<real>0</real>
<real>0</real>
<real>1.0</real>
</array>
</map>
<!-- End of Firestorm settings -->
</map>
</llsd>

View File

@ -207,7 +207,7 @@ void PanelPreferenceFirestorm::refreshTagCombos()
getChild<LLUICtrl>("FSShowOwnTagColor_toggle")->setValue(gSavedSettings.getBOOL("FSShowOwnTagColor"));
LLColor4 tag_color = gSavedSettings.getColor4("FirestormTagColor");
LLColor4 tag_color = gSavedPerAccountSettings.getColor4("FirestormTagColor");
LLSD selectedColor;
if (tag_color==LLColor4::red) selectedColor = LLSD("red");
else if (tag_color==LLColor4::blue) selectedColor = LLSD("blue");
@ -264,8 +264,8 @@ void PanelPreferenceFirestorm::applyTagCombos()
else if (selectedColor == "orange") tag_color = LLColor4((F32)0.99,(F32)0.39,(F32)0.12,(F32)1);
else if (selectedColor == "green") tag_color = LLColor4::green;
if(tag_color!=gSavedSettings.getColor4("FirestormTagColor")){
gSavedSettings.setColor4("FirestormTagColor",tag_color);
if(tag_color!=gSavedPerAccountSettings.getColor4("FirestormTagColor")){
gSavedPerAccountSettings.setColor4("FirestormTagColor",tag_color);
if(gAgentAvatarp!=NULL) gAgentAvatarp->forceBakeAllTextures(true);
if(gSavedSettings.getBOOL("FSShowOwnTagColor")) change=true;
}

View File

@ -3127,7 +3127,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
LLColor4 name_tag_color = getNameTagColor(is_friend);
if(isSelf() && gSavedSettings.getBOOL("FSShowOwnTagColor")) name_tag_color=gSavedSettings.getColor4("FirestormTagColor");
if(isSelf() && gSavedSettings.getBOOL("FSShowOwnTagColor")) name_tag_color=gSavedPerAccountSettings.getColor4("FirestormTagColor");
// Wolfspirit: If we don't need to display a friend,
// if we aren't self, if we use colored Clienttags and if we have a color

View File

@ -2757,7 +2757,7 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
const char* tag_client = "Firestorm";
LLUUID client_name;
strncpy((char*)&client_name.mData[0], tag_client, UUID_BYTES);
static LLCachedControl<LLColor4> tag_color(gSavedSettings, "FirestormTagColor", LLColor4(1,0,1,1));
static LLCachedControl<LLColor4> tag_color(gSavedPerAccountSettings, "FirestormTagColor", LLColor4(1,0,1,1));
entry->setColor(tag_color);
//This glow is used to tell if the tag color is set or not.
entry->setGlow(0.1f);