From 77b9793c2eb357184aedee85000c90c4b1c3e574 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 1 Dec 2014 20:36:09 -0500 Subject: STORM-2082 Improve text in notifications. Disable delete button when thre is nothing to be deleted. --- indra/newview/llfloaterdeleteprefpreset.cpp | 14 ++++++++++++++ indra/newview/llfloatersaveprefpreset.cpp | 4 ++++ indra/newview/skins/default/xui/en/notifications.xml | 4 ++-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index 50abf1038b..73b3474e5c 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -69,7 +69,11 @@ void LLFloaterDeletePrefPreset::onBtnDelete() if (LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name)) { + std::string preset = mSubdirectory; + preset[0] = std::toupper(preset[0]); + LLSD args; + args["TYPE"] = preset; args["NAME"] = name; LLNotificationsUtil::add("PresetDeleted", args); } @@ -78,9 +82,19 @@ void LLFloaterDeletePrefPreset::onBtnDelete() void LLFloaterDeletePrefPreset::onPresetsListChange() { LLComboBox* combo = getChild("preset_combo"); + LLButton* delete_btn = getChild("delete"); EDefaultOptions option = DEFAULT_HIDE; LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); + + if(0 != combo->getItemCount()) + { + delete_btn->setEnabled(TRUE); + } + else + { + delete_btn->setEnabled(FALSE); + } } void LLFloaterDeletePrefPreset::onBtnCancel() diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index 3148978778..31598a8d12 100644 --- a/indra/newview/llfloatersaveprefpreset.cpp +++ b/indra/newview/llfloatersaveprefpreset.cpp @@ -82,7 +82,11 @@ void LLFloaterSavePrefPreset::onBtnSave() LLPresetsManager::getInstance()->savePreset(mSubdirectory, name); + std::string preset = mSubdirectory; + preset[0] = std::toupper(preset[0]); + LLSD args; + args["TYPE"] = preset; args["NAME"] = name; LLNotificationsUtil::add("PresetSaved", args); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1618ea0ec7..83370dbba0 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7661,14 +7661,14 @@ Attachment has been saved. icon="notifytip.tga" name="PresetSaved" type="notifytip"> -Preset [NAME] has been saved. +[TYPE] preset [NAME] has been saved. -Preset [NAME] has been deleted. +[TYPE] preset [NAME] has been deleted. - -None saved yet- + -Empty list- -- cgit v1.2.3