diff options
author | Jonathan Yap <jhwelch@gmail.com> | 2014-12-01 20:36:09 -0500 |
---|---|---|
committer | Jonathan Yap <jhwelch@gmail.com> | 2014-12-01 20:36:09 -0500 |
commit | 77b9793c2eb357184aedee85000c90c4b1c3e574 (patch) | |
tree | fc8738100e78d0d1926f4f9e4bc25f4d6fdaaa0f /indra/newview/llfloaterdeleteprefpreset.cpp | |
parent | 7360f046634d013fec1e9b37c60840a83b470ce1 (diff) |
STORM-2082 Improve text in notifications.
Disable delete button when thre is nothing to be deleted.
Diffstat (limited to 'indra/newview/llfloaterdeleteprefpreset.cpp')
-rw-r--r-- | indra/newview/llfloaterdeleteprefpreset.cpp | 14 |
1 files changed, 14 insertions, 0 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<LLComboBox>("preset_combo"); + LLButton* delete_btn = getChild<LLButton>("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() |