summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-05-25 02:47:28 +0100
committerAimee Linden <aimee@lindenlab.com>2010-05-25 02:47:28 +0100
commit563ae1c7e029ceef2aed0b85623c2f0a95d38b46 (patch)
tree7b99f2422aec7a6395f4de8b87b7d4ac1d5c621f /indra/newview
parentcf34437506cabdc54466cdf5010979a61a99154b (diff)
EXT-7337 WIP Replace the new column with a (New!) tag after the voice effect name
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatervoiceeffect.cpp24
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_effect.xml12
2 files changed, 17 insertions, 19 deletions
diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp
index 9529f947c1..46356cf161 100644
--- a/indra/newview/llfloatervoiceeffect.cpp
+++ b/indra/newview/llfloatervoiceeffect.cpp
@@ -145,6 +145,7 @@ void LLFloaterVoiceEffect::refreshEffectList()
}
}
+ // Add each Voice Effect template, if there are any (template list includes all usable effects)
const voice_effect_list_t& template_list = effect_interface->getVoiceEffectTemplateList();
if (!template_list.empty())
{
@@ -161,15 +162,21 @@ void LLFloaterVoiceEffect::refreshEffectList()
effect_name += " " + getString("active_voice_effect");
}
+ // Tag available effects that are new this session
+ if (effect_properties["is_new"].asBoolean())
+ {
+ effect_name += " " + getString("new_voice_effect");
+ }
+
LLDate expiry_date = effect_properties["expiry_date"].asDate();
bool is_template_only = effect_properties["template_only"].asBoolean();
- bool is_new = effect_properties["is_new"].asBoolean();
std::string font_style = "NORMAL";
if (!is_template_only)
{
font_style = "BOLD";
}
+
LLSD element;
element["id"] = effect_id;
@@ -178,21 +185,16 @@ void LLFloaterVoiceEffect::refreshEffectList()
element["columns"][0]["font"]["name"] = "SANSSERIF";
element["columns"][0]["font"]["style"] = font_style;
- element["columns"][1]["column"] = "new";
- element["columns"][1]["value"] = is_new ? getString("new_voice_effect") : "";
- element["columns"][1]["font"]["name"] = "SANSSERIF";
- element["columns"][1]["font"]["style"] = font_style;
-
- element["columns"][2]["column"] = "expires";
+ element["columns"][1]["column"] = "expires";
if (!is_template_only)
{
- element["columns"][2]["value"] = expiry_date;
+ element["columns"][1]["value"] = expiry_date;
}
else {
- element["columns"][2]["value"] = "";
+ element["columns"][1]["value"] = "";
}
- element["columns"][2]["font"]["name"] = "SANSSERIF";
- element["columns"][2]["font"]["style"] = font_style;
+ element["columns"][1]["font"]["name"] = "SANSSERIF";
+ element["columns"][1]["font"]["style"] = font_style;
LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM);
// *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :(
diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
index 73e4a694eb..f79d4fd35c 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
@@ -20,7 +20,7 @@
(Active)
</string>
<string name="new_voice_effect">
- New!
+ (New!)
</string>
<text
height="40"
@@ -72,13 +72,9 @@
tool_tip="Record a sample of your voice, then click an effect to preview."
top="100">
<scroll_list.columns
- label="Name"
- name="name"
- width="120" />
- <scroll_list.columns
- label="New"
- name="new"
- width="60" />
+ dynamic_width="true"
+ label="Voice Effect"
+ name="name"/>
<scroll_list.columns
label="Expires"
name="expires"