diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatervoiceeffect.cpp | 45 | ||||
-rw-r--r-- | indra/newview/llfloatervoiceeffect.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_voice_effect.xml | 65 |
3 files changed, 30 insertions, 82 deletions
diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp index 0fa6135da2..1afea66d91 100644 --- a/indra/newview/llfloatervoiceeffect.cpp +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -45,7 +45,7 @@ LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key) mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); mCommitCallbackRegistrar.add("VoiceEffect.Stop", boost::bind(&LLFloaterVoiceEffect::onClickStop, this)); mCommitCallbackRegistrar.add("VoiceEffect.Add", boost::bind(&LLFloaterVoiceEffect::onClickAdd, this)); - mCommitCallbackRegistrar.add("VoiceEffect.Activate", boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); +// mCommitCallbackRegistrar.add("VoiceEffect.Activate", boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); } // virtual @@ -70,7 +70,7 @@ BOOL LLFloaterVoiceEffect::postBuild() if (mVoiceEffectList) { mVoiceEffectList->setCommitCallback(boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); - mVoiceEffectList->setDoubleClickCallback(boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); +// mVoiceEffectList->setDoubleClickCallback(boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); } LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); @@ -133,7 +133,7 @@ void LLFloaterVoiceEffect::refreshEffectList() element["columns"][0]["column"] = "name"; element["columns"][0]["value"] = getString("no_voice_effect"); element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = "BOLD"; + element["columns"][0]["font"]["style"] = "ITALIC"; LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( @@ -152,9 +152,16 @@ void LLFloaterVoiceEffect::refreshEffectList() std::string effect_name = it->first; LLSD effect_properties = effect_interface->getVoiceEffectProperties(effect_id); + + // Tag the active effect. + if (effect_id == LLVoiceClient::instance().getVoiceEffectDefault()) + { + effect_name += " " + getString("active_voice_effect"); + } + + std::string expiry_date = effect_properties["expiry_date"].asString(); bool is_template_only = effect_properties["template_only"].asBoolean(); bool is_new = effect_properties["is_new"].asBoolean(); - std::string expiry_date = effect_properties["expiry_date"].asString(); std::string font_style = "NORMAL"; if (!is_template_only) @@ -168,6 +175,7 @@ void LLFloaterVoiceEffect::refreshEffectList() element["columns"][0]["value"] = effect_name; 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"; @@ -194,8 +202,6 @@ void LLFloaterVoiceEffect::refreshEffectList() mVoiceEffectList->selectByID(*it); } mVoiceEffectList->setScrollPos(scroll_pos); - - mVoiceEffectList->setValue(effect_interface->getVoiceEffect()); mVoiceEffectList->setEnabled(true); } @@ -213,16 +219,6 @@ void LLFloaterVoiceEffect::updateControls() getChild<LLButton>("record_btn")->setVisible(!recording); getChild<LLButton>("record_stop_btn")->setVisible(recording); - - getChild<LLButton>("play_btn")->setVisible(!playing); - getChild<LLButton>("play_stop_btn")->setVisible(playing); - - getChild<LLButton>("play_btn")->setEnabled(effect_interface->isPreviewReady()); - - if (!mVoiceEffectList) - { - mVoiceEffectList->setValue(effect_interface->getVoiceEffect()); - } } // virtual @@ -281,11 +277,12 @@ void LLFloaterVoiceEffect::onClickAdd() LLWeb::loadURL(getString("get_voice_effects_url")); } -void LLFloaterVoiceEffect::onClickActivate() -{ - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface && mVoiceEffectList) - { - effect_interface->setVoiceEffect(mVoiceEffectList->getCurrentID()); - } -} +//void LLFloaterVoiceEffect::onClickActivate() +//{ +// LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); +// if (effect_interface && mVoiceEffectList) +// { +// effect_interface->setVoiceEffect(mVoiceEffectList->getCurrentID()); +// } +//} + diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h index 060ffc99e9..ed38cd6925 100644 --- a/indra/newview/llfloatervoiceeffect.h +++ b/indra/newview/llfloatervoiceeffect.h @@ -63,7 +63,7 @@ private: void onClickPlay(); void onClickStop(); void onClickAdd(); - void onClickActivate(); +// void onClickActivate(); LLUUID mSelectedID; LLScrollListCtrl* mVoiceEffectList; 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 d0c503f7b8..728beece6b 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml @@ -14,11 +14,14 @@ min_width="240" width="313"> <string name="no_voice_effect"> - No Voice Effect + (No Voice Effect) </string> <string name="get_voice_effects_url"> http://secondlife.com/landing/v0icem0rphingt3st </string> + <string name="active_voice_effect"> + (Active) + </string> <string name="new_voice_effect"> New! </string> @@ -38,8 +41,8 @@ <scroll_list.columns label="New" name="new" - width="48" /> - <scroll_list.columns + width="64" /> + <scroll_list.columns label="Expires" name="expires" width="100" /> @@ -86,6 +89,7 @@ <button.commit_callback function="VoiceEffect.Add" /> </button> +<!-- <button follows="bottom|left" font="SansSerifBigBold" @@ -102,35 +106,8 @@ <button.commit_callback function="VoiceEffect.Activate" /> </button> +--> </panel> -<!-- <panel - background_visible="true" - bevel_style="none" - top_pad="0" - follows="left|right|bottom" - height="30" - label="bottom_panel" - layout="topleft" - left="0" - name="bottom_panel" - width="313"> - <button - follows="bottom|left" - font="SansSerifBigBold" - height="10" - image_hover_selected="Activate_Checkmark" - image_selected="Activate_Checkmark" - image_unselected="Activate_Checkmark" - layout="topleft" - left="10" - name="activate_btn" - tool_tip="Activate/Deactivate selected voice effect" - top="10" - width="10" - <button.commit_callback - function="VoiceEffect.Activate" /> - </button> - </panel> --> <button follows="left|bottom" height="23" @@ -155,30 +132,4 @@ <button.commit_callback function="VoiceEffect.Stop" /> </button> -<!-- - <button - follows="left|bottom" - height="23" - label="Play Preview" - layout="topleft" - left_pad="6" - name="play_btn" - top_delta="0" - width="135"> - <button.commit_callback - function="VoiceEffect.Play" /> - </button> - <button - follows="left|bottom" - height="23" - label="Stop" - layout="topleft" - left_delta="0" - name="play_stop_btn" - top_delta="0" - width="135"> - <button.commit_callback - function="VoiceEffect.Stop" /> - </button> ---> </floater> |