diff --git a/mythtv/libs/libmyth/libmyth.pro b/mythtv/libs/libmyth/libmyth.pro
index b457360..88902aa 100644
--- a/mythtv/libs/libmyth/libmyth.pro
+++ b/mythtv/libs/libmyth/libmyth.pro
@@ -26,7 +26,7 @@ HEADERS += mythevent.h mythexp.h mythmediamonitor.h
 HEADERS += mythplugin.h mythpluginapi.h
 HEADERS += mythwidgets.h mythwizard.h schemawizard.h
 HEADERS += output.h
-HEADERS += settings.h
+HEADERS += settings.h standardsettings.h
 HEADERS += visual.h xmlparse.h
 HEADERS += storagegroupeditor.h
 HEADERS += mythterminal.h
@@ -55,7 +55,7 @@ SOURCES += mythmediamonitor.cpp
 SOURCES += mythplugin.cpp
 SOURCES += mythwidgets.cpp mythwizard.cpp schemawizard.cpp
 SOURCES += output.cpp
-SOURCES += settings.cpp
+SOURCES += settings.cpp  standardsettings.cpp
 SOURCES += storagegroupeditor.cpp
 SOURCES += mythterminal.cpp
 SOURCES += remoteutil.cpp
@@ -100,7 +100,7 @@ POST_TARGETDEPS += ../../external/FFmpeg/libavutil/$$avLibName(avutil)
 inc.path = $${PREFIX}/include/mythtv/
 inc.files  = dialogbox.h mythcontext.h
 inc.files += mythwidgets.h remotefile.h oldsettings.h volumecontrol.h
-inc.files += settings.h uitypes.h  mythplugin.h mythdialogs.h
+inc.files += standardsettings.h uitypes.h  mythplugin.h mythdialogs.h
 inc.files += audio/audiooutput.h audio/audiosettings.h
 inc.files += audio/audiooutputsettings.h
 inc.files += audio/volumebase.h audio/eldutils.h
diff --git a/mythtv/libs/libmyth/standardsettings.cpp b/mythtv/libs/libmyth/standardsettings.cpp
new file mode 100755
index 0000000..57502d3
--- /dev/null
+++ b/mythtv/libs/libmyth/standardsettings.cpp
@@ -0,0 +1,821 @@
+#include "standardsettings.h"
+#include <QCoreApplication>
+
+#include <mythcontext.h>
+#include <mythmainwindow.h>
+#include <mythdialogbox.h>
+#include <mythuispinbox.h>
+#include <mythuitext.h>
+#include <mythuibutton.h>
+#include <mythuifilebrowser.h>
+#include "mythlogging.h"
+
+void MythUIButtonListItemSetting::ShouldUpdate(StandardSetting *setting)
+{
+    if (setting)        //??? 
+        LOG(VB_GENERAL, LOG_ERR, QString("MythUIButtonListItemSetting::ShouldUpdate(%1)=>%2")
+            .arg(setting->getLabel())
+            .arg(setting->getValue()));
+    setting->updateButton(this);
+}
+
+StandardSetting::StandardSetting(Storage *_storage) : 
+    m_enabled(true), m_label(""), m_helptext(""), m_visible(true),
+    m_haveChanged(false),
+    m_storage(_storage),
+
+
+    m_parent(NULL)
+
+{
+}
+
+StandardSetting::~StandardSetting()
+{   
+    QList<StandardSetting *>::const_iterator i;
+    for (i = m_children.constBegin(); i != m_children.constEnd(); ++i)
+        delete *i;
+    m_children.clear();
+
+    QMap<QString, QList<StandardSetting *> >::const_iterator iMap;
+    for (iMap = m_targets.constBegin(); iMap != m_targets.constEnd(); ++iMap)
+    {
+        for (i = (*iMap).constBegin(); i != (*iMap).constEnd(); ++i)
+            delete *i;
+    }
+    m_targets.clear();
+}
+
+MythUIButtonListItem * StandardSetting::createButton(MythUIButtonList * list)
+{
+    MythUIButtonListItemSetting *item = new MythUIButtonListItemSetting(list, m_label);
+    item->SetData(qVariantFromValue(this));
+    connect(this, SIGNAL(ShouldRedraw(StandardSetting *)), item, SLOT(ShouldUpdate(StandardSetting *)));
+    updateButton(item);
+    return item;
+}
+
+void StandardSetting::setEnabled(bool b)
+{
+    m_enabled = b;
+    emit ShouldRedraw(this);
+}
+
+void StandardSetting::setParent(StandardSetting *parent)
+{
+    m_parent = parent;
+}
+
+void StandardSetting::addChild(StandardSetting *child)
+{
+    if (!child)return;
+    m_children.append(child);
+    child->setParent(this);
+}
+
+bool StandardSetting::keyPressEvent(QKeyEvent *)
+{
+    return false;
+}
+
+/**
+ * This method is called whenever the UI need to reflect a change
+ * Reimplement this If you widget need a custom look
+ * \param item is the associated MythUIButtonListItem to be updated
+ */
+void StandardSetting::updateButton(MythUIButtonListItem *item)
+{
+    item->DisplayState("standard", "widgettype");
+    item->setEnabled(isEnabled());
+    item->SetText(m_label);
+    item->SetText(m_settingValue,"value");
+    item->SetText(getHelpText(),"description");
+    item->setDrawArrow (haveSubSettings());
+}
+
+void StandardSetting::addTargetedChild(const QString &value, StandardSetting * setting)
+{
+    m_targets[value].append(setting);
+    setting->setParent(this);
+}
+
+
+QList<StandardSetting *> *StandardSetting::getSubSettings()
+{
+    if (m_targets.contains(m_settingValue) && m_targets[m_settingValue].size()>0)
+            return &m_targets[m_settingValue];
+    return &m_children;
+}
+
+bool StandardSetting::haveSubSettings()
+{
+    QList<StandardSetting *> * subSettings=getSubSettings();
+    return (subSettings!=NULL && subSettings->size()>0);
+}
+
+void StandardSetting::clearSettings()
+{
+    m_children.clear();
+}
+
+void StandardSetting::setValue(const QString &newValue)
+{
+    m_settingValue = newValue;
+    m_haveChanged=true;
+    emit valueChanged(newValue);
+    emit valueChanged(this);
+    emit ShouldRedraw(this);
+}
+
+
+/**
+ * Return true if the setting have changed or any of its children
+ */
+bool StandardSetting::haveChanged()
+{
+    if (m_haveChanged)
+    {
+        LOG(VB_GENERAL, LOG_ERR, QString("Is changed %1").arg(getLabel()));
+        return true;
+    }
+    //else 
+        //LOG(VB_GENERAL, LOG_ERR, QString("Is not changed %1").arg(getLabel()));
+
+    //we check only the relevant children
+    QList<StandardSetting *> *children = getSubSettings();
+    if (children==NULL) return false;
+    QList<StandardSetting *>::const_iterator i;
+    bool haveChanged = false;
+    for (i = children->constBegin(); !haveChanged && i != children->constEnd(); ++i)
+        haveChanged=(*i)->haveChanged();
+
+    return haveChanged;
+}
+
+void StandardSetting::Load(void)
+{
+    m_haveChanged=false;
+
+    QList<StandardSetting *>::const_iterator i;
+    for (i = m_children.constBegin(); i != m_children.constEnd(); ++i)
+        (*i)->Load();
+
+    QMap<QString, QList<StandardSetting *> >::const_iterator iMap;
+    for (iMap = m_targets.constBegin(); iMap != m_targets.constEnd(); ++iMap)
+    {
+        for (i = (*iMap).constBegin(); i != (*iMap).constEnd(); ++i)
+            (*i)->Load();
+    }
+}
+
+void StandardSetting::Save(void)
+{
+    m_haveChanged=false;
+
+    //we save only the relevant children
+    QList<StandardSetting *> *children = getSubSettings();
+    if (children==NULL) return;
+    QList<StandardSetting *>::const_iterator i;
+    for (i = children->constBegin(); i != children->constEnd(); ++i)
+        (*i)->Save();
+}
+
+/*******************************************************************************
+                            Group Setting
+********************************************************************************/
+GroupSetting::GroupSetting():
+    StandardSetting(this), TransientStorage()
+{
+}
+
+void GroupSetting::edit(MythScreenType * screen)
+{
+    if (!isEnabled())return;
+    DialogCompletionEvent *dce =
+            new DialogCompletionEvent("leveldown", 0, "", "");
+    QCoreApplication::postEvent(screen, dce);
+}
+
+void GroupSetting::updateButton(MythUIButtonListItem *item)
+{
+    item->DisplayState("group", "widgettype");
+    item->setEnabled(isEnabled());
+    item->SetText(m_label);
+    item->SetText(m_settingValue,"value");
+    item->SetText(getHelpText(),"description");
+    item->setDrawArrow (haveSubSettings());
+}
+
+
+ButtonStandardSetting::ButtonStandardSetting(const QString &):
+    StandardSetting(this), TransientStorage()
+{
+}
+
+void ButtonStandardSetting::edit(MythScreenType * screen)
+{
+    emit clicked();
+}
+
+
+/*******************************************************************************
+                            Text Setting
+********************************************************************************/
+
+MythUITextEditSetting::MythUITextEditSetting(Storage *_storage):
+    StandardSetting(_storage)
+{
+}
+
+void MythUITextEditSetting::edit(MythScreenType * screen)
+{
+    if (!isEnabled())return;
+    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+    MythTextInputDialog *settingdialog =
+                                    new MythTextInputDialog(popupStack,
+                                    getLabel(),FilterNone, false,m_settingValue);
+
+    if (settingdialog->Create())
+    {
+        settingdialog->SetReturnEvent(screen, "editsetting");
+        popupStack->AddScreen(settingdialog);
+    }
+};
+
+void MythUITextEditSetting::resultEdit(DialogCompletionEvent *dce)
+{
+    if (m_settingValue!=dce->GetResultText())
+    {
+        setValue(dce->GetResultText());
+    }
+}
+
+
+void MythUITextEditSetting::updateButton(MythUIButtonListItem *item)
+{
+    StandardSetting::updateButton(item);
+    item->DisplayState("textedit", "widgettype");
+}
+
+
+/*******************************************************************************
+                            Directory Setting
+********************************************************************************/
+
+MythUIFileBrowserSetting::MythUIFileBrowserSetting(Storage *_storage):
+    StandardSetting(_storage)
+{
+    m_typeFilter = (QDir::AllDirs | QDir::Drives | QDir::Files |
+                    QDir::Readable | QDir::Writable | QDir::Executable);
+    m_nameFilter.clear();
+    m_nameFilter << "*";
+}
+
+void MythUIFileBrowserSetting::edit(MythScreenType * screen)
+{
+    if (!isEnabled())return;
+    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+    MythUIFileBrowser *settingdialog =
+                                    new MythUIFileBrowser(popupStack,
+                                    m_settingValue);
+    settingdialog->SetTypeFilter(m_typeFilter);
+    settingdialog->SetNameFilter(m_nameFilter);
+
+    if (settingdialog->Create())
+    {
+        settingdialog->SetReturnEvent(screen, "editsetting");
+        popupStack->AddScreen(settingdialog);
+    }
+};
+
+void MythUIFileBrowserSetting::resultEdit(DialogCompletionEvent *dce)
+{
+    if (m_settingValue!=dce->GetResultText())
+    {
+        setValue(dce->GetResultText());
+    }
+}
+
+void MythUIFileBrowserSetting::updateButton(MythUIButtonListItem *item)
+{
+    StandardSetting::updateButton(item);
+    item->DisplayState("filebrowser", "widgettype");
+}
+
+
+/*******************************************************************************
+                            ComboBoxSetting
+********************************************************************************/
+/**
+ * Create a Setting Widget to select the value from a list
+ * \param rw if set to true, the user can input it's own value
+ */
+MythUIComboBoxSetting::MythUIComboBoxSetting(Storage *_storage, bool rw):
+    StandardSetting(_storage),
+    m_rewrite(rw),
+    m_isSet(false)
+{
+}
+
+MythUIComboBoxSetting::~MythUIComboBoxSetting()
+{
+    m_labels.clear();
+    m_values.clear();
+}
+
+void MythUIComboBoxSetting::setValue(int value)
+{
+    if (value>=0 && value < m_values.size())
+            StandardSetting::setValue(m_values.at(value));
+}
+
+void MythUIComboBoxSetting::addSelection(const QString &label, QString value,
+                                 bool select)
+{
+    value = (value.isEmpty()) ? label : value;
+    m_labels.push_back(label);
+    m_values.push_back(value);
+
+    if (select || !m_isSet)
+    {
+        StandardSetting::setValue(value);
+        if (!m_isSet) m_isSet = true;
+    }
+}
+
+void MythUIComboBoxSetting::clearSelections()
+{
+    m_labels.clear();
+    m_values.clear();
+}
+
+void MythUIComboBoxSetting::updateButton(MythUIButtonListItem *item)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MythUIComboBoxSetting::updateButton(%1)").arg(getLabel()));
+    item->DisplayState("combobox", "widgettype");
+    item->setEnabled(isEnabled());
+    item->SetText(m_label);
+    int indexValue = m_values.indexOf(m_settingValue);
+    if (indexValue >=0)
+        item->SetText(m_labels.value(indexValue),"value");
+    else 
+        item->SetText(m_settingValue,"value");
+    item->SetText(getHelpText(),"description");
+    item->setDrawArrow (haveSubSettings());
+}
+
+void MythUIComboBoxSetting::edit(MythScreenType * screen)
+{
+    if (!isEnabled())return;
+    MythScreenStack *popupStack =
+                            GetMythMainWindow()->GetStack("popup stack");
+
+    MythDialogBox * m_menuPopup =
+            new MythDialogBox(getLabel(), popupStack, "optionmenu");
+
+    if (m_menuPopup->Create())
+        popupStack->AddScreen(m_menuPopup);
+
+   // connect(m_menuPopup,SIGNAL(haveResult(QString)), this, SLOT(setValue(QString)));
+
+    m_menuPopup->SetReturnEvent(screen, "editsetting");
+
+    if (m_rewrite)
+        //FIXME This look like a hack to me, what if the list a a NEWENTRY value ?
+        m_menuPopup->AddButton(QObject::tr("New entry"),QString("NEWENTRY"),false,m_settingValue=="");
+    for (int i = 0; i < m_labels.size() && m_values.size(); ++i)
+    {
+        QString value = m_values.at(i);
+        m_menuPopup->AddButton(m_labels.at(i),value,false,value==m_settingValue);
+    }
+}
+
+void MythUIComboBoxSetting::setValue(const QString& newValue)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MythUIComboBoxSetting::setValue(%1)").arg(newValue));
+    StandardSetting::setValue(newValue);
+}
+
+void MythUIComboBoxSetting::resultEdit(DialogCompletionEvent *dce)
+{
+    if (dce->GetResult()!=-1)
+    {
+        if ( m_rewrite && dce->GetData().toString()=="NEWENTRY")
+        {
+            MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+            MythTextInputDialog *settingdialog =
+                                            new MythTextInputDialog(popupStack,
+                                            getLabel(),FilterNone, false,m_settingValue);
+
+            if (settingdialog->Create())
+            {
+                connect(settingdialog,SIGNAL(haveResult(QString)),
+                        this, SLOT(setValue(const QString&)));
+//                settingdialog->SetReturnEvent(screen, "editsetting");
+                popupStack->AddScreen(settingdialog);
+            }
+        }
+        else if ( m_settingValue!=dce->GetData().toString())
+        {
+            StandardSetting::setValue(dce->GetData().toString());
+        }
+    }
+}
+void MythUIComboBoxSetting::Load()
+{
+    if (m_rewrite)
+        LOG(VB_GENERAL, LOG_ERR, QString("MythUIComboBoxSetting::MythUIComboBoxSetting: need to implement rewrite for %1").arg(getLabel()));
+    StandardSetting::Load();
+}
+
+/*******************************************************************************
+                            SpinBox Setting
+********************************************************************************/
+MythUISpinBoxSetting::MythUISpinBoxSetting(Storage *_storage, int min, int max, int step, bool allow_single_step):
+    MythUIComboBoxSetting(_storage, false),
+    m_min(min),
+    m_max(max),
+    m_step(step),
+    m_allow_single_step(allow_single_step)
+{
+    //we default to 0 unless 0 is out of range
+    if (m_min >0 || m_max < 0)m_settingValue=m_min;
+}
+
+void MythUISpinBoxSetting::updateButton(MythUIButtonListItem *item)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MythUISpinBoxSetting::updateButton(%1)").arg(getLabel()));
+    item->DisplayState("spinbox", "widgettype");
+    item->setEnabled(isEnabled());
+    item->SetText(m_label);
+    int indexValue = m_values.indexOf(m_settingValue);
+    if (indexValue >=0)
+        item->SetText(m_labels.value(indexValue),"value");
+    else 
+        item->SetText(m_settingValue,"value");
+    item->SetText(getHelpText(),"description");
+    item->setDrawArrow (haveSubSettings());
+}
+
+int MythUISpinBoxSetting::intValue()
+{
+    return m_settingValue.toInt();
+}
+
+void MythUISpinBoxSetting::edit(MythScreenType * screen)
+{
+    if (!isEnabled())return;
+
+    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+    MythSpinBoxDialog *settingdialog =
+                                    new MythSpinBoxDialog(popupStack,
+                                    getLabel());
+
+    if (settingdialog->Create())
+    {
+        settingdialog->SetRange(m_min, m_max, m_step);
+        //Add custom values
+        for (int i = 0; i < m_labels.size() && m_values.size(); ++i)
+        {
+            QString value = m_values.at(i);
+            settingdialog->AddSelection(m_labels.at(i),value.toInt());
+        }
+        LOG(VB_GENERAL, LOG_ERR, QString("MythUISpinBoxSetting::edit(%1) SetValue(%2)").arg(getLabel()).arg(m_settingValue));
+        settingdialog->SetValue(m_settingValue);
+        settingdialog->SetReturnEvent(screen, "editsetting");
+        popupStack->AddScreen(settingdialog);
+    }
+};
+
+void MythUISpinBoxSetting::resultEdit(DialogCompletionEvent *dce)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MythUISpinBoxSetting::resultEdit(DialogCompletionEvent *dce) START"));
+    if (m_settingValue!=dce->GetResultText())
+    {
+        MythUIComboBoxSetting::setValue(dce->GetResultText());
+    }
+    LOG(VB_GENERAL, LOG_ERR, QString("MythUISpinBoxSetting::resultEdit(DialogCompletionEvent *dce) END"));
+}
+
+/*******************************************************************************
+                           MythUICheckBoxSetting
+********************************************************************************/
+
+MythUICheckBoxSetting::MythUICheckBoxSetting(Storage *_storage):
+    StandardSetting(_storage)
+{
+}
+
+bool MythUICheckBoxSetting::boolValue()
+{
+    return m_settingValue=="1";
+}
+
+void MythUICheckBoxSetting::setValue(const QString &value)
+{
+    StandardSetting::setValue(value);
+    emit valueChanged(value=="1");
+}
+
+void MythUICheckBoxSetting::setValue(bool value)
+{
+    StandardSetting::setValue(value?"1":"0");
+    emit valueChanged(value);
+}
+
+void MythUICheckBoxSetting::updateButton(MythUIButtonListItem *item)
+{
+    StandardSetting::updateButton(item);
+    item->DisplayState("checkbox", "widgettype");
+    item->setCheckable (true);
+    item->SetText("","value");
+    if (m_settingValue=="1")
+        item->setChecked(MythUIButtonListItem::FullChecked);
+    else
+        item->setChecked(MythUIButtonListItem::NotChecked);
+}
+
+void MythUICheckBoxSetting::edit(MythScreenType * screen)
+{
+    if (!isEnabled())return;
+    DialogCompletionEvent *dce =
+            new DialogCompletionEvent("editsetting", 0, "", "");
+    QCoreApplication::postEvent(screen, dce);
+}
+
+void MythUICheckBoxSetting::resultEdit(DialogCompletionEvent *dce)
+{
+    setValue(!boolValue());
+}
+
+/*******************************************************************************
+                           Standard setting dialog
+********************************************************************************/
+
+StandardSettingDialog::StandardSettingDialog(MythScreenStack *parent, const char *name) :
+    MythScreenType(parent, name),
+    m_buttonList(0),
+    m_title(0),
+    m_groupHelp(0),
+    m_selectedSettingHelp(0),
+    m_menuPopup(0),
+    m_settingsTree(0),
+    m_currentGroupSetting(0)
+{
+}
+
+StandardSettingDialog::~StandardSettingDialog()
+{
+    //LOG(VB_GENERAL, LOG_ERR, "StandardSettingDialog::~StandardSettingDialog()");
+    if (m_settingsTree!=0)
+        m_settingsTree->deleteLater();
+}
+
+bool StandardSettingDialog::Create(void)
+{
+    if (!LoadWindowFromXML("standardsetting-ui.xml", "settingssetup", this))
+        return false;
+
+    bool error=false;
+    UIUtilE::Assign(this, m_title, "title",&error);
+    UIUtilW::Assign(this, m_groupHelp, "grouphelp",&error);
+    UIUtilE::Assign(this, m_buttonList,"settingslist",&error);
+
+    UIUtilW::Assign(this, m_selectedSettingHelp, "selectedsettinghelp");
+
+    connect(m_buttonList,SIGNAL(itemSelected(MythUIButtonListItem*)), 
+        this,SLOT(settingSelected(MythUIButtonListItem*)));
+    connect(m_buttonList,SIGNAL(itemClicked(MythUIButtonListItem*)), 
+        this,SLOT(settingClicked(MythUIButtonListItem*)));
+
+    if (error)
+    {
+        LOG(VB_GENERAL, LOG_ERR, "error.");
+        return false;
+    }
+    BuildFocusList();
+
+    return true;
+}
+
+void StandardSettingDialog::settingSelected(MythUIButtonListItem *item)
+{ 
+    if (!item)return;
+
+    StandardSetting * setting = qVariantValue<StandardSetting*>(item->GetData());
+    if (setting && m_selectedSettingHelp)
+    {
+        m_selectedSettingHelp->SetText(setting->getHelpText());
+        if (m_selectedSettingHelp->GetText().isEmpty()) m_selectedSettingHelp->SetText("This setting need a description");
+    }
+}
+
+void StandardSettingDialog::settingClicked(MythUIButtonListItem *item)
+{
+    StandardSetting* setting = item->GetData().value<StandardSetting*>();
+    if (setting)
+    {
+        setting->edit(this);
+    }
+}
+
+void StandardSettingDialog::customEvent(QEvent *event)
+{
+    if (event->type() == DialogCompletionEvent::kEventType)
+    {
+        DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
+        QString resultid  = dce->GetId();
+
+        if (resultid == "leveldown")
+        {
+            //a GroupSetting have been clicked
+            LevelDown();
+        }
+        else if (resultid == "editsetting")
+        {
+            MythUIButtonListItem * item = m_buttonList->GetItemCurrent();
+            if (item)
+            {
+                StandardSetting * ss = item->GetData().value<StandardSetting*>();
+                if (ss)
+                {
+                    ss->resultEdit(dce);
+                }
+            }
+        }
+        else if (resultid == "exit")
+        {
+            int buttonnum = dce->GetResult();
+            if (buttonnum == 0)
+            {
+                Save();
+                MythScreenType::Close();
+                if (m_settingsTree)
+                    m_settingsTree->applyChange();
+            }
+            else if (buttonnum == 1)
+                MythScreenType::Close();
+        }
+    }
+}
+
+void StandardSettingDialog::loadSettings(GroupSetting * groupSettings)
+{
+    //TODO I  probably should do this in the background ?
+    m_settingsTree=groupSettings;
+    if (m_settingsTree)
+        m_settingsTree->Load();
+
+    setCurrentGroupSetting(m_settingsTree);
+}
+
+void StandardSettingDialog::setCurrentGroupSetting(StandardSetting * groupSettings, 
+        StandardSetting * selectedSetting )
+{
+    if (!groupSettings) return;
+
+    if (m_currentGroupSetting)
+    {
+        disconnect(m_currentGroupSetting, SIGNAL(settingsChanged(StandardSetting *)), 0, 0);
+        m_currentGroupSetting->Close();
+    }
+
+    m_currentGroupSetting=groupSettings;
+
+    m_currentGroupSetting->Open();
+
+
+    m_title->SetText(m_currentGroupSetting->getLabel());
+    if (m_title->GetText().isEmpty()) m_title->SetText("This group need a title");
+    if (m_groupHelp)
+    {
+        m_groupHelp->SetText(m_currentGroupSetting->getHelpText());
+        if (m_groupHelp->GetText().isEmpty()) m_groupHelp->SetText("This group need a description");
+    }
+    updateSettings(selectedSetting);
+    connect(m_currentGroupSetting, SIGNAL(settingsChanged(StandardSetting *)), this, SLOT(updateSettings(StandardSetting *)));
+
+}
+
+void StandardSettingDialog::updateSettings(StandardSetting * selectedSetting)
+{
+    m_buttonList->Reset();
+    if (!m_currentGroupSetting->haveSubSettings())return;
+    QList<StandardSetting *> * settings = m_currentGroupSetting->getSubSettings();
+    if (settings==NULL ) return;
+    QList<StandardSetting *>::const_iterator i;
+    MythUIButtonListItem *selectedItem=0;
+    for (i = settings->constBegin(); i != settings->constEnd(); ++i)
+    {
+        if (selectedSetting == (*i))
+            selectedItem =(*i)->createButton(m_buttonList);
+        else
+            (*i)->createButton(m_buttonList);
+    }
+    if (selectedItem)
+        m_buttonList->SetItemCurrent(selectedItem);
+    settingSelected(m_buttonList->GetItemCurrent());
+}
+
+void StandardSettingDialog::Save()
+{
+    if (m_settingsTree)
+        m_settingsTree->Save();
+}
+
+void StandardSettingDialog::LevelUp()
+{
+    if (!m_currentGroupSetting) return;
+    if (m_currentGroupSetting->getParent())
+    {
+        setCurrentGroupSetting(m_currentGroupSetting->getParent(),
+                    m_currentGroupSetting);
+    }
+}
+
+void StandardSettingDialog::LevelDown()
+{
+    MythUIButtonListItem * item = m_buttonList->GetItemCurrent();
+    if (item)
+    {
+        StandardSetting * ss = item->GetData().value<StandardSetting*>();
+        if (ss && ss->haveSubSettings() && ss->isEnabled())
+            setCurrentGroupSetting(ss);
+    }
+}
+
+void StandardSettingDialog::Close(void)
+{
+    if (m_settingsTree->haveChanged())
+    {
+        QString label = tr("Exit ?");
+
+        MythScreenStack *popupStack =
+                                GetMythMainWindow()->GetStack("popup stack");
+
+        MythDialogBox * m_menuPopup =
+                new MythDialogBox(label, popupStack, "exitmenu");
+
+        if (m_menuPopup->Create())
+            popupStack->AddScreen(m_menuPopup);
+
+        m_menuPopup->SetReturnEvent(this, "exit");
+
+        m_menuPopup->AddButton(tr("Save then Exit"));
+        m_menuPopup->AddButton(tr("Exit without saving changes"));
+        m_menuPopup->AddButton(tr("Cancel"));
+    }
+    else
+        MythScreenType::Close();
+}
+
+
+bool StandardSettingDialog::keyPressEvent(QKeyEvent *e)
+{
+    QStringList actions;
+    bool handled = m_buttonList->keyPressEvent(e);
+    if (handled) return true;
+    handled = GetMythMainWindow()->TranslateKeyPress("Global", e, actions);
+
+    //send the key to the selected Item first
+    MythUIButtonListItem * item = m_buttonList->GetItemCurrent();
+    if (item)
+    {
+        StandardSetting * ss = item->GetData().value<StandardSetting*>();
+        if (ss)
+        {
+            handled = ss->keyPressEvent(e);
+        }
+    }
+    if (handled) return true;
+
+    for (int i = 0; i < actions.size() && !handled; i++)
+    {
+        QString action = actions[i];
+        handled = true;
+
+        if (action == "LEFT")
+        {
+            if (m_currentGroupSetting 
+                && m_currentGroupSetting==m_settingsTree)
+                Close();
+            else
+                LevelUp();
+        }
+        else if (action == "RIGHT")
+            LevelDown();
+        else
+            handled = MythScreenType::keyPressEvent(e);
+    }
+
+    return handled;
+}
+
+
+
+
+
diff --git a/mythtv/libs/libmyth/standardsettings.h b/mythtv/libs/libmyth/standardsettings.h
new file mode 100755
index 0000000..80a9764
--- /dev/null
+++ b/mythtv/libs/libmyth/standardsettings.h
@@ -0,0 +1,412 @@
+#ifndef STANDARDSETTINGS_H_
+#define STANDARDSETTINGS_H_
+
+#include "mythuibuttonlist.h"
+#include <mythdialogbox.h>
+#include <mythuibuttontree.h>
+#include <mythgenerictree.h>
+#include <QMap>
+#include "settings.h"
+
+#include "mythlogging.h"
+
+class StandardSetting;
+
+class MythUIButtonListItemSetting : public QObject, public MythUIButtonListItem 
+{
+    Q_OBJECT
+  public:
+        MythUIButtonListItemSetting (MythUIButtonList *lbtype, const QString &text)
+            :MythUIButtonListItem(lbtype,text){}
+  public slots:
+    void ShouldUpdate(StandardSetting *setting);
+};
+
+class MPUBLIC StandardSetting : public QObject, public StorageUser
+{
+    Q_OBJECT
+
+  public:
+    virtual void setLabel(QString str) { m_label = str; }
+    QString getLabel(void) const { return m_label; }
+
+    virtual void setHelpText(const QString &str) { m_helptext = str; }
+    QString getHelpText(void) const { return m_helptext; }
+
+
+/*    bool isVisible(void) const { return m_visible; };*/
+    bool isEnabled() const { return m_enabled; }
+    bool haveChanged();
+    StandardSetting * getParent() const {return m_parent;};
+
+    // Gets
+    virtual QString getValue(void) const {return m_settingValue;}
+
+    virtual void updateButton(MythUIButtonListItem *item);
+
+    // StorageUser
+    void SetDBValue(const QString &val) { setValue(val); }
+    QString GetDBValue(void) const { return getValue(); }
+
+    //added by xavier
+
+    MythUIButtonListItem * createButton(MythUIButtonList * list);
+    //subsettings
+    virtual void addChild(StandardSetting *child);
+    virtual QList<StandardSetting *> *getSubSettings();
+    virtual bool haveSubSettings();
+    virtual void clearSettings();
+
+
+    virtual void edit(MythScreenType * screen)=0;
+    virtual void resultEdit(DialogCompletionEvent *dce)=0;
+
+    virtual void Load(void);
+    virtual void Save(void);
+
+    virtual void Open(void){};
+    virtual void Close(void){};
+
+    Storage *GetStorage(void) const { return m_storage; }
+
+    void addTargetedChild(const QString &value, StandardSetting * setting);
+
+    //not sure I want to do that yet
+    virtual bool keyPressEvent(QKeyEvent *);
+
+  public slots:
+    virtual void setEnabled(bool b);
+    void setVisible(bool b) { m_visible = b; };
+    virtual void setValue(const QString &newValue);
+    virtual void childChanged(StandardSetting *){};
+
+  signals:
+    void valueChanged(const QString &);
+    void valueChanged(StandardSetting *);
+    void ShouldRedraw(StandardSetting *);
+    void settingsChanged(StandardSetting * selectedSetting = NULL);
+
+  protected:
+    StandardSetting(Storage *_storage);
+    virtual ~StandardSetting();
+    void setParent(StandardSetting *parent);
+    QString m_settingValue;
+    bool m_enabled;
+    QString m_label;
+    QString m_helptext;
+    bool m_visible;
+  private:
+    bool m_haveChanged;
+    Storage *m_storage;
+    StandardSetting * m_parent;
+    QList<StandardSetting *> m_children;
+    QMap<QString, QList<StandardSetting *> > m_targets;
+};
+
+
+/*******************************************************************************
+*                           TextEdit Setting                                   *
+*******************************************************************************/
+
+
+class MPUBLIC MythUITextEditSetting : public StandardSetting
+{
+  public:
+    virtual void resultEdit(DialogCompletionEvent *dce);
+    virtual void edit(MythScreenType * screen);
+    virtual void updateButton(MythUIButtonListItem *item);
+  protected:
+    MythUITextEditSetting (Storage *_storage);
+    
+};
+
+
+class MPUBLIC TransTextEditSetting: public MythUITextEditSetting, public TransientStorage
+{
+  public:
+    TransTextEditSetting() :
+        MythUITextEditSetting(this), TransientStorage() { }
+
+    //Don't want to have to do that but cannot think of a work around
+    /*virtual void Load(){MythUITextEditSetting::Load();}
+    virtual void Save(){MythUITextEditSetting::Save();}*/
+};
+
+
+class MPUBLIC HostTextEditSetting: public MythUITextEditSetting, public HostDBStorage
+{
+  public:
+    HostTextEditSetting(const QString &name) :
+        MythUITextEditSetting(this), HostDBStorage(this, name) { }
+
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){HostDBStorage::Load();MythUITextEditSetting::Load();}
+    virtual void Save(){HostDBStorage::Save();MythUITextEditSetting::Save();}
+};
+
+
+/*******************************************************************************
+*                           Directory Setting                                  *
+*******************************************************************************/
+
+
+class MPUBLIC MythUIFileBrowserSetting : public StandardSetting
+{
+  public:
+    virtual void resultEdit(DialogCompletionEvent *dce);
+    virtual void edit(MythScreenType * screen);
+    virtual void updateButton(MythUIButtonListItem *item);
+    void SetTypeFilter(QDir::Filters filter) { m_typeFilter = filter; };
+    void SetNameFilter(QStringList filter) { m_nameFilter = filter; };
+  protected:
+    MythUIFileBrowserSetting (Storage *_storage);
+    QDir::Filters      m_typeFilter;
+    QStringList        m_nameFilter;
+    
+};
+
+
+class MPUBLIC HostFileBrowserSetting: public MythUIFileBrowserSetting, public HostDBStorage
+{
+  public:
+    HostFileBrowserSetting(const QString &name) :
+        MythUIFileBrowserSetting(this), HostDBStorage(this, name) { }
+
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){HostDBStorage::Load();MythUIFileBrowserSetting::Load();}
+    virtual void Save(){HostDBStorage::Save();MythUIFileBrowserSetting::Save();}
+};
+
+
+/*******************************************************************************
+*                           ComboBox Setting                                   *
+*******************************************************************************/
+//TODO implement rw=true
+class MPUBLIC MythUIComboBoxSetting : public StandardSetting
+{
+  Q_OBJECT
+  public:
+    void setValue(int value);
+    virtual void resultEdit(DialogCompletionEvent *dce);
+    virtual void edit(MythScreenType * screen);
+    void addSelection(const QString &label, QString value = QString::null, bool select = false);
+    void clearSelections();
+    virtual void updateButton(MythUIButtonListItem *item);
+    virtual void Load();
+  public slots:
+    void setValue(const QString&);
+  protected:
+    MythUIComboBoxSetting (Storage *_storage, bool rw = false);
+    ~MythUIComboBoxSetting();
+    QVector<QString> m_labels;
+    QVector<QString> m_values;
+
+  private:
+    bool m_rewrite;
+    bool m_isSet;
+    
+};
+
+class MPUBLIC HostComboBoxSetting: public MythUIComboBoxSetting, public HostDBStorage
+{
+  public:
+    HostComboBoxSetting(const QString &name, bool rw = false) :
+        MythUIComboBoxSetting(this, rw), HostDBStorage(this, name) { }
+
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){HostDBStorage::Load();MythUIComboBoxSetting::Load();};
+    virtual void Save(){HostDBStorage::Save();MythUIComboBoxSetting::Save();};
+};
+
+
+class MPUBLIC GlobalComboBoxSetting: public MythUIComboBoxSetting, public GlobalDBStorage
+{
+  public:
+    GlobalComboBoxSetting(const QString &name, bool rw = false) :
+        MythUIComboBoxSetting(this, rw), GlobalDBStorage(this, name) { }
+
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){GlobalDBStorage::Load();MythUIComboBoxSetting::Load();}
+    virtual void Save(){GlobalDBStorage::Save();MythUIComboBoxSetting::Save();}
+};
+
+/*******************************************************************************
+*                           SpinBox Setting                                    *
+*******************************************************************************/
+
+
+class MPUBLIC MythUISpinBoxSetting : public MythUIComboBoxSetting
+{
+  public:
+    //void setValue(int value);
+    int intValue();
+    virtual void resultEdit(DialogCompletionEvent *dce);
+    virtual void edit(MythScreenType * screen);
+    virtual void updateButton(MythUIButtonListItem *item);
+  protected:
+    MythUISpinBoxSetting (Storage *_storage, int min, int max, int step, bool allow_single_step);
+  private:
+    int m_min;
+    int m_max;
+    int m_step;
+    bool m_allow_single_step;
+    
+};
+
+class MPUBLIC TransMythUISpinBoxSetting: public MythUISpinBoxSetting, public TransientStorage
+{
+  public:
+    TransMythUISpinBoxSetting(int min, int max, int step, bool allow_single_step=false) :
+        MythUISpinBoxSetting(this, min, max, step, allow_single_step), TransientStorage() { }
+
+    //Don't want to have to do that but cannot think of a work around
+    /*virtual void Load(){MythUISpinBoxSetting::Load();}
+    virtual void Save(){MythUISpinBoxSetting::Save();}*/
+};
+
+class MPUBLIC HostSpinBoxSetting: public MythUISpinBoxSetting, public HostDBStorage
+{
+  public:
+    HostSpinBoxSetting(const QString &name, int min, int max, int step, bool allow_single_step=false) :
+        MythUISpinBoxSetting(this, min, max, step, allow_single_step), HostDBStorage(this, name) { }
+
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){HostDBStorage::Load();MythUISpinBoxSetting::Load();}
+    virtual void Save(){HostDBStorage::Save();MythUISpinBoxSetting::Save();}
+};
+
+class MPUBLIC GlobalSpinBoxSetting: public MythUISpinBoxSetting, public GlobalDBStorage
+{
+  public:
+    GlobalSpinBoxSetting(const QString &name, int min, int max, int step, bool allow_single_step=false) :
+        MythUISpinBoxSetting(this, min, max, step, allow_single_step), GlobalDBStorage(this, name) { }
+
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){GlobalDBStorage::Load();MythUISpinBoxSetting::Load();}
+    virtual void Save(){GlobalDBStorage::Save();MythUISpinBoxSetting::Save();}
+};
+
+/*******************************************************************************
+*                           CheckBox Setting                                   *
+*******************************************************************************/
+
+class MPUBLIC MythUICheckBoxSetting : public StandardSetting
+{
+    Q_OBJECT
+  public:
+    virtual void resultEdit(DialogCompletionEvent *dce);
+    virtual void edit(MythScreenType * screen);
+    virtual void updateButton(MythUIButtonListItem *item);
+    virtual void setValue(const QString&);
+    virtual void setValue(bool value);
+    bool boolValue();
+  signals:
+    void valueChanged(bool);
+  protected:
+    MythUICheckBoxSetting (Storage *_storage);
+    
+};
+
+class MPUBLIC TransMythUICheckBoxSetting: public MythUICheckBoxSetting, public TransientStorage
+{
+  public:
+    TransMythUICheckBoxSetting() :
+        MythUICheckBoxSetting(this), TransientStorage() { }
+    //Don't want to have to do that but cannot think of a work around
+    /*virtual void Load(){MythUICheckBoxSetting::Load();HostDBStorage::Load();}
+    virtual void Save(){MythUICheckBoxSetting::Save();HostDBStorage::Save();}*/
+};
+
+class MPUBLIC HostCheckBoxSetting: public MythUICheckBoxSetting, public HostDBStorage
+{
+  public:
+    HostCheckBoxSetting(const QString &name) :
+        MythUICheckBoxSetting(this), HostDBStorage(this, name) { }
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){HostDBStorage::Load();MythUICheckBoxSetting::Load();}
+    virtual void Save(){HostDBStorage::Save();MythUICheckBoxSetting::Save();}
+};
+
+class MPUBLIC GlobalCheckBoxSetting: public MythUICheckBoxSetting, public GlobalDBStorage
+{
+  public:
+    GlobalCheckBoxSetting(const QString &name) :
+        MythUICheckBoxSetting(this), GlobalDBStorage(this, name) { }
+    //Don't want to have to do that but cannot think of a work around
+    virtual void Load(){GlobalDBStorage::Load();MythUICheckBoxSetting::Load();}
+    virtual void Save(){GlobalDBStorage::Save();MythUICheckBoxSetting::Save();}
+};
+
+/*******************************************************************************
+*                              Group Setting                                   *
+*******************************************************************************/
+
+class MPUBLIC GroupSetting : public StandardSetting, public TransientStorage
+{
+  public:
+    GroupSetting();
+
+    virtual void Load(void){StandardSetting::Load();};
+    virtual void Save(void){StandardSetting::Save();};
+    virtual void edit(MythScreenType * screen);
+    virtual void resultEdit(DialogCompletionEvent *){};
+    virtual void applyChange(){};
+    virtual void updateButton(MythUIButtonListItem *item);
+};
+
+class MPUBLIC ButtonStandardSetting : public StandardSetting, public TransientStorage
+{
+    Q_OBJECT
+  public:
+    ButtonStandardSetting(const QString &);
+    virtual void Load(void){StandardSetting::Load();};
+    virtual void Save(void){StandardSetting::Save();};
+    virtual void edit(MythScreenType * screen);
+    virtual void resultEdit(DialogCompletionEvent *){};
+  signals:
+    void clicked();
+};
+
+/*******************************************************************************
+*                            Standard Dialog Setting                            *
+*******************************************************************************/
+
+class MPUBLIC StandardSettingDialog : public MythScreenType
+{
+    Q_OBJECT
+
+  public:
+
+    StandardSettingDialog(MythScreenStack *parent, const char *name);
+    virtual ~StandardSettingDialog();
+    bool Create(void);
+    void loadSettings(GroupSetting * groupSettings);
+    virtual void customEvent(QEvent *event);
+    virtual bool keyPressEvent(QKeyEvent *);
+  public slots:
+    void Close(void);
+    void updateSettings(StandardSetting * selectedSetting = NULL);
+  protected:
+
+    MythUIButtonList *m_buttonList;
+  private slots:
+    void settingSelected(MythUIButtonListItem *item);
+    void settingClicked(MythUIButtonListItem *item);
+  private:
+    void LevelUp();
+    void LevelDown();
+    void setCurrentGroupSetting(StandardSetting * groupSettings,StandardSetting * selectedSetting=0);
+    void Save();
+    MythUIText      *m_title;
+    MythUIText      *m_groupHelp;
+    MythUIText      *m_selectedSettingHelp;
+    MythDialogBox   *m_menuPopup;
+    GroupSetting    *m_settingsTree;
+    StandardSetting *m_currentGroupSetting;
+    bool m_loaded;
+};
+
+Q_DECLARE_METATYPE(StandardSetting *);
+
+
+#endif
