diff --git a/mythtv/libs/libmythui/mythgenerictree.h b/mythtv/libs/libmythui/mythgenerictree.h
index 5333e1f..15f6073 100644
--- a/mythtv/libs/libmythui/mythgenerictree.h
+++ b/mythtv/libs/libmythui/mythgenerictree.h
@@ -123,12 +123,14 @@ class MUI_PUBLIC MythGenericTree
 
     virtual MythUIButtonListItem *CreateListButton(MythUIButtonList *list);
 
+  protected:
+    QMap<QString, TextProperties> m_strings;
+    QMap<QString, QString> m_imageFilenames;
   private:
     void reorderSubnodes(void);
 
     QString m_text;
-    QMap<QString, TextProperties> m_strings;
-    QMap<QString, QString> m_imageFilenames;
+
     QMap<QString, QString> m_states;
     int m_int;
     QVariant m_data;
diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
index a379b8f..f1ffc15 100644
--- a/mythtv/programs/mythfrontend/globalsettings.cpp
+++ b/mythtv/programs/mythfrontend/globalsettings.cpp
@@ -7,6 +7,10 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+//use by fabs I believe
+#include <algorithm>
+#include <cmath>
+
 // Qt headers
 #include <QCoreApplication>
 #include <QEvent>
@@ -24,7 +28,7 @@
 #include "mythcorecontext.h"
 #include "mythdbcon.h"
 #include "mythlogging.h"
-#include "dbsettings.h"
+//#include "dbsettings.h"
 #include "mythtranslation.h"
 #include "iso639.h"
 #include "playbackbox.h"
@@ -39,9 +43,265 @@
 #include "mythdirs.h"
 #include "mythuihelper.h"
 
-static HostCheckBox *DecodeExtraAudio()
+/* This class have been copied from settingdb.h/.cpp and modified
+ I believe this is also used by mythtv-setup so
+I did not want to break it by modifying the original*/
+class MythDbSettings: public GroupSetting {
+public:
+    MythDbSettings();
+
+    void Load(void);
+    void Save(void);
+
+protected:
+    TransLineEditTree *dbHostName;
+    TransCheckBoxTree    *dbHostPing;
+    TransLineEditTree *dbPort;
+    TransLineEditTree *dbName;
+    TransLineEditTree *dbUserName;
+    TransLineEditTree *dbPassword;
+    TransCheckBoxTree    *localEnabled;
+    TransLineEditTree *localHostName;
+    TransCheckBoxTree    *wolEnabled;
+    TransSpinBoxTree   *wolReconnect;
+    TransSpinBoxTree   *wolRetry;
+    TransLineEditTree *wolCommand;
+}; 
+
+
+
+MythDbSettings::MythDbSettings() :
+    GroupSetting()
+{
+
+    setLabel(QObject::tr("Database Configuration"));
+
+    MSqlQuery query(MSqlQuery::InitCon());
+    if (query.isConnected())
+        setHelpText(QObject::tr("All database settings take effect when "
+                                   "you restart this program."));
+    else
+        setHelpText(QObject::tr("MythTV could not connect to the database. "
+                                   "Please verify your database settings "
+                                   "below."));
+
+    GroupSetting* dbServer = new GroupSetting();
+    dbServer->setLabel(QObject::tr("Database Server Settings"));
+    dbHostName = new TransLineEditTree();
+    dbHostName->setLabel(QObject::tr("Hostname"));
+    dbHostName->setHelpText(QObject::tr("The host name or IP address of "
+                                        "the machine hosting the database. "
+                                        "This information is required."));
+    dbServer->addChild(dbHostName);
+
+
+    dbHostPing = new TransCheckBoxTree();
+    dbHostPing->setLabel(QObject::tr("Ping test server?"));
+    dbHostPing->setHelpText(QObject::tr("Test basic host connectivity using "
+                                        "the ping command. Turn off if your "
+                                        "host or network don't support ping "
+                                        "(ICMP ECHO) packets"));
+    dbServer->addChild(dbHostPing);
+
+
+    dbPort = new TransLineEditTree();
+    dbPort->setLabel(QObject::tr("Port"));
+    dbPort->setHelpText(QObject::tr("The port number the database is running "
+                                    "on.  Leave blank if using the default "
+                                    "port (3306)."));
+    dbServer->addChild(dbPort);
+
+    dbName = new TransLineEditTree();
+    dbName->setLabel(QObject::tr("Database name"));
+    dbName->setHelpText(QObject::tr("The name of the database. "
+                                    "This information is required."));
+    dbServer->addChild(dbName);
+
+    dbUserName = new TransLineEditTree();
+    dbUserName->setLabel(QObject::tr("User"));
+    dbUserName->setHelpText(QObject::tr("The user name to use while "
+                                        "connecting to the database. "
+                                        "This information is required."));
+    dbServer->addChild(dbUserName);
+
+    dbPassword = new TransLineEditTree();
+    dbPassword->setLabel(QObject::tr("Password"));
+    dbPassword->setHelpText(QObject::tr("The password to use while "
+                                        "connecting to the database. "
+                                        "This information is required."));
+    dbServer->addChild(dbPassword);
+
+    addChild(dbServer);
+
+    localEnabled = new TransCheckBoxTree();
+    localEnabled->setLabel(QObject::tr("Use custom identifier for frontend "
+                                       "preferences"));
+    localEnabled->setHelpText(QObject::tr("If this frontend's host name "
+                                          "changes often, check this box "
+                                          "and provide a network-unique "
+                                          "name to identify it. "
+                                          "If unchecked, the frontend "
+                                          "machine's local host name will "
+                                          "be used to save preferences in "
+                                          "the database."));
+
+    localHostName = new TransLineEditTree(true);
+    localHostName->setLabel(QObject::tr("Custom identifier"));
+    localHostName->setHelpText(QObject::tr("An identifier to use while "
+                                           "saving the settings for this "
+                                           "frontend."));
+    localEnabled->addChild(true, localHostName);
+
+    wolEnabled = new TransCheckBoxTree();
+    wolEnabled->setLabel(QObject::tr("Enable database server wakeup"));
+    wolEnabled->setHelpText(QObject::tr("If enabled, the frontend will use "
+                                        "database wakeup parameters to "
+                                        "reconnect to the database server."));
+
+    wolReconnect = new TransSpinBoxTree(0, 60, 1, true);
+    wolReconnect->setLabel(QObject::tr("Reconnect time"));
+    wolReconnect->setHelpText(QObject::tr("The time in seconds to wait for "
+                                          "the server to wake up."));
+
+    wolEnabled->addChild(true, wolReconnect);
+
+    wolRetry = new TransSpinBoxTree(1, 10, 1, true);
+    wolRetry->setLabel(QObject::tr("Retry attempts"));
+    wolRetry->setHelpText(QObject::tr("The number of retries to wake the "
+                                      "server before the frontend gives "
+                                      "up."));
+
+    wolEnabled->addChild(true, wolReconnect);
+
+    wolCommand = new TransLineEditTree(true);
+    wolCommand->setLabel(QObject::tr("Wake command"));
+    wolCommand->setHelpText(QObject::tr("The command executed on this "
+                                        "frontend to wake up the database "
+                                        "server (eg. sudo /etc/init.d/mysql "
+                                        "restart)."));
+
+    wolEnabled->addChild(true, wolCommand);
+
+    addChild(wolEnabled);
+}
+
+void MythDbSettings::Load(void)
+{
+    DatabaseParams params = gContext->GetDatabaseParams();
+
+    if (params.dbHostName.isEmpty() ||
+        params.dbUserName.isEmpty() ||
+        params.dbPassword.isEmpty() ||
+        params.dbName.isEmpty())
+        setHelpText(getHelpText() + "\n" +
+                       QObject::tr("Required fields are"
+                                   " marked with an asterisk (*)."));
+
+    if (params.dbHostName.isEmpty())
+    {
+        dbHostName->setLabel("* " + dbHostName->getLabel());
+//TODO?        dbHostName->setValue(m_DBhostOverride);
+    }
+    else
+        dbHostName->setValue(params.dbHostName);
+
+    dbHostPing->setValue(params.dbHostPing);
+
+    if (params.dbPort)
+        dbPort->setValue(QString::number(params.dbPort));
+
+    dbUserName->setValue(params.dbUserName);
+    if (params.dbUserName.isEmpty())
+        dbUserName->setLabel("* " + dbUserName->getLabel());
+    dbPassword->setValue(params.dbPassword);
+    if (params.dbPassword.isEmpty())
+        dbPassword->setLabel("* " + dbPassword->getLabel());
+    dbName->setValue(params.dbName);
+    if (params.dbName.isEmpty())
+        dbName->setLabel("* " + dbName->getLabel());
+
+    localEnabled->setValue(params.localEnabled);
+    localHostName->setValue(params.localHostName);
+
+    wolEnabled->setValue(params.wolEnabled);
+    wolReconnect->setValue(params.wolReconnect);
+    wolRetry->setValue(params.wolRetry);
+    wolCommand->setValue(params.wolCommand);
+}
+
+void MythDbSettings::Save(void)
+{
+    DatabaseParams params = gContext->GetDatabaseParams();
+
+    params.dbHostName    = dbHostName->getValue();
+    params.dbHostPing    = dbHostPing->boolValue();
+    params.dbPort        = dbPort->getValue().toInt();
+    params.dbUserName    = dbUserName->getValue();
+    params.dbPassword    = dbPassword->getValue();
+    params.dbName        = dbName->getValue();
+    params.dbType        = "QMYSQL";
+    params.localEnabled  = localEnabled->boolValue();
+    params.localHostName = localHostName->getValue();
+    params.wolEnabled    = wolEnabled->boolValue();
+    params.wolReconnect  = wolReconnect->intValue();
+    params.wolRetry      = wolRetry->intValue();
+    params.wolCommand    = wolCommand->getValue();
+
+    gContext->SaveDatabaseParams(params);
+}
+
+/* this class have been copied from HostRefreshRateComboBox in settings.h */
+
+
+
+void HostRefreshRateComboBoxTree::ChangeResolution(const QString& resolution)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("HostRefreshRateComboBoxTree::ChangeResolution()"));
+
+    clearSelections();
+
+    const vector<double> list = GetRefreshRates(resolution);
+    addSelection(QObject::tr("Any"), "0");
+    int hz50 = -1, hz60 = -1;
+    for (uint i=0; i<list.size(); ++i)
+    {
+        QString sel = QString::number((double) list[i],'f', 3);
+        addSelection(sel+" Hz", sel);
+        hz50 = (fabs(50.0 - list[i]) < 0.01) ? i : hz50;
+        hz60 = (fabs(60.0 - list[i]) < 0.01) ? i : hz60;
+    }
+
+    setValue(0);
+    if ("640x480" == resolution || "720x480" == resolution)
+        setValue(hz60+1);
+    if ("640x576" == resolution || "720x576" == resolution)
+        setValue(hz50+1);
+
+    setEnabled(list.size());
+}
+
+const vector<double> HostRefreshRateComboBoxTree::GetRefreshRates(const QString &res)
+{
+    QStringList slist = res.split("x");
+    int w = 0, h = 0;
+    bool ok0 = false, ok1 = false;
+    if (2 == slist.size())
+    {
+        w = slist[0].toInt(&ok0);
+        h = slist[1].toInt(&ok1);
+    }
+
+    DisplayRes *display_res = DisplayRes::GetDisplayRes();
+    if (display_res && ok0 && ok1)
+        return display_res->GetRefreshRates(w, h);
+
+    vector<double> list;
+    return list;
+}
+
+static HostCheckBoxTree *DecodeExtraAudio()
 {
-    HostCheckBox *gc = new HostCheckBox("DecodeExtraAudio");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("DecodeExtraAudio");
     gc->setLabel(QObject::tr("Extra audio buffering"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("Enable this setting if MythTV is playing "
@@ -53,9 +313,9 @@ static HostCheckBox *DecodeExtraAudio()
     return gc;
 }
 
-static HostComboBox *PIPLocationComboBox()
+static HostComboBoxTree *PIPLocationComboBox()
 {
-    HostComboBox *gc = new HostComboBox("PIPLocation");
+    HostComboBoxTree *gc = new HostComboBoxTree("PIPLocation");
     gc->setLabel(QObject::tr("PIP video location"));
     for (uint loc = 0; loc < kPIP_END; ++loc)
         gc->addSelection(toString((PIPLocation) loc), QString::number(loc));
@@ -63,9 +323,9 @@ static HostComboBox *PIPLocationComboBox()
     return gc;
 }
 
-static HostComboBox *DisplayRecGroup()
+static HostComboBoxTree *DisplayRecGroup()
 {
-    HostComboBox *gc = new HostComboBox("DisplayRecGroup");
+    HostComboBoxTree *gc = new HostComboBoxTree("DisplayRecGroup");
     gc->setLabel(QObject::tr("Default group filter to apply"));
 
     gc->addSelection(QObject::tr("All Programs"), QString("All Programs"));
@@ -102,9 +362,9 @@ static HostComboBox *DisplayRecGroup()
     return gc;
 }
 
-static HostCheckBox *QueryInitialFilter()
+static HostCheckBoxTree *QueryInitialFilter()
 {
-    HostCheckBox *gc = new HostCheckBox("QueryInitialFilter");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("QueryInitialFilter");
     gc->setLabel(QObject::tr("Always prompt for initial group filter"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, always prompt the user for the "
@@ -113,9 +373,9 @@ static HostCheckBox *QueryInitialFilter()
     return gc;
 }
 
-static HostCheckBox *RememberRecGroup()
+static HostCheckBoxTree *RememberRecGroup()
 {
-    HostCheckBox *gc = new HostCheckBox("RememberRecGroup");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("RememberRecGroup");
     gc->setLabel(QObject::tr("Save current group filter when changed"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, remember the last selected filter "
@@ -124,9 +384,9 @@ static HostCheckBox *RememberRecGroup()
     return gc;
 }
 
-static HostCheckBox *UseGroupNameAsAllPrograms()
+static HostCheckBoxTree *UseGroupNameAsAllPrograms()
 {
-    HostCheckBox *gc = new HostCheckBox("DispRecGroupAsAllProg");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("DispRecGroupAsAllProg");
     gc->setLabel(QObject::tr("Show filter name instead of \"All Programs\""));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, use the name of the display "
@@ -135,9 +395,9 @@ static HostCheckBox *UseGroupNameAsAllPrograms()
     return gc;
 }
 
-static HostCheckBox *PBBStartInTitle()
+static HostCheckBoxTree *PBBStartInTitle()
 {
-    HostCheckBox *gc = new HostCheckBox("PlaybackBoxStartInTitle");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("PlaybackBoxStartInTitle");
     gc->setLabel(QObject::tr("Start in group list"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, the focus will "
@@ -146,9 +406,9 @@ static HostCheckBox *PBBStartInTitle()
     return gc;
 }
 
-static HostCheckBox *SmartForward()
+static HostCheckBoxTree *SmartForward()
 {
-    HostCheckBox *gc = new HostCheckBox("SmartForward");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("SmartForward");
     gc->setLabel(QObject::tr("Smart fast forwarding"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, then immediately after "
@@ -157,9 +417,9 @@ static HostCheckBox *SmartForward()
     return gc;
 }
 
-static HostCheckBox *ExactSeeking()
+static HostCheckBoxTree *ExactSeeking()
 {
-    HostCheckBox *gc = new HostCheckBox("ExactSeeking");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("ExactSeeking");
     gc->setLabel(QObject::tr("Seek to exact frame"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, seeking is frame exact, but "
@@ -167,9 +427,9 @@ static HostCheckBox *ExactSeeking()
     return gc;
 }
 
-static GlobalComboBox *CommercialSkipMethod()
+static GlobalComboBoxTree *CommercialSkipMethod()
 {
-    GlobalComboBox *bc = new GlobalComboBox("CommercialSkipMethod");
+    GlobalComboBoxTree *bc = new GlobalComboBoxTree("CommercialSkipMethod");
     bc->setLabel(QObject::tr("Commercial detection method"));
     bc->setHelpText(QObject::tr(
                         "This determines the method used by MythTV to "
@@ -182,9 +442,9 @@ static GlobalComboBox *CommercialSkipMethod()
     return bc;
 }
 
-static GlobalCheckBox *CommFlagFast()
+static GlobalCheckBoxTree *CommFlagFast()
 {
-    GlobalCheckBox *gc = new GlobalCheckBox("CommFlagFast");
+    GlobalCheckBoxTree *gc = new GlobalCheckBoxTree("CommFlagFast");
     gc->setLabel(QObject::tr("Enable experimental speedup of commercial detection"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, experimental commercial detection "
@@ -192,9 +452,9 @@ static GlobalCheckBox *CommFlagFast()
     return gc;
 }
 
-static HostComboBox *AutoCommercialSkip()
+static HostComboBoxTree *AutoCommercialSkip()
 {
-    HostComboBox *gc = new HostComboBox("AutoCommercialSkip");
+    HostComboBoxTree *gc = new HostComboBoxTree("AutoCommercialSkip");
     gc->setLabel(QObject::tr("Automatically skip commercials"));
     gc->addSelection(QObject::tr("Off"), "0");
     gc->addSelection(QObject::tr("Notify, but do not skip"), "2");
@@ -206,9 +466,9 @@ static HostComboBox *AutoCommercialSkip()
     return gc;
 }
 
-static GlobalCheckBox *AutoMetadataLookup()
+static GlobalCheckBoxTree *AutoMetadataLookup()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("AutoMetadataLookup");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("AutoMetadataLookup");
     bc->setLabel(QObject::tr("Run metadata lookup"));
     bc->setValue(true);
     bc->setHelpText(QObject::tr("This is the default value used for the "
@@ -217,9 +477,9 @@ static GlobalCheckBox *AutoMetadataLookup()
     return bc;
 }
 
-static GlobalCheckBox *AutoCommercialFlag()
+static GlobalCheckBoxTree *AutoCommercialFlag()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("AutoCommercialFlag");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("AutoCommercialFlag");
     bc->setLabel(QObject::tr("Run commercial detection"));
     bc->setValue(true);
     bc->setHelpText(QObject::tr("This is the default value used for the "
@@ -228,9 +488,9 @@ static GlobalCheckBox *AutoCommercialFlag()
     return bc;
 }
 
-static GlobalCheckBox *AutoTranscode()
+static GlobalCheckBoxTree *AutoTranscode()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("AutoTranscode");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("AutoTranscode");
     bc->setLabel(QObject::tr("Run transcoder"));
     bc->setValue(false);
     bc->setHelpText(QObject::tr("This is the default value used for the "
@@ -239,21 +499,30 @@ static GlobalCheckBox *AutoTranscode()
     return bc;
 }
 
-static GlobalComboBox *DefaultTranscoder()
+static GlobalComboBoxTree *DefaultTranscoder()
 {
-    GlobalComboBox *bc = new GlobalComboBox("DefaultTranscoder");
-    bc->setLabel(QObject::tr("Default transcoder"));
+    GlobalComboBoxTree *ls = new GlobalComboBoxTree("DefaultTranscoder");
+    ls->setLabel(QObject::tr("Default transcoder"));
+    //begin hack, I did not want to change any code outside of mythfrontend 
+    GlobalComboBox *bc = new GlobalComboBox("DefaultTranscoder");   
     RecordingProfile::fillSelections(bc, RecordingProfile::TranscoderGroup,
-                                     true);
-    bc->setHelpText(QObject::tr("This is the default value used for the "
+                                     true); 
+    uint i;
+    for (i=0; i< bc->size(); i++)
+    {
+        ls->addSelection(bc->GetLabel(i),bc->GetValue(i));
+    }
+    delete bc;
+    //end hack
+    ls->setHelpText(QObject::tr("This is the default value used for the "
                     "transcoder setting when a new scheduled "
                     "recording is created."));
-    return bc;
+    return ls;
 }
 
-static GlobalSpinBox *DeferAutoTranscodeDays()
+static GlobalSpinBoxTree *DeferAutoTranscodeDays()
 {
-    GlobalSpinBox *gs = new GlobalSpinBox("DeferAutoTranscodeDays", 0, 365, 1);
+    GlobalSpinBoxTree *gs = new GlobalSpinBoxTree("DeferAutoTranscodeDays", 0, 365, 1);
     gs->setLabel(QObject::tr("Deferral days for auto transcode jobs"));
     gs->setHelpText(QObject::tr("If non-zero, automatic transcode jobs will "
                     "be scheduled to run this many days after a recording "
@@ -262,12 +531,12 @@ static GlobalSpinBox *DeferAutoTranscodeDays()
     return gs;
 }
 
-static GlobalCheckBox *AutoRunUserJob(uint job_num)
+static GlobalCheckBoxTree *AutoRunUserJob(uint job_num)
 {
     QString dbStr = QString("AutoRunUserJob%1").arg(job_num);
     QString label = QObject::tr("Run user job #%1")
         .arg(job_num);
-    GlobalCheckBox *bc = new GlobalCheckBox(dbStr);
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree(dbStr);
     bc->setLabel(label);
     bc->setValue(false);
     bc->setHelpText(QObject::tr("This is the default value used for the "
@@ -278,9 +547,9 @@ static GlobalCheckBox *AutoRunUserJob(uint job_num)
     return bc;
 }
 
-static GlobalCheckBox *AggressiveCommDetect()
+static GlobalCheckBoxTree *AggressiveCommDetect()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("AggressiveCommDetect");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("AggressiveCommDetect");
     bc->setLabel(QObject::tr("Strict commercial detection"));
     bc->setValue(true);
     bc->setHelpText(QObject::tr("Enable stricter commercial detection code. "
@@ -288,9 +557,9 @@ static GlobalCheckBox *AggressiveCommDetect()
     return bc;
 }
 
-static HostSpinBox *CommRewindAmount()
+static HostSpinBoxTree *CommRewindAmount()
 {
-    HostSpinBox *gs = new HostSpinBox("CommRewindAmount", 0, 10, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("CommRewindAmount", 0, 10, 1);
     gs->setLabel(QObject::tr("Commercial skip automatic rewind amount (secs)"));
     gs->setHelpText(QObject::tr("MythTV will automatically rewind "
                     "this many seconds after performing a commercial skip."));
@@ -298,9 +567,9 @@ static HostSpinBox *CommRewindAmount()
     return gs;
 }
 
-static HostSpinBox *CommNotifyAmount()
+static HostSpinBoxTree *CommNotifyAmount()
 {
-    HostSpinBox *gs = new HostSpinBox("CommNotifyAmount", 0, 10, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("CommNotifyAmount", 0, 10, 1);
     gs->setLabel(QObject::tr("Commercial skip notify amount (secs)"));
     gs->setHelpText(QObject::tr("MythTV will act like a commercial "
                     "begins this many seconds early. This can be useful "
@@ -310,9 +579,9 @@ static HostSpinBox *CommNotifyAmount()
     return gs;
 }
 
-static GlobalSpinBox *MaximumCommercialSkip()
+static GlobalSpinBoxTree *MaximumCommercialSkip()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("MaximumCommercialSkip", 0, 3600, 10);
     bs->setLabel(QObject::tr("Maximum commercial skip (secs)"));
     bs->setHelpText(QObject::tr("MythTV will discourage long manual commercial "
                     "skips. Skips which are longer than this will require the "
@@ -322,9 +591,9 @@ static GlobalSpinBox *MaximumCommercialSkip()
     return bs;
 }
 
-static GlobalSpinBox *MergeShortCommBreaks()
+static GlobalSpinBoxTree *MergeShortCommBreaks()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("MergeShortCommBreaks", 0, 3600, 5);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("MergeShortCommBreaks", 0, 3600, 5);
     bs->setLabel(QObject::tr("Merge short commercial breaks (secs)"));
     bs->setHelpText(QObject::tr("Treat consecutive commercial breaks shorter "
                     "than this as one break when skipping forward. Useful if "
@@ -334,9 +603,9 @@ static GlobalSpinBox *MergeShortCommBreaks()
     return bs;
 }
 
-static GlobalSpinBox *AutoExpireExtraSpace()
+static GlobalSpinBoxTree *AutoExpireExtraSpace()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireExtraSpace", 0, 200, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("AutoExpireExtraSpace", 0, 200, 1);
     bs->setLabel(QObject::tr("Extra disk space (GB)"));
     bs->setHelpText(QObject::tr("Extra disk space (in gigabytes) beyond what "
                     "MythTV requires that you want to keep free on the "
@@ -345,20 +614,9 @@ static GlobalSpinBox *AutoExpireExtraSpace()
     return bs;
 };
 
-static GlobalCheckBox *AutoExpireInsteadOfDelete()
+static GlobalSpinBoxTree *DeletedMaxAge()
 {
-    GlobalCheckBox *cb = new GlobalCheckBox("AutoExpireInsteadOfDelete");
-    cb->setLabel(QObject::tr("Auto-Expire instead of delete recording"));
-    cb->setValue(false);
-    cb->setHelpText(QObject::tr("If enabled, move deleted recordings to the "
-                    "'Deleted' recgroup and turn on autoexpire "
-                    "instead of deleting immediately."));
-    return cb;
-}
-
-static GlobalSpinBox *DeletedMaxAge()
-{
-    GlobalSpinBox *bs = new GlobalSpinBox("DeletedMaxAge", 0, 365, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("DeletedMaxAge", 0, 365, 1);
     bs->setLabel(QObject::tr("Deleted max age (days)"));
     bs->setHelpText(QObject::tr("When set to a number greater than zero, "
                     "Auto-Expire will force expiration of Deleted recordings "
@@ -367,9 +625,9 @@ static GlobalSpinBox *DeletedMaxAge()
     return bs;
 };
 
-static GlobalCheckBox *DeletedFifoOrder()
+static GlobalCheckBoxTree *DeletedFifoOrder()
 {
-    GlobalCheckBox *cb = new GlobalCheckBox("DeletedFifoOrder");
+    GlobalCheckBoxTree *cb = new GlobalCheckBoxTree("DeletedFifoOrder");
     cb->setLabel(QObject::tr("Expire in deleted order"));
     cb->setValue(false);
     cb->setHelpText(QObject::tr(
@@ -378,31 +636,22 @@ static GlobalCheckBox *DeletedFifoOrder()
     return cb;
 };
 
-class DeletedExpireOptions : public TriggeredConfigurationGroup
-{
-    public:
-     DeletedExpireOptions() :
-         TriggeredConfigurationGroup(false, false, false, false)
-         {
-             setLabel(QObject::tr("DeletedExpireOptions"));
-             Setting* enabled = AutoExpireInsteadOfDelete();
-             addChild(enabled);
-             setTrigger(enabled);
-
-             HorizontalConfigurationGroup* settings =
-                 new HorizontalConfigurationGroup(false);
-             settings->addChild(DeletedFifoOrder());
-             settings->addChild(DeletedMaxAge());
-             addTarget("1", settings);
-
-             // show nothing if fillEnabled is off
-             addTarget("0", new HorizontalConfigurationGroup(true));
-         };
-};
+static GlobalCheckBoxTree *AutoExpireInsteadOfDelete()
+{
+    GlobalCheckBoxTree *cb = new GlobalCheckBoxTree("AutoExpireInsteadOfDelete");
+    cb->setLabel(QObject::tr("Auto-Expire instead of delete recording"));
+    cb->setValue(false);
+    cb->setHelpText(QObject::tr("If enabled, move deleted recordings to the "
+                    "'Deleted' recgroup and turn on autoexpire "
+                    "instead of deleting immediately."));
+    cb->addChild(true, DeletedFifoOrder());
+    cb->addChild(true, DeletedMaxAge());
+    return cb;
+}
 
-static GlobalComboBox *AutoExpireMethod()
+static GlobalComboBoxTree *AutoExpireMethod()
 {
-    GlobalComboBox *bc = new GlobalComboBox("AutoExpireMethod");
+    GlobalComboBoxTree *bc = new GlobalComboBoxTree("AutoExpireMethod");
     bc->setLabel(QObject::tr("Auto-Expire method"));
     bc->addSelection(QObject::tr("Oldest show first"), "1");
     bc->addSelection(QObject::tr("Lowest priority first"), "2");
@@ -414,9 +663,9 @@ static GlobalComboBox *AutoExpireMethod()
     return bc;
 }
 
-static GlobalCheckBox *AutoExpireWatchedPriority()
+static GlobalCheckBoxTree *AutoExpireWatchedPriority()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireWatchedPriority");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("AutoExpireWatchedPriority");
     bc->setLabel(QObject::tr("Watched before unwatched"));
     bc->setValue(false);
     bc->setHelpText(QObject::tr("If enabled, programs that have been marked as "
@@ -425,9 +674,9 @@ static GlobalCheckBox *AutoExpireWatchedPriority()
     return bc;
 }
 
-static GlobalSpinBox *AutoExpireDayPriority()
+static GlobalSpinBoxTree *AutoExpireDayPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireDayPriority", 1, 400, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("AutoExpireDayPriority", 1, 400, 1);
     bs->setLabel(QObject::tr("Priority weight"));
     bs->setHelpText(QObject::tr("The number of days bonus a program gets for "
                     "each priority point. This is only used when the Weighted "
@@ -436,9 +685,9 @@ static GlobalSpinBox *AutoExpireDayPriority()
     return bs;
 };
 
-static GlobalCheckBox *AutoExpireDefault()
+static GlobalCheckBoxTree *AutoExpireDefault()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireDefault");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("AutoExpireDefault");
     bc->setLabel(QObject::tr("Auto-Expire default"));
     bc->setValue(true);
     bc->setHelpText(QObject::tr("If enabled, any new recording schedules "
@@ -447,9 +696,9 @@ static GlobalCheckBox *AutoExpireDefault()
     return bc;
 }
 
-static GlobalSpinBox *AutoExpireLiveTVMaxAge()
+static GlobalSpinBoxTree *AutoExpireLiveTVMaxAge()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireLiveTVMaxAge", 1, 365, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("AutoExpireLiveTVMaxAge", 1, 365, 1);
     bs->setLabel(QObject::tr("Live TV max age (days)"));
     bs->setHelpText(QObject::tr("Auto-Expire will force expiration of Live "
                     "TV recordings when they are this many days old. Live TV "
@@ -474,9 +723,9 @@ static GlobalSpinBox *MinRecordDiskThreshold()
 }
 #endif
 
-static GlobalCheckBox *RerecordWatched()
+static GlobalCheckBoxTree *RerecordWatched()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("RerecordWatched");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("RerecordWatched");
     bc->setLabel(QObject::tr("Re-record watched"));
     bc->setValue(false);
     bc->setHelpText(QObject::tr("If enabled, programs that have been marked as "
@@ -485,9 +734,9 @@ static GlobalCheckBox *RerecordWatched()
     return bc;
 }
 
-static GlobalSpinBox *RecordPreRoll()
+static GlobalSpinBoxTree *RecordPreRoll()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("RecordPreRoll", 0, 600, 60, true);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("RecordPreRoll", 0, 600, 60, true);
     bs->setLabel(QObject::tr("Time to record before start of show "
                  "(secs)"));
     bs->setHelpText(QObject::tr("This global setting allows the recorder "
@@ -498,9 +747,9 @@ static GlobalSpinBox *RecordPreRoll()
     return bs;
 }
 
-static GlobalSpinBox *RecordOverTime()
+static GlobalSpinBoxTree *RecordOverTime()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("RecordOverTime", 0, 1800, 60, true);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("RecordOverTime", 0, 1800, 60, true);
     bs->setLabel(QObject::tr("Time to record past end of show (secs)"));
     bs->setValue(0);
     bs->setHelpText(QObject::tr("This global setting allows the recorder "
@@ -510,9 +759,9 @@ static GlobalSpinBox *RecordOverTime()
     return bs;
 }
 
-static GlobalComboBox *OverTimeCategory()
+static GlobalComboBoxTree *OverTimeCategory()
 {
-    GlobalComboBox *gc = new GlobalComboBox("OverTimeCategory");
+    GlobalComboBoxTree *gc = new GlobalComboBoxTree("OverTimeCategory");
     gc->setLabel(QObject::tr("Category of shows to be extended"));
     gc->setHelpText(QObject::tr("For a special category (e.g. "
                     "\"Sports event\"), request that shows be autoextended. "
@@ -535,9 +784,9 @@ static GlobalComboBox *OverTimeCategory()
     return gc;
 }
 
-static GlobalSpinBox *CategoryOverTime()
+static GlobalSpinBoxTree *CategoryOverTime()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("CategoryOverTime",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("CategoryOverTime",
                                           0, 180, 60, true);
     bs->setLabel(QObject::tr("Record past end of show (mins)"));
     bs->setValue(30);
@@ -548,13 +797,12 @@ static GlobalSpinBox *CategoryOverTime()
     return bs;
 }
 
-static VerticalConfigurationGroup *CategoryOverTimeSettings()
+static GroupSetting *CategoryOverTimeSettings()
 {
-    VerticalConfigurationGroup *vcg =
-        new VerticalConfigurationGroup(false, false);
+    GroupSetting *vcg =
+        new GroupSetting();
 
     vcg->setLabel(QObject::tr("Category record over-time"));
-    vcg->setUseLabel(true);
     vcg->addChild(OverTimeCategory());
     vcg->addChild(CategoryOverTime());
     return vcg;
@@ -580,53 +828,69 @@ static QString pad(const QString &str, int len)
     return tmp;
 }
 
-PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item) :
-    item(_item)
+PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item)
+    :GroupSetting(""),item(_item)
 {
-    setLabel(QObject::tr("Profile Item"));
+    QString andStr = QObject::tr("&", "and");
+    QString cmp0   = _item.Get("pref_cmp0");
+    QString cmp1   = _item.Get("pref_cmp1");
+    QString str    = QObject::tr("if rez") + ' ' + cmp0;
 
-    HorizontalConfigurationGroup *row[2];
+    if (!cmp1.isEmpty())
+        str += " " + andStr + ' ' + cmp1;
+
+    str += " -> ";
+    str += _item.Get("pref_decoder");
+    str += " " + andStr + ' ';
+    str += _item.Get("pref_videorenderer");
+    str.replace("-blit", "");
+    str.replace("ivtv " + andStr + " ivtv", "ivtv");
+    str.replace("xvmc " + andStr + " xvmc", "xvmc");
+    str.replace("xvmc", "XvMC");
+    str.replace("xv", "XVideo");
 
-    row[0]    = new HorizontalConfigurationGroup(false, false, true, true);
-    cmp[0]    = new TransComboBoxSetting();
-    width[0]  = new TransSpinBoxSetting(0, 1920, 64, true);
-    height[0] = new TransSpinBoxSetting(0, 1088, 64, true);
-    row[1]    = new HorizontalConfigurationGroup(false, false, true, true);
-    cmp[1]    = new TransComboBoxSetting();
-    width[1]  = new TransSpinBoxSetting(0, 1920, 64, true);
-    height[1] = new TransSpinBoxSetting(0, 1088, 64, true);
-    decoder   = new TransComboBoxSetting();
-    max_cpus  = new TransSpinBoxSetting(1, HAVE_THREADS ? 4 : 1, 1, true);
-    skiploop  = new TransCheckBoxSetting();
-    vidrend   = new TransComboBoxSetting();
-    osdrend   = new TransComboBoxSetting();
-    osdfade   = new TransCheckBoxSetting();
-    deint0    = new TransComboBoxSetting();
-    deint1    = new TransComboBoxSetting();
-    filters   = new TransLineEditSetting(true);
+    setLabel(pad(trunc(str, 48), 48));
+
+
+    GroupSetting *row[2];
+
+    row[0]    = new GroupSetting();
+    row[0]->setLabel(tr("First match criterion"));
+    cmp[0]    = new TransComboBoxTree();
+    width[0]  = new TransSpinBoxTree(0, 1920, 64, true);
+    height[0] = new TransSpinBoxTree(0, 1088, 64, true);
+    row[1]    = new GroupSetting();
+    row[1]->setLabel(tr("Second match criterion"));
+    cmp[1]    = new TransComboBoxTree();
+    width[1]  = new TransSpinBoxTree(0, 1920, 64, true);
+    height[1] = new TransSpinBoxTree(0, 1088, 64, true);
+    decoder   = new TransComboBoxTree();
+    max_cpus  = new TransSpinBoxTree(1, HAVE_THREADS ? 4 : 1, 1, true);
+    skiploop  = new TransCheckBoxTree();
+    vidrend   = new TransComboBoxTree();
+    osdrend   = new TransComboBoxTree();
+    osdfade   = new TransCheckBoxTree();
+    deint0    = new TransComboBoxTree();
+    deint1    = new TransComboBoxTree();
+    filters   = new TransLineEditTree(true);
 
     for (uint i = 0; i < 2; ++i)
     {
         const QString kCMP[6] = { "", "<", "<=", "==", ">=", ">" };
         for (uint j = 0; j < 6; ++j)
-            cmp[i]->addSelection(kCMP[j]);
+            cmp[i]->addSelection(kCMP[j],kCMP[j]);
 
         cmp[i]->setLabel(tr("Match criteria"));
-        width[i]->setName(QString("w%1").arg(i));
-        width[i]->setLabel(tr("W", "Width"));
-        height[i]->setName(QString("h%1").arg(i));
-        height[i]->setLabel(tr("H", "Height"));
+        //TODO width[i]->setName(QString("w%1").arg(i));
+        width[i]->setLabel(tr("Width"));
+        //TODO height[i]->setName(QString("h%1").arg(i));
+        height[i]->setLabel(tr("Height"));
 
         row[i]->addChild(cmp[i]);
         row[i]->addChild(width[i]);
         row[i]->addChild(height[i]);
     }
 
-    HorizontalConfigurationGroup *vid_row =
-        new HorizontalConfigurationGroup(false, false, true, true);
-    HorizontalConfigurationGroup *osd_row =
-        new HorizontalConfigurationGroup(false, false, true, true);
-
     decoder->setLabel(tr("Decoder"));
     max_cpus->setLabel(tr("Max CPUs"));
     skiploop->setLabel(tr("Deblocking filter"));
@@ -658,28 +922,18 @@ PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item) :
         tr("Uncheck this if the video studders while the OSD is "
            "fading away."));
 
-    vid_row->addChild(decoder);
-    vid_row->addChild(max_cpus);
-    vid_row->addChild(skiploop);
-    osd_row->addChild(vidrend);
-    osd_row->addChild(osdrend);
-    osd_row->addChild(osdfade);
-
-    VerticalConfigurationGroup *grp =
-        new VerticalConfigurationGroup(false, false, true, true);
-    grp->addChild(row[0]);
-    grp->addChild(row[1]);
-    grp->addChild(vid_row);
-    grp->addChild(osd_row);
-    addChild(grp);
-
-    VerticalConfigurationGroup *page2 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    page2->addChild(deint0);
-    page2->addChild(deint1);
-    page2->addChild(filters);
-    addChild(page2);
-
+    addChild(row[0]);
+    addChild(row[1]);
+    addChild(decoder);
+    addChild(max_cpus);
+    addChild(skiploop);
+    addChild(vidrend);
+    addChild(osdrend);
+    addChild(osdfade);
+    addChild(deint0);
+    addChild(deint1);
+    addChild(filters);
+    
     connect(decoder, SIGNAL(valueChanged(const QString&)),
             this,    SLOT(decoderChanged(const QString&)));\
     connect(vidrend, SIGNAL(valueChanged(const QString&)),
@@ -690,6 +944,7 @@ PlaybackProfileItemConfig::PlaybackProfileItemConfig(ProfileItem &_item) :
             this,    SLOT(deint0Changed(const QString&)));
     connect(deint1, SIGNAL(valueChanged(const QString&)),
             this,    SLOT(deint1Changed(const QString&)));
+    Load();
 }
 
 void PlaybackProfileItemConfig::Load(void)
@@ -734,7 +989,7 @@ void PlaybackProfileItemConfig::Load(void)
     }
     if (!found && !pdecoder.isEmpty())
     {
-        decoder->SelectSetting::addSelection(
+        decoder->addSelection(
             VideoDisplayProfile::GetDecoderName(pdecoder), pdecoder, true);
     }
     decoder->setHelpText(VideoDisplayProfile::GetDecoderHelp(pdecoder));
@@ -865,7 +1120,7 @@ void PlaybackProfileItemConfig::deint1Changed(const QString &deint)
 }
 
 PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) :
-    VerticalConfigurationGroup(false, false, true, true),
+    GroupSetting(profilename),
     profile_name(profilename), needs_save(false),
     groupid(0), last_main(NULL)
 {
@@ -874,7 +1129,10 @@ PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) :
 
     items = VideoDisplayProfile::LoadDB(groupid);
 
-    InitUI();
+    for (uint i = 0; i < items.size(); ++i)
+    {
+        addChild(new PlaybackProfileItemConfig(items[i]));
+    }
 }
 
 PlaybackProfileConfig::~PlaybackProfileConfig()
@@ -904,12 +1162,12 @@ void PlaybackProfileConfig::InitLabel(uint i)
     str.replace("xvmc", "XvMC");
     str.replace("xv", "XVideo");
 
-    labels[i]->setValue(pad(trunc(str, 48), 48));
+    labels[i]->setLabel(pad(trunc(str, 48), 48));
 }
 
 void PlaybackProfileConfig::InitUI(void)
 {
-    VerticalConfigurationGroup *main =
+ /*   VerticalConfigurationGroup *main =
         new VerticalConfigurationGroup(false, false, true, true);
 
     HorizontalConfigurationGroup *rows =
@@ -917,28 +1175,28 @@ void PlaybackProfileConfig::InitUI(void)
     VerticalConfigurationGroup *column1 =
         new VerticalConfigurationGroup(false, false, true, true);
     VerticalConfigurationGroup *column2 =
-        new VerticalConfigurationGroup(false, false, true, true);
+        new VerticalConfigurationGroup(false, false, true, true);*/
 
     labels.resize(items.size());
 
     for (uint i = 0; i < items.size(); ++i)
     {
-        labels[i] = new TransLabelSetting();
-        InitLabel(i);
-        column1->addChild(labels[i]);
+        addChild(new PlaybackProfileItemConfig(items[i]));
+        /*InitLabel(i);
+        addChild(labels[i]);*/
     }
-
+/*
     editProf.resize(items.size());
     delProf.resize(items.size());
     priority.resize(items.size());
 
+
     for (uint i = 0; i < items.size(); ++i)
     {
-        HorizontalConfigurationGroup *grp =
-            new HorizontalConfigurationGroup(false, false, true, true);
 
-        editProf[i] = new TransButtonSetting(QString("edit%1").arg(i));
-        delProf[i]  = new TransButtonSetting(QString("del%1").arg(i));
+
+       editProf[i] = new TransButtonSetting(QString("edit%1").arg(i));
+        delProf[i]  = new TransButtonSetting(QString("del%1").arg(i));/
         priority[i] = new TransSpinBoxSetting(1, items.size(), 1);
         priority[i]->setName(QString("pri%1").arg(i));
 
@@ -978,7 +1236,7 @@ void PlaybackProfileConfig::InitUI(void)
     else
         addChild(main);
 
-    last_main = main;
+    last_main = main;*/
 }
 
 void PlaybackProfileConfig::Load(void)
@@ -988,7 +1246,7 @@ void PlaybackProfileConfig::Load(void)
 
 void PlaybackProfileConfig::Save(void)
 {
-    if (!needs_save)
+    /*if (!needs_save)
         return; // nothing to do..
 
     bool ok = VideoDisplayProfile::DeleteDB(groupid, del_items);
@@ -1005,12 +1263,12 @@ void PlaybackProfileConfig::Save(void)
         LOG(VB_GENERAL, LOG_ERR,
             "PlaybackProfileConfig::Save() -- failed to save items");
         return;
-    }
+    }*/
 }
 
 void PlaybackProfileConfig::pressed(QString cmd)
 {
-    if (cmd.left(4) == "edit")
+  /*  if (cmd.left(4) == "edit")
     {
         uint i = cmd.mid(4).toUInt();
         PlaybackProfileItemConfig itemcfg(items[i]);
@@ -1043,12 +1301,12 @@ void PlaybackProfileConfig::pressed(QString cmd)
         needs_save = true;
     }
 
-    repaint();
+    repaint();*/
 }
 
 void PlaybackProfileConfig::priorityChanged(const QString &name, int val)
 {
-    uint i = name.mid(3).toInt();
+  /*  uint i = name.mid(3).toInt();
     uint j = i;
 
     priority[i]->SetRelayEnabled(false);
@@ -1085,12 +1343,12 @@ void PlaybackProfileConfig::priorityChanged(const QString &name, int val)
 
     priority[i]->SetRelayEnabled(true);
     if (i != j)
-        priority[j]->SetRelayEnabled(true);
+        priority[j]->SetRelayEnabled(true);*/
 }
 
 void PlaybackProfileConfig::swap(int i, int j)
 {
-    int pri_i = items[i].GetPriority();
+  /*  int pri_i = items[i].GetPriority();
     int pri_j = items[j].GetPriority();
 
     ProfileItem item = items[j];
@@ -1106,14 +1364,12 @@ void PlaybackProfileConfig::swap(int i, int j)
     const QString label_i = labels[i]->getValue();
     const QString label_j = labels[j]->getValue();
     labels[i]->setValue(label_j);
-    labels[j]->setValue(label_i);
+    labels[j]->setValue(label_i);*/
 }
 
-PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) :
-    TriggeredConfigurationGroup(false, true,  true, true,
-                                false, false, true, true), grouptrigger(NULL)
+PlaybackProfileConfigs::PlaybackProfileConfigs() :
+    HostComboBoxTree("DefaultVideoPlaybackProfile")
 {
-    setLabel(QObject::tr("Playback Profiles") + str);
 
     QString host = gCoreContext->GetHostName();
     QStringList profiles = VideoDisplayProfile::GetProfiles(host);
@@ -1148,35 +1404,21 @@ PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) :
         VideoDisplayProfile::SetDefaultProfileName(profile, host);
     }
 
-    grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile");
-    grouptrigger->setLabel(QObject::tr("Current Video Playback Profile"));
+    setLabel(QObject::tr("Current Video Playback Profile"));
     QStringList::const_iterator it;
     for (it = profiles.begin(); it != profiles.end(); ++it)
-        grouptrigger->addSelection(ProgramInfo::i18n(*it), *it);
+        addSelection(ProgramInfo::i18n(*it), *it);
 
-    HorizontalConfigurationGroup *grp =
-        new HorizontalConfigurationGroup(false, false, true, true);
-    TransButtonSetting *addProf = new TransButtonSetting("add");
-    TransButtonSetting *delProf = new TransButtonSetting("del");
+    for (it = profiles.begin(); it != profiles.end(); ++it)
+        m_profileTrees[*it]= new PlaybackProfileConfig(*it);
 
-    addProf->setLabel(QObject::tr("Add New"));
-    delProf->setLabel(QObject::tr("Delete"));
+    connect(this,SIGNAL(settingValueChanged(const QString &)),
+        this, SLOT(changeCurrentProfile(const QString &)));
 
-    grp->addChild(grouptrigger);
-    grp->addChild(addProf);
-    grp->addChild(delProf);
 
-    addChild(grp);
+ //   setSaveAll(true); 
 
-    setTrigger(grouptrigger);
-    for (it = profiles.begin(); it != profiles.end(); ++it)
-        addTarget(*it, new PlaybackProfileConfig(*it));
-    setSaveAll(true);
 
-    connect(addProf, SIGNAL(pressed( QString)),
-            this,    SLOT  (btnPress(QString)));
-    connect(delProf, SIGNAL(pressed( QString)),
-            this,    SLOT  (btnPress(QString)));
 }
 
 PlaybackProfileConfigs::~PlaybackProfileConfigs()
@@ -1186,70 +1428,706 @@ PlaybackProfileConfigs::~PlaybackProfileConfigs()
 #endif
 }
 
-void PlaybackProfileConfigs::btnPress(QString cmd)
+void PlaybackProfileConfigs::changeCurrentProfile(const QString& newProfileName)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("PlaybackProfileConfigs::changeCurrentProfile(%1)")
+            .arg(newProfileName));
+
+    QList< MythGenericTree * > *children = getAllChildren ();
+    MythGenericTree *child;
+    foreach(child, *children)
+    {
+        this->removeNode(child);
+    }
+
+    if (m_profileTrees.contains(newProfileName))
+    {
+        QList< MythGenericTree * > *children = m_profileTrees[newProfileName]->getAllChildren ();
+        MythGenericTree *child;
+        foreach(child, *children)
+        {
+            GroupSetting* setting = dynamic_cast<GroupSetting*>(child);
+            if (setting)
+                this->addChild(setting);
+        }
+    }
+}
+
+void PlaybackProfileConfigs::customEvent(QEvent *event)
+{
+    if (event->type() == DialogCompletionEvent::kEventType)
+    {
+        DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
+        QString resultid  = dce->GetId();
+
+        LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::customEvent: resultId = %1").arg(resultid));
+
+        if (resultid == "contextualmenu")
+        {
+            QString contextualChoice = dce->GetData().toString();
+            //else 
+            LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::customEvent: result = %1").arg(dce->GetData().toString()));
+            if (contextualChoice == "newprofile")
+            {
+                MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+                MythTextInputDialog *settingdialog =
+                                                new MythTextInputDialog(popupStack,
+                                                QObject::tr("New profile name"),FilterNone);
+
+                if (settingdialog->Create())
+                {
+                    settingdialog->SetReturnEvent(this, "newprofileresult");
+                    popupStack->AddScreen(settingdialog);
+                }
+            }
+            else if (contextualChoice == "deleteprofile")
+            {
+                MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+                MythConfirmationDialog *settingdialog =
+                                                new MythConfirmationDialog(popupStack,
+                                                QObject::tr("Remove %1 profile ?").arg(GetText("value")),true);
+
+                if (settingdialog->Create())
+                {
+                    settingdialog->SetReturnEvent(this, "deleteprofileresult");
+                    popupStack->AddScreen(settingdialog);
+                }
+            }
+            else
+                HostComboBoxTree::customEvent(event);
+
+
+            
+        }
+        else if (resultid == "newprofileresult")
+        {
+            newProfile(dce->GetResultText());
+        }
+        else if (resultid == "deleteprofileresult")
+        {
+            if (dce->GetResult()==1)
+                deleteProfile();
+        }
+
+    }
+}
+
+/* TODO this is a copy and modified version of ComboBoxTree::edit() 
+I need to do it in a more generic way */
+
+void PlaybackProfileConfigs::menu()
+{
+    MythScreenStack *popupStack =
+                            GetMythMainWindow()->GetStack("popup stack");
+
+    MythDialogBox * m_menuPopup =
+            new MythDialogBox(GetText(), popupStack, "contextualmenu");
+
+    if (m_menuPopup->Create())
+        popupStack->AddScreen(m_menuPopup);
+
+    m_menuPopup->SetReturnEvent(this, "contextualmenu");
+
+//TODO we need to have the menu from the base class too
+
+    m_menuPopup->AddButton(QObject::tr("Add New"),QVariant::fromValue(QString("newprofile")));
+    m_menuPopup->AddButton(QObject::tr("Delete"),QVariant::fromValue(QString("deleteprofile")));
+
+}
+
+void PlaybackProfileConfigs::newProfile(const QString &name)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::newProfile(%1) => TODO").arg(name));
+    if (name.isEmpty())
+    {
+        MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+        MythConfirmationDialog *settingdialog =
+                                new MythConfirmationDialog(popupStack,
+                                QObject::tr("Sorry, playback group\nname cannot be blank."),false);
+
+        if (settingdialog->Create())
+        {
+            popupStack->AddScreen(settingdialog);
+        }
+        return;
+    }
+
+
+    QString host = gCoreContext->GetHostName();
+    QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
+
+    if (not_ok_list.contains(name))
+    {
+
+        MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+        MythConfirmationDialog *settingdialog =
+                    new MythConfirmationDialog(popupStack,
+                    QObject::tr("Sorry, playback group name\n"
+                    "'%1' is already being used.").arg(name),false);
+
+        if (settingdialog->Create())
+        {
+            popupStack->AddScreen(settingdialog);
+        }
+        return;
+    }
+
+    VideoDisplayProfile::CreateProfileGroup(name, gCoreContext->GetHostName());
+    addSelection(name, name, true);
+        
+}
+
+
+void PlaybackProfileConfigs::deleteProfile()
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::deleteProfile() => TODO"));
+    const QString name = GetText("value");
+    if (!name.isEmpty())
+    {
+        removeSelection(name);
+        VideoDisplayProfile::DeleteProfileGroup(
+            name, gCoreContext->GetHostName());
+    }
+}
+
+
+
+/*
+class PlaybackProfileConfigItemCriteriaTree : public GroupSetting
+{
+  public:
+    PlaybackProfileConfigItemCriteriaTree();
+    virtual ~PlaybackProfileConfigItemCriteriaTree();
+    void setValue(const QString &newValue, int i);
+  private:
+    TransComboBoxTree *m_condition;
+    TransSpinBoxTree *m_width;
+    TransSpinBoxTree *m_height;
+};*/
+
+/*
+
+void PlaybackProfileConfigItemCriteriaTree::setValue(const QString &newValue, int i)
+{
+    QStringList clist = newValue.split(" ");
+    if (clist.size() == 0)
+        clist<<((i) ? "" : ">");
+    if (clist.size() == 1)
+        clist<<"0";
+    if (clist.size() == 2)
+        clist<<"0";
+
+    m_condition->setValue(clist[0]);
+    m_width->setValue(clist[1].toInt());
+    m_height->setValue(clist[2].toInt());
+
+    SetText(QString("%1 %2x%3").arg(m_condition->getValue())
+        .arg(m_width->getValue()).arg(m_height->getValue()),"value");
+}
+
+PlaybackProfileConfigItemCriteriaTree::PlaybackProfileConfigItemCriteriaTree()
+        :GroupSetting()
+{
+    m_condition = new TransComboBoxTree();
+    m_condition->setLabel(QObject::tr("Condition"));
+    const QString kCMP[6] = { "", "<", "<=", "==", ">=", ">" };
+    for (uint j = 0; j < 6; ++j)
+        m_condition->addSelection(kCMP[j],kCMP[j]);
+    addChild(m_condition);
+
+    m_width = new TransSpinBoxTree(0,1920,64);
+    m_width->setLabel(QObject::tr("Width"));
+    addChild(m_width);
+
+    m_height = new TransSpinBoxTree(0,1088,64);
+    m_height->setLabel(QObject::tr("Height"));
+    addChild(m_height);
+}
+
+
+PlaybackProfileConfigItemCriteriaTree::~PlaybackProfileConfigItemCriteriaTree()
+{
+}
+
+
+
+PlaybackProfileConfigItemTree::PlaybackProfileConfigItemTree(ProfileItem &item)
+        :GroupSetting(""),
+        m_item(item)
+{
+    m_criteria1 = new PlaybackProfileConfigItemCriteriaTree();
+    m_criteria1->setLabel(tr("First criteria"));
+    addChild(m_criteria1);
+
+    m_criteria2 = new PlaybackProfileConfigItemCriteriaTree();
+    m_criteria2->setLabel(tr("Second criteria"));
+    addChild(m_criteria2);
+
+    m_decoder   = new TransComboBoxTree();
+    m_decoder->setLabel(tr("Decoder"));
+    addChild(m_decoder);
+
+    m_max_cpus   = new TransSpinBoxTree(1, HAVE_THREADS ? 4 : 1, 1);
+    m_max_cpus->setLabel(tr("Max CPUs"));
+    addChild(m_max_cpus);
+
+    m_skiploop   = new TransCheckBoxTree();
+    m_skiploop->setLabel(tr("Deblocking filter"));
+    addChild(m_skiploop);
+    
+    m_vidrend    = new TransComboBoxTree();
+    m_vidrend->setLabel(tr("Video renderer"));
+    addChild(m_vidrend);
+
+    m_osdrend    = new TransComboBoxTree();
+    m_osdrend->setLabel(tr("OSD renderer"));
+    addChild(m_osdrend);
+
+    m_osdfade   = new TransCheckBoxTree();
+    m_osdfade->setLabel(tr("OSD fade"));
+    addChild(m_osdfade);
+
+    m_deint0    = new TransComboBoxTree();
+    m_deint0->setLabel(tr("Primary deinterlacer"));
+    addChild(m_deint0);
+
+    m_deint1    = new TransComboBoxTree();
+    m_deint1->setLabel(tr("Fallback deinterlacer"));
+    addChild(m_deint1);
+
+    m_filters   = new TransLineEditTree(true);
+    m_filters->setLabel(tr("Custom filters"));
+    m_filters->setHelpText(
+        QObject::tr("Example custom filter list: 'ivtc,denoise3d'"));
+    addChild(m_filters);
+
+    connect(m_decoder, SIGNAL(settingValueChanged(const QString&)),
+            this,    SLOT(decoderChanged(const QString&)));
+    connect(m_vidrend, SIGNAL(settingValueChanged(const QString&)),
+            this,    SLOT(vrenderChanged(const QString&)));
+    connect(m_osdrend, SIGNAL(settingValueChanged(const QString&)),
+            this,    SLOT(orenderChanged(const QString&)));
+    connect(m_deint0, SIGNAL(settingValueChanged(const QString&)),
+            this,    SLOT(deint0Changed(const QString&)));
+    connect(m_deint1, SIGNAL(settingValueChanged(const QString&)),
+            this,    SLOT(deint1Changed(const QString&)));
+}
+
+void PlaybackProfileConfigItemTree::Load(void)
+{
+    m_criteria1->setValue(m_item.Get(QString("pref_cmp%1").arg(0)),0);
+    m_criteria2->setValue(m_item.Get(QString("pref_cmp%1").arg(1)),1);
+
+    QString pdecoder   = m_item.Get("pref_decoder");
+    QString pmax_cpus  = m_item.Get("pref_max_cpus");
+    QString pskiploop  = m_item.Get("pref_skiploop");
+    QString prenderer  = m_item.Get("pref_videorenderer");
+    QString posd       = m_item.Get("pref_osdrenderer");
+    QString posdfade   = m_item.Get("pref_osdfade");
+    QString pdeint0    = m_item.Get("pref_deint0");
+    QString pdeint1    = m_item.Get("pref_deint1");
+    QString pfilter    = m_item.Get("pref_filters");
+    bool    found      = false;
+
+    QString     dech = VideoDisplayProfile::GetDecoderHelp();
+    QStringList decr = VideoDisplayProfile::GetDecoders();
+    QStringList decn = VideoDisplayProfile::GetDecoderNames();
+    QStringList::const_iterator itr = decr.begin();
+    QStringList::const_iterator itn = decn.begin();
+    for (; (itr != decr.end()) && (itn != decn.end()); ++itr, ++itn)
+    {
+        m_decoder->addSelection(*itn, *itr, (*itr == pdecoder));
+        found |= (*itr == pdecoder);
+    }
+    if (!found && !pdecoder.isEmpty())
+    {
+        m_decoder->addSelection(
+            VideoDisplayProfile::GetDecoderName(pdecoder), pdecoder, true);
+    }
+    m_decoder->setHelpText(VideoDisplayProfile::GetDecoderHelp(pdecoder));
+
+    if (!pmax_cpus.isEmpty())
+        m_max_cpus->setValue(pmax_cpus.toUInt());
+
+    m_skiploop->setValue((!pskiploop.isEmpty()) ? (bool) pskiploop.toInt() : true);
+
+    if (!prenderer.isEmpty())
+        m_vidrend->setValue(prenderer);
+    if (!posd.isEmpty())
+        m_osdrend->setValue(posd);
+
+    m_osdfade->setValue((!posdfade.isEmpty()) ? (bool) posdfade.toInt() : true);
+
+    if (!pdeint0.isEmpty())
+        m_deint0->setValue(pdeint0);
+    if (!pdeint1.isEmpty())
+        m_deint1->setValue(pdeint1);
+    if (!pfilter.isEmpty())
+        m_filters->setValue(pfilter);
+}
+
+void PlaybackProfileConfigItemTree::decoderChanged(const QString &dec)
+{
+    QString     vrenderer = m_vidrend->getValue();
+    QStringList renderers = VideoDisplayProfile::GetVideoRenderers(dec);
+    QStringList::const_iterator it;
+
+    QString prenderer;
+    for (it = renderers.begin(); it != renderers.end(); ++it)
+        prenderer = (*it == vrenderer) ? vrenderer : prenderer;
+    if (prenderer.isEmpty())
+        prenderer = VideoDisplayProfile::GetPreferredVideoRenderer(dec);
+
+    m_vidrend->clearSelections();
+    for (it = renderers.begin(); it != renderers.end(); ++it)
+    {
+        if (*it != "null")
+            m_vidrend->addSelection(*it, *it, (*it == prenderer));
+    }
+
+    m_decoder->setHelpText(VideoDisplayProfile::GetDecoderHelp(dec));
+}
+
+void PlaybackProfileConfigItemTree::vrenderChanged(const QString& renderer)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("PlaybackProfileConfigItemTree::vrenderChanged"));
+    QStringList osds    = VideoDisplayProfile::GetOSDs(renderer);
+    QStringList deints  = VideoDisplayProfile::GetDeinterlacers(renderer);
+    QString     losd    = m_osdrend->getValue();
+    QString     ldeint0 = m_deint0->getValue();
+    QString     ldeint1 = m_deint1->getValue();
+    QStringList::const_iterator it;
+
+    m_osdrend->clearSelections();
+    for (it = osds.begin(); it != osds.end(); ++it)
+        m_osdrend->addSelection(*it, *it, (*it == losd));
+
+    m_deint0->clearSelections();
+    for (it = deints.begin(); it != deints.end(); ++it)
+    {
+        m_deint0->addSelection(VideoDisplayProfile::GetDeinterlacerName(*it),
+                             *it, (*it == ldeint0));
+    }
+
+    m_deint1->clearSelections();
+    for (it = deints.begin(); it != deints.end(); ++it)
+    {
+        if (!(*it).contains("bobdeint") && !(*it).contains("doublerate") &&
+            !(*it).contains("doubleprocess"))
+            m_deint1->addSelection(VideoDisplayProfile::GetDeinterlacerName(*it),
+                                 *it, (*it == ldeint1));
+    }
+
+  //TODO  m_filters->setEnabled(VideoDisplayProfile::IsFilterAllowed(renderer));
+    m_vidrend->setHelpText(VideoDisplayProfile::GetVideoRendererHelp(renderer));
+}
+
+void PlaybackProfileConfigItemTree::orenderChanged(const QString &renderer)
+{
+    m_osdrend->setHelpText(VideoDisplayProfile::GetOSDHelp(renderer));
+}
+
+void PlaybackProfileConfigItemTree::deint0Changed(const QString &deint)
+{
+    m_deint0->setHelpText(
+        QObject::tr("Main deinterlacing method.") + ' ' +
+        VideoDisplayProfile::GetDeinterlacerHelp(deint));
+}
+
+void PlaybackProfileConfigItemTree::deint1Changed(const QString &deint)
 {
-    if (cmd == "add")
+    m_deint1->setHelpText(
+        QObject::tr("Fallback deinterlacing method.") + ' ' +
+        VideoDisplayProfile::GetDeinterlacerHelp(deint));
+}
+
+class PlaybackProfileConfigTree : public GroupSetting
+{
+  public:
+    PlaybackProfileConfigTree(QString profileName);
+  private:
+    item_list_t m_items;
+    uint        m_groupid;
+};
+
+PlaybackProfileConfigTree::PlaybackProfileConfigTree(QString profileName)
+        :GroupSetting(profileName)
+{
+    m_groupid = VideoDisplayProfile::GetProfileGroupID(
+        profileName, gCoreContext->GetHostName());
+
+    LOG(VB_GENERAL, LOG_ERR, QString("PlaybackProfileConfigTree::PlaybackProfileConfigTree() m_groupid=%1 for %")
+            .arg(m_groupid).arg(profileName));
+
+    m_items = VideoDisplayProfile::LoadDB(m_groupid);
+
+    for (uint i = 0; i < m_items.size(); ++i)
     {
-        QString name;
+        QString andStr = QObject::tr("&", "and");
+        QString cmp0   = m_items[i].Get("pref_cmp0");
+        QString cmp1   = m_items[i].Get("pref_cmp1");
+        QString str    = QObject::tr("if rez") + ' ' + cmp0;
+
+        if (!cmp1.isEmpty())
+            str += " " + andStr + ' ' + cmp1;
+
+        str += " -> ";
+        str += m_items[i].Get("pref_decoder");
+        str += " " + andStr + ' ';
+        str += m_items[i].Get("pref_videorenderer");
+        str.replace("-blit", "");
+        str.replace("ivtv " + andStr + " ivtv", "ivtv");
+        str.replace("xvmc " + andStr + " xvmc", "xvmc");
+        str.replace("xvmc", "XvMC");
+        str.replace("xv", "XVideo");
+
+        QString groupeName = pad(trunc(str, 48), 48);
+        LOG(VB_GENERAL, LOG_ERR, QString("PlaybackProfileConfigTree::PlaybackProfileConfigTree() %1").arg(groupeName));
+        addChild(new PlaybackProfileConfigItemTree(m_items[i]));
+    }
+};
+
+class PlaybackProfileConfigsTree : public HostComboBoxTree
+{
+  public:
+    PlaybackProfileConfigsTree()
+        : HostComboBoxTree("DefaultVideoPlaybackProfile")
+    {
+        setLabel(QObject::tr("Current Video Playback Profile"));
 
         QString host = gCoreContext->GetHostName();
-        QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
+        QStringList profiles = VideoDisplayProfile::GetProfiles(host);
+        if (profiles.empty())
+        {
+            VideoDisplayProfile::CreateProfiles(host);
+            profiles = VideoDisplayProfile::GetProfiles(host);
+        }
+        if (profiles.empty())
+            return;
+
+        if (!profiles.contains("Normal") &&
+            !profiles.contains("High Quality") &&
+            !profiles.contains("Slim"))
+        {
+            VideoDisplayProfile::CreateNewProfiles(host);
+            profiles = VideoDisplayProfile::GetProfiles(host);
+        }
 
-        bool ok = true;
-        while (ok)
+        if (!profiles.contains("VDPAU Normal") &&
+            !profiles.contains("VDPAU High Quality") &&
+            !profiles.contains("VDPAU Slim"))
         {
-            QString msg = QObject::tr("Enter Playback Group Name");
+            VideoDisplayProfile::CreateVDPAUProfiles(host);
+            profiles = VideoDisplayProfile::GetProfiles(host);
+        }
+
+        QStringList::const_iterator it;
+        for (it = profiles.begin(); it != profiles.end(); ++it)
+        {
+            addSelection(ProgramInfo::i18n(*it), *it);
+            GroupSetting * gp = new PlaybackProfileConfigTree(*it);
+            //gp->setLabel(*it);
+            addChild(gp);
+        }
+    }
+
+    virtual void menu();
+    //virtual void resultMenu(DialogCompletionEvent *dce);
+    virtual void customEvent(QEvent *event);
+  private:
+    void newProfile(const QString &name);
+    void renameProfile(const QString &newName);
+    void deleteProfile();
+};
+
+void PlaybackProfileConfigsTree::customEvent(QEvent *event)
+{
+    if (event->type() == DialogCompletionEvent::kEventType)
+    {
+        DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
+        QString resultid  = dce->GetId();
 
-            ok = MythPopupBox::showGetTextPopup(
-                GetMythMainWindow(), msg, msg, name);
+        LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::customEvent: resultId = %1").arg(resultid));
 
-            if (!ok)
-                return;
+        if (resultid == "contextualmenu")
+        {
+            QString contextualChoice = dce->GetData().toString();
+            //else 
+            LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::customEvent: result = %1").arg(dce->GetData().toString()));
+            if (contextualChoice == "newprofile")
+            {
+                MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+                MythTextInputDialog *settingdialog =
+                                                new MythTextInputDialog(popupStack,
+                                                QObject::tr("New profile name"),FilterNone);
+
+                if (settingdialog->Create())
+                {
+                    settingdialog->SetReturnEvent(this, "newprofileresult");
+                    popupStack->AddScreen(settingdialog);
+                }
+            }
+            else if (contextualChoice == "renameprofile")
+            {
+                MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+                MythTextInputDialog *settingdialog =
+                                                new MythTextInputDialog(popupStack,
+                                                QObject::tr("New profile name"),FilterNone, false, GetText("value"));
 
-            if (not_ok_list.contains(name) || name.isEmpty())
+                if (settingdialog->Create())
+                {
+                    settingdialog->SetReturnEvent(this, "renameprofileresult");
+                    popupStack->AddScreen(settingdialog);
+                }
+            }
+            else if (contextualChoice == "deleteprofile")
             {
-                msg = (name.isEmpty()) ?
-                    QObject::tr(
-                        "Sorry, playback group\nname cannot be blank.") :
-                    QObject::tr(
-                        "Sorry, playback group name\n"
-                        "'%1' is already being used.").arg(name);
+                MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
 
-                MythPopupBox::showOkPopup(
-                    GetMythMainWindow(), QObject::tr("Error"), msg);
+                MythConfirmationDialog *settingdialog =
+                                                new MythConfirmationDialog(popupStack,
+                                                QObject::tr("Remove %1 profile ?").arg(GetText("value")),true);
 
-                continue;
+                if (settingdialog->Create())
+                {
+                    settingdialog->SetReturnEvent(this, "deleteprofileresult");
+                    popupStack->AddScreen(settingdialog);
+                }
             }
+            else
+                HostComboBoxTree::customEvent(event);
 
-            break;
+
+            
+        }
+        else if (resultid == "newprofileresult")
+        {
+            newProfile(dce->GetResultText());
+        }
+        else if (resultid == "renameprofileresult")
+        {
+            renameProfile(dce->GetResultText());
+        }
+        else if (resultid == "deleteprofileresult")
+        {
+            if (dce->GetResult()==1)
+                deleteProfile();
         }
 
-        VideoDisplayProfile::CreateProfileGroup(name, gCoreContext->GetHostName());
-        addTarget(name, new PlaybackProfileConfig(name));
+    }
+}
+
+void PlaybackProfileConfigsTree::newProfile(const QString &name)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::newProfile(%1) => TODO").arg(name));
+    if (name.isEmpty())
+    {
+        MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
 
-        if (grouptrigger)
-            grouptrigger->addSelection(name, name, true);
+        MythConfirmationDialog *settingdialog =
+                                new MythConfirmationDialog(popupStack,
+                                QObject::tr("Sorry, playback group\nname cannot be blank."),false);
+
+        if (settingdialog->Create())
+        {
+            popupStack->AddScreen(settingdialog);
+        }
+        return;
     }
-    else if ((cmd == "del") && grouptrigger)
+
+
+    QString host = gCoreContext->GetHostName();
+    QStringList not_ok_list = VideoDisplayProfile::GetProfiles(host);
+
+    if (not_ok_list.contains(name))
     {
-        const QString name = grouptrigger->getSelectionLabel();
-        if (!name.isEmpty())
+
+        MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+        MythConfirmationDialog *settingdialog =
+                    new MythConfirmationDialog(popupStack,
+                    QObject::tr("Sorry, playback group name\n"
+                    "'%1' is already being used.").arg(name),false);
+
+        if (settingdialog->Create())
         {
-            removeTarget(name);
-            VideoDisplayProfile::DeleteProfileGroup(
-                name, gCoreContext->GetHostName());
+            popupStack->AddScreen(settingdialog);
         }
+        return;
     }
 
-    repaint();
+    VideoDisplayProfile::CreateProfileGroup(name, gCoreContext->GetHostName());
+    addSelection(name, name, true);
+        
+}
+
+void PlaybackProfileConfigsTree::renameProfile(const QString &newName)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::renameProfile(%1) => TODO").arg(newName));
+    if (newName.isEmpty())
+    {
+        MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+        MythConfirmationDialog *settingdialog =
+                        new MythConfirmationDialog(popupStack,
+                        QObject::tr("Error: The playback profile's new name is empty"),true);
+
+        if (settingdialog->Create())
+        {
+            popupStack->AddScreen(settingdialog);
+        }
+    }
 }
 
-void PlaybackProfileConfigs::triggerChanged(const QString &trig)
+void PlaybackProfileConfigsTree::deleteProfile()
 {
-    TriggeredConfigurationGroup::triggerChanged(trig);
+    LOG(VB_GENERAL, LOG_ERR, QString("MyComboBoxTree::deleteProfile() => TODO"));
+    const QString name = GetText("value");
+    if (!name.isEmpty())
+    {
+        removeSelection(name);
+        VideoDisplayProfile::DeleteProfileGroup(
+            name, gCoreContext->GetHostName());
+    }
 }
+*/
 
-static HostComboBox *PlayBoxOrdering()
+/* TODO this is a copy and modified version of ComboBoxTree::edit() 
+I need to do it in a more generic way */
+/*
+void PlaybackProfileConfigsTree::menu()
+{
+    if (m_screen==NULL)
+    {
+        LOG(VB_GENERAL, LOG_ERR, QString("ComboBoxTree::edit: screen is null"));
+        return;
+    }
+    MythScreenStack *popupStack =
+                            GetMythMainWindow()->GetStack("popup stack");
+
+    MythDialogBox * m_menuPopup =
+            new MythDialogBox(GetText(), popupStack, "contextualmenu");
+
+    if (m_menuPopup->Create())
+        popupStack->AddScreen(m_menuPopup);
+
+    m_menuPopup->SetReturnEvent(this, "contextualmenu");
+
+//TODO we need to have the menu from the base class too
+
+    m_menuPopup->AddButton(QObject::tr("Add New"),QVariant::fromValue(QString("newprofile")));
+    //m_menuPopup->AddButton(QObject::tr("Rename"),QVariant::fromValue(QString("renameprofile")));
+    m_menuPopup->AddButton(QObject::tr("Delete"),QVariant::fromValue(QString("deleteprofile")));
+
+}*/
+
+static HostComboBoxTree *PlayBoxOrdering()
 {
     QString str[4] =
     {
@@ -1264,7 +2142,7 @@ static HostComboBox *PlayBoxOrdering()
         "refers to sections (e.g. \"All Programs\") which list "
         "multiple titles. Sections in parentheses are not affected.");
 
-    HostComboBox *gc = new HostComboBox("PlayBoxOrdering");
+    HostComboBoxTree *gc = new HostComboBoxTree("PlayBoxOrdering");
     gc->setLabel(QObject::tr("Episode sort orderings"));
 
     for (int i = 0; i < 4; ++i)
@@ -1276,9 +2154,9 @@ static HostComboBox *PlayBoxOrdering()
     return gc;
 }
 
-static HostComboBox *PlayBoxEpisodeSort()
+static HostComboBoxTree *PlayBoxEpisodeSort()
 {
-    HostComboBox *gc = new HostComboBox("PlayBoxEpisodeSort");
+    HostComboBoxTree *gc = new HostComboBoxTree("PlayBoxEpisodeSort");
     gc->setLabel(QObject::tr("Sort episodes"));
     gc->addSelection(QObject::tr("Record date"), "Date");
     gc->addSelection(QObject::tr("Season/Episode"), "Season");
@@ -1288,9 +2166,9 @@ static HostComboBox *PlayBoxEpisodeSort()
     return gc;
 }
 
-static HostSpinBox *FFRewReposTime()
+static HostSpinBoxTree *FFRewReposTime()
 {
-    HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("FFRewReposTime", 0, 200, 5);
     gs->setLabel(QObject::tr("Fast forward/rewind reposition amount"));
     gs->setValue(100);
     gs->setHelpText(QObject::tr("When exiting sticky keys fast forward/rewind "
@@ -1301,9 +2179,9 @@ static HostSpinBox *FFRewReposTime()
     return gs;
 }
 
-static HostCheckBox *FFRewReverse()
+static HostCheckBoxTree *FFRewReverse()
 {
-    HostCheckBox *gc = new HostCheckBox("FFRewReverse");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("FFRewReverse");
     gc->setLabel(QObject::tr("Reverse direction in fast forward/rewind"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, pressing the sticky rewind key "
@@ -1314,9 +2192,9 @@ static HostCheckBox *FFRewReverse()
     return gc;
 }
 
-static HostComboBox *MenuTheme()
+static HostComboBoxTree *MenuTheme()
 {
-    HostComboBox *gc = new HostComboBox("MenuTheme");
+    HostComboBoxTree *gc = new HostComboBoxTree("MenuTheme");
     gc->setLabel(QObject::tr("Menu theme"));
 
     QList<ThemeInfo> themelist = GetMythUI()->GetThemes(THEME_MENU);
@@ -1348,9 +2226,9 @@ static HostComboBox MUNUSED *DecodeVBIFormat()
     return gc;
 }
 
-static HostSpinBox *OSDCC708TextZoomPercentage(void)
+static HostSpinBoxTree *OSDCC708TextZoomPercentage(void)
 {
-    HostSpinBox *gs = new HostSpinBox("OSDCC708TextZoom", 50, 200, 5);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("OSDCC708TextZoom", 50, 200, 5);
     gs->setLabel(QObject::tr("Subtitle text zoom percentage"));
     gs->setValue(100);
     gs->setHelpText(QObject::tr("Use this to enlarge or shrink text based subtitles."));
@@ -1358,9 +2236,9 @@ static HostSpinBox *OSDCC708TextZoomPercentage(void)
     return gs;
 }
 
-static HostComboBox *SubtitleFont()
+static HostComboBoxTree *SubtitleFont()
 {
-    HostComboBox *hcb = new HostComboBox("OSDSubFont");
+    HostComboBoxTree *hcb = new HostComboBoxTree("OSDSubFont");
     QFontDatabase db;
     QStringList fonts = db.families();
     QStringList hide  = db.families(QFontDatabase::Symbol);
@@ -1375,9 +2253,9 @@ static HostComboBox *SubtitleFont()
     return hcb;
 }
 
-static HostComboBox *SubtitleCodec()
+static HostComboBoxTree *SubtitleCodec()
 {
-    HostComboBox *gc = new HostComboBox("SubtitleCodec");
+    HostComboBoxTree *gc = new HostComboBoxTree("SubtitleCodec");
 
     gc->setLabel(QObject::tr("Subtitle Codec"));
     QList<QByteArray> list = QTextCodec::availableCodecs();
@@ -1390,18 +2268,18 @@ static HostComboBox *SubtitleCodec()
     return gc;
 }
 
-static HostComboBox *ChannelOrdering()
+static HostComboBoxTree *ChannelOrdering()
 {
-    HostComboBox *gc = new HostComboBox("ChannelOrdering");
+    HostComboBoxTree *gc = new HostComboBoxTree("ChannelOrdering");
     gc->setLabel(QObject::tr("Channel ordering"));
     gc->addSelection(QObject::tr("channel number"), "channum");
     gc->addSelection(QObject::tr("callsign"),       "callsign");
     return gc;
 }
 
-static HostSpinBox *VertScanPercentage()
+static HostSpinBoxTree *VertScanPercentage()
 {
-    HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("VertScanPercentage", -100, 100, 1);
     gs->setLabel(QObject::tr("Vertical scaling"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr(
@@ -1410,9 +2288,9 @@ static HostSpinBox *VertScanPercentage()
     return gs;
 }
 
-static HostSpinBox *HorizScanPercentage()
+static HostSpinBoxTree *HorizScanPercentage()
 {
-    HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("HorizScanPercentage", -100, 100, 1);
     gs->setLabel(QObject::tr("Horizontal scaling"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr(
@@ -1421,27 +2299,27 @@ static HostSpinBox *HorizScanPercentage()
     return gs;
 };
 
-static HostSpinBox *XScanDisplacement()
+static HostSpinBoxTree *XScanDisplacement()
 {
-    HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("XScanDisplacement", -50, 50, 1);
     gs->setLabel(QObject::tr("Scan displacement (X)"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("Adjust this to move the image horizontally."));
     return gs;
 }
 
-static HostSpinBox *YScanDisplacement()
+static HostSpinBoxTree *YScanDisplacement()
 {
-    HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("YScanDisplacement", -50, 50, 1);
     gs->setLabel(QObject::tr("Scan displacement (Y)"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("Adjust this to move the image vertically."));
     return gs;
 };
 
-static HostCheckBox *CCBackground()
+static HostCheckBoxTree *CCBackground()
 {
-    HostCheckBox *gc = new HostCheckBox("CCBackground");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("CCBackground");
     gc->setLabel(QObject::tr("Black background for closed captioning"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr(
@@ -1451,9 +2329,9 @@ static HostCheckBox *CCBackground()
     return gc;
 }
 
-static HostCheckBox *DefaultCCMode()
+static HostCheckBoxTree *DefaultCCMode()
 {
-    HostCheckBox *gc = new HostCheckBox("DefaultCCMode");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("DefaultCCMode");
     gc->setLabel(QObject::tr("Always display closed captioning or subtitles"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr(
@@ -1464,9 +2342,9 @@ static HostCheckBox *DefaultCCMode()
     return gc;
 }
 
-static HostCheckBox *PreferCC708()
+static HostCheckBoxTree *PreferCC708()
 {
-    HostCheckBox *gc = new HostCheckBox("Prefer708Captions");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("Prefer708Captions");
     gc->setLabel(QObject::tr("Prefer EIA-708 over EIA-608 captions"));
     gc->setValue(true);
     gc->setHelpText(
@@ -1477,9 +2355,9 @@ static HostCheckBox *PreferCC708()
     return gc;
 }
 
-static HostCheckBox *EnableMHEG()
+static HostCheckBoxTree *EnableMHEG()
 {
-    HostCheckBox *gc = new HostCheckBox("EnableMHEG");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("EnableMHEG");
     gc->setLabel(QObject::tr("Enable interactive TV"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr(
@@ -1489,9 +2367,9 @@ static HostCheckBox *EnableMHEG()
     return gc;
 }
 
-static HostCheckBox *PersistentBrowseMode()
+static HostCheckBoxTree *PersistentBrowseMode()
 {
-    HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("PersistentBrowseMode");
     gc->setLabel(QObject::tr("Always use browse mode in Live TV"));
     gc->setValue(true);
     gc->setHelpText(
@@ -1501,9 +2379,9 @@ static HostCheckBox *PersistentBrowseMode()
     return gc;
 }
 
-static HostCheckBox *BrowseAllTuners()
+static HostCheckBoxTree *BrowseAllTuners()
 {
-    HostCheckBox *gc = new HostCheckBox("BrowseAllTuners");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("BrowseAllTuners");
     gc->setLabel(QObject::tr("Browse all channels"));
     gc->setValue(false);
     gc->setHelpText(
@@ -1514,9 +2392,9 @@ static HostCheckBox *BrowseAllTuners()
     return gc;
 }
 
-static HostCheckBox *ClearSavedPosition()
+static HostCheckBoxTree *ClearSavedPosition()
 {
-    HostCheckBox *gc = new HostCheckBox("ClearSavedPosition");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("ClearSavedPosition");
     gc->setLabel(QObject::tr("Clear bookmark on playback"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, automatically clear the "
@@ -1526,9 +2404,9 @@ static HostCheckBox *ClearSavedPosition()
     return gc;
 }
 
-static HostCheckBox *AltClearSavedPosition()
+static HostCheckBoxTree *AltClearSavedPosition()
 {
-    HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("AltClearSavedPosition");
     gc->setLabel(QObject::tr("Alternate clear and save bookmark"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("During playback the SELECT key "
@@ -1539,9 +2417,9 @@ static HostCheckBox *AltClearSavedPosition()
     return gc;
 }
 
-static HostComboBox *PlaybackExitPrompt()
+static HostComboBoxTree *PlaybackExitPrompt()
 {
-    HostComboBox *gc = new HostComboBox("PlaybackExitPrompt");
+    HostComboBoxTree *gc = new HostComboBoxTree("PlaybackExitPrompt");
     gc->setLabel(QObject::tr("Action on playback exit"));
     gc->addSelection(QObject::tr("Just exit"), "0");
     gc->addSelection(QObject::tr("Save position and exit"), "2");
@@ -1555,9 +2433,9 @@ static HostComboBox *PlaybackExitPrompt()
     return gc;
 }
 
-static HostCheckBox *EndOfRecordingExitPrompt()
+static HostCheckBoxTree *EndOfRecordingExitPrompt()
 {
-    HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("EndOfRecordingExitPrompt");
     gc->setLabel(QObject::tr("Prompt at end of recording"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, a menu will be displayed allowing "
@@ -1566,9 +2444,9 @@ static HostCheckBox *EndOfRecordingExitPrompt()
     return gc;
 }
 
-static HostCheckBox *JumpToProgramOSD()
+static HostCheckBoxTree *JumpToProgramOSD()
 {
-    HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("JumpToProgramOSD");
     gc->setLabel(QObject::tr("Jump to program OSD"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr(
@@ -1580,9 +2458,9 @@ static HostCheckBox *JumpToProgramOSD()
     return gc;
 }
 
-static HostCheckBox *ContinueEmbeddedTVPlay()
+static HostCheckBoxTree *ContinueEmbeddedTVPlay()
 {
-    HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("ContinueEmbeddedTVPlay");
     gc->setLabel(QObject::tr("Continue playback when embedded"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr(
@@ -1593,9 +2471,9 @@ static HostCheckBox *ContinueEmbeddedTVPlay()
     return gc;
 }
 
-static HostCheckBox *AutomaticSetWatched()
+static HostCheckBoxTree *AutomaticSetWatched()
 {
-    HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("AutomaticSetWatched");
     gc->setLabel(QObject::tr("Automatically mark a recording as watched"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, when you exit near the end of a "
@@ -1606,9 +2484,9 @@ static HostCheckBox *AutomaticSetWatched()
     return gc;
 }
 
-static HostSpinBox *LiveTVIdleTimeout()
+static HostSpinBoxTree *LiveTVIdleTimeout()
 {
-    HostSpinBox *gs = new HostSpinBox("LiveTVIdleTimeout", 0, 3600, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("LiveTVIdleTimeout", 0, 3600, 1);
     gs->setLabel(QObject::tr("Live TV idle timeout (mins)"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr(
@@ -1618,9 +2496,9 @@ static HostSpinBox *LiveTVIdleTimeout()
     return gs;
 }
 
-// static HostCheckBox *PlaybackPreview()
+// static HostCheckBoxTree *PlaybackPreview()
 // {
-//     HostCheckBox *gc = new HostCheckBox("PlaybackPreview");
+//     HostCheckBox *gc = new HostCheckBoxTree("PlaybackPreview");
 //     gc->setLabel(QObject::tr("Display live preview of recordings"));
 //     gc->setValue(true);
 //     gc->setHelpText(QObject::tr("If enabled, a preview of the recording "
@@ -1629,9 +2507,9 @@ static HostSpinBox *LiveTVIdleTimeout()
 //     return gc;
 // }
 //
-// static HostCheckBox *HWAccelPlaybackPreview()
+// static HostCheckBoxTree *HWAccelPlaybackPreview()
 // {
-//     HostCheckBox *gc = new HostCheckBox("HWAccelPlaybackPreview");
+//     HostCheckBoxTree *gc = new HostCheckBoxTree("HWAccelPlaybackPreview");
 //     gc->setLabel(QObject::tr("Use HW Acceleration for live recording preview"));
 //     gc->setValue(false);
 //     gc->setHelpText(
@@ -1643,9 +2521,9 @@ static HostSpinBox *LiveTVIdleTimeout()
 //     return gc;
 // }
 
-static HostCheckBox *UseVirtualKeyboard()
+static HostCheckBoxTree *UseVirtualKeyboard()
 {
-    HostCheckBox *gc = new HostCheckBox("UseVirtualKeyboard");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("UseVirtualKeyboard");
     gc->setLabel(QObject::tr("Use line edit virtual keyboards"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, you can use a virtual keyboard "
@@ -1654,9 +2532,9 @@ static HostCheckBox *UseVirtualKeyboard()
     return gc;
 }
 
-static HostComboBox *OverrideExitMenu()
+static HostComboBoxTree *OverrideExitMenu()
 {
-    HostComboBox *gc = new HostComboBox("OverrideExitMenu");
+    HostComboBoxTree *gc = new HostComboBoxTree("OverrideExitMenu");
     gc->setLabel(QObject::tr("Customize exit menu options"));
     gc->addSelection(QObject::tr("Default"), "0");
     gc->addSelection(QObject::tr("Show quit"), "1");
@@ -1671,9 +2549,9 @@ static HostComboBox *OverrideExitMenu()
     return gc;
 }
 
-static HostLineEdit *RebootCommand()
+static HostLineEditTree *RebootCommand()
 {
-    HostLineEdit *ge = new HostLineEdit("RebootCommand");
+    HostLineEditTree *ge = new HostLineEditTree("RebootCommand");
     ge->setLabel(QObject::tr("Reboot command"));
     ge->setValue("");
     ge->setHelpText(QObject::tr("Optional. Script to run if you select "
@@ -1683,9 +2561,9 @@ static HostLineEdit *RebootCommand()
     return ge;
 }
 
-static HostLineEdit *HaltCommand()
+static HostLineEditTree *HaltCommand()
 {
-    HostLineEdit *ge = new HostLineEdit("HaltCommand");
+    HostLineEditTree *ge = new HostLineEditTree("HaltCommand");
     ge->setLabel(QObject::tr("Halt command"));
     ge->setValue("");
     ge->setHelpText(QObject::tr("Optional. Script to run if you select "
@@ -1695,9 +2573,9 @@ static HostLineEdit *HaltCommand()
     return ge;
 }
 
-static HostLineEdit *LircDaemonDevice()
+static HostLineEditTree *LircDaemonDevice()
 {
-    HostLineEdit *ge = new HostLineEdit("LircSocket");
+    HostLineEditTree *ge = new HostLineEditTree("LircSocket");
     ge->setLabel(QObject::tr("LIRC daemon socket"));
 
     /* lircd socket moved from /dev/ to /var/run/lirc/ in lirc 0.8.6 */
@@ -1712,18 +2590,18 @@ static HostLineEdit *LircDaemonDevice()
     return ge;
 }
 
-static HostLineEdit *ScreenShotPath()
+static HostLineEditTree *ScreenShotPath()
 {
-    HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
+    HostLineEditTree *ge = new HostLineEditTree("ScreenShotPath");
     ge->setLabel(QObject::tr("Screen shot path"));
     ge->setValue("/tmp/");
     ge->setHelpText(QObject::tr("Path to screenshot storage location. Should be writable by the frontend"));
     return ge;
 }
 
-static HostLineEdit *SetupPinCode()
+static HostLineEditTree *SetupPinCode()
 {
-    HostLineEdit *ge = new HostLineEdit("SetupPinCode");
+    HostLineEditTree *ge = new HostLineEditTree("SetupPinCode");
     ge->setLabel(QObject::tr("Setup PIN code"));
     ge->setHelpText(QObject::tr("This PIN is used to control access to the "
                     "setup menus. If you want to use this feature, then "
@@ -1732,9 +2610,9 @@ static HostLineEdit *SetupPinCode()
     return ge;
 }
 
-static HostCheckBox *SetupPinCodeRequired()
+static HostCheckBoxTree *SetupPinCodeRequired()
 {
-    HostCheckBox *gc = new HostCheckBox("SetupPinCodeRequired");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("SetupPinCodeRequired");
     gc->setLabel(QObject::tr("Require setup PIN") + "    ");
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, you will not be able to return "
@@ -1743,9 +2621,9 @@ static HostCheckBox *SetupPinCodeRequired()
     return gc;
 }
 
-static HostComboBox *XineramaScreen()
+static HostComboBoxTree *XineramaScreen()
 {
-    HostComboBox *gc = new HostComboBox("XineramaScreen", false);
+    HostComboBoxTree *gc = new HostComboBoxTree("XineramaScreen", false);
     int num = MythDisplay::GetNumberXineramaScreens();
     for (int i=0; i<num; ++i)
         gc->addSelection(QString::number(i), QString::number(i));
@@ -1758,9 +2636,9 @@ static HostComboBox *XineramaScreen()
 }
 
 
-static HostComboBox *XineramaMonitorAspectRatio()
+static HostComboBoxTree *XineramaMonitorAspectRatio()
 {
-    HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
+    HostComboBoxTree *gc = new HostComboBoxTree("XineramaMonitorAspectRatio");
     gc->setLabel(QObject::tr("Monitor aspect ratio"));
     gc->addSelection(QObject::tr("4:3"),   "1.3333");
     gc->addSelection(QObject::tr("16:9"),  "1.7777");
@@ -1771,9 +2649,9 @@ static HostComboBox *XineramaMonitorAspectRatio()
     return gc;
 }
 
-static HostComboBox *LetterboxingColour()
+static HostComboBoxTree *LetterboxingColour()
 {
-    HostComboBox *gc = new HostComboBox("LetterboxColour");
+    HostComboBoxTree *gc = new HostComboBoxTree("LetterboxColour");
     gc->setLabel(QObject::tr("Letterboxing color"));
     for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
         gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
@@ -1786,9 +2664,9 @@ static HostComboBox *LetterboxingColour()
     return gc;
 }
 
-static HostComboBox *AspectOverride()
+static HostComboBoxTree *AspectOverride()
 {
-    HostComboBox *gc = new HostComboBox("AspectOverride");
+    HostComboBoxTree *gc = new HostComboBoxTree("AspectOverride");
     gc->setLabel(QObject::tr("Video aspect override"));
     for (int m = kAspect_Off; m < kAspect_END; ++m)
         gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
@@ -1799,9 +2677,9 @@ static HostComboBox *AspectOverride()
     return gc;
 }
 
-static HostComboBox *AdjustFill()
+static HostComboBoxTree *AdjustFill()
 {
-    HostComboBox *gc = new HostComboBox("AdjustFill");
+    HostComboBoxTree *gc = new HostComboBoxTree("AdjustFill");
     gc->setLabel(QObject::tr("Zoom"));
     for (int m = kAdjustFill_Off; m < kAdjustFill_END; ++m)
         gc->addSelection(toString((AdjustFillMode)m), QString::number(m));
@@ -1817,9 +2695,9 @@ static HostComboBox *AdjustFill()
 
 // Theme settings
 
-static HostSpinBox *GuiWidth()
+static HostSpinBoxTree *GuiWidth()
 {
-    HostSpinBox *gs = new HostSpinBox("GuiWidth", 0, 1920, 8, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("GuiWidth", 0, 1920, 8, true);
     gs->setLabel(QObject::tr("GUI width (pixels)"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("The width of the GUI. Do not make the GUI "
@@ -1828,9 +2706,9 @@ static HostSpinBox *GuiWidth()
     return gs;
 }
 
-static HostSpinBox *GuiHeight()
+static HostSpinBoxTree *GuiHeight()
 {
-    HostSpinBox *gs = new HostSpinBox("GuiHeight", 0, 1600, 8, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("GuiHeight", 0, 1600, 8, true);
     gs->setLabel(QObject::tr("GUI height (pixels)"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("The height of the GUI. Do not make the GUI "
@@ -1839,9 +2717,9 @@ static HostSpinBox *GuiHeight()
     return gs;
 }
 
-static HostSpinBox *GuiOffsetX()
+static HostSpinBoxTree *GuiOffsetX()
 {
-    HostSpinBox *gs = new HostSpinBox("GuiOffsetX", -3840, 3840, 32, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("GuiOffsetX", -3840, 3840, 32, true);
     gs->setLabel(QObject::tr("GUI X offset"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("The horizontal offset where the GUI will be "
@@ -1849,9 +2727,9 @@ static HostSpinBox *GuiOffsetX()
     return gs;
 }
 
-static HostSpinBox *GuiOffsetY()
+static HostSpinBoxTree *GuiOffsetY()
 {
-    HostSpinBox *gs = new HostSpinBox("GuiOffsetY", -1600, 1600, 8, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("GuiOffsetY", -1600, 1600, 8, true);
     gs->setLabel(QObject::tr("GUI Y offset"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("The vertical offset where the GUI will be "
@@ -1883,9 +2761,9 @@ static HostSpinBox *DisplaySizeHeight()
 }
 #endif
 
-static HostCheckBox *GuiSizeForTV()
+static HostCheckBoxTree *GuiSizeForTV()
 {
-    HostCheckBox *gc = new HostCheckBox("GuiSizeForTV");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("GuiSizeForTV");
     gc->setLabel(QObject::tr("Use GUI size for TV playback"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, use the above size for TV, "
@@ -1894,45 +2772,34 @@ static HostCheckBox *GuiSizeForTV()
 }
 
 #if defined(USING_XRANDR) || CONFIG_DARWIN
-static HostCheckBox *UseVideoModes()
-{
-    HostCheckBox *gc = new HostCheckBox("UseVideoModes");
-    gc->setLabel(QObject::tr("Separate video modes for GUI and TV playback"));
-    gc->setValue(false);
-    gc->setHelpText(QObject::tr("Switch X Window video modes for TV. "
-                    "Requires \"xrandr\" support."));
-    return gc;
-}
 
-static HostSpinBox *VidModeWidth(int idx)
+
+static HostSpinBoxTree *VidModeWidth(int idx)
 {
-    HostSpinBox *gs = new HostSpinBox(QString("VidModeWidth%1").arg(idx),
+    HostSpinBoxTree *gs = new HostSpinBoxTree(QString("VidModeWidth%1").arg(idx),
                                             0, 1920, 16, true);
-    gs->setLabel((idx<1) ? QObject::tr("In X"): "");
-    gs->setLabelAboveWidget(idx<1);
+    gs->setLabel(QObject::tr("In X"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("Horizontal resolution of video "
                     "which needs a special output resolution."));
     return gs;
 }
 
-static HostSpinBox *VidModeHeight(int idx)
+static HostSpinBoxTree *VidModeHeight(int idx)
 {
-    HostSpinBox *gs = new HostSpinBox(QString("VidModeHeight%1").arg(idx),
+    HostSpinBoxTree *gs = new HostSpinBoxTree(QString("VidModeHeight%1").arg(idx),
                                             0, 1080, 16, true);
-    gs->setLabel((idx<1) ? QObject::tr("In Y"): "");
-    gs->setLabelAboveWidget(idx<1);
+    gs->setLabel(QObject::tr("In Y"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("Vertical resolution of video "
                     "which needs a special output resolution."));
     return gs;
 }
 
-static HostComboBox *GuiVidModeResolution()
+static HostComboBoxTree *GuiVidModeResolution()
 {
-    HostComboBox *gc = new HostComboBox("GuiVidModeResolution");
+    HostComboBoxTree *gc = new HostComboBoxTree("GuiVidModeResolution");
     gc->setLabel(QObject::tr("GUI"));
-    gc->setLabelAboveWidget(true);
     gc->setHelpText(QObject::tr("Resolution of screen "
                     "when not watching a video."));
 
@@ -1961,7 +2828,7 @@ static HostComboBox *GuiVidModeResolution()
     return gc;
 }
 
-static HostComboBox *TVVidModeResolution(int idx=-1)
+static HostComboBoxTree *TVVidModeResolution(int idx=-1)
 {
     QString dhelp = QObject::tr("Default screen resolution "
                                 "when watching a video.");
@@ -1970,13 +2837,12 @@ static HostComboBox *TVVidModeResolution(int idx=-1)
 
     QString qstr = (idx<0) ? "TVVidModeResolution" :
         QString("TVVidModeResolution%1").arg(idx);
-    HostComboBox *gc = new HostComboBox(qstr);
+    HostComboBoxTree *gc = new HostComboBoxTree(qstr);
     QString lstr = (idx<0) ? QObject::tr("Video output") :
-        ((idx<1) ? QObject::tr("Output") : "");
+        QObject::tr("Output");
     QString hstr = (idx<0) ? dhelp : ohelp;
 
     gc->setLabel(lstr);
-    gc->setLabelAboveWidget(idx<1);
     gc->setHelpText(hstr);
 
     const vector<DisplayResScreen> scr = GetVideoModes();
@@ -1988,7 +2854,7 @@ static HostComboBox *TVVidModeResolution(int idx=-1)
     return gc;
 }
 
-static HostRefreshRateComboBox *TVVidModeRefreshRate(int idx=-1)
+static HostRefreshRateComboBoxTree *TVVidModeRefreshRate(int idx=-1)
 {
     QString dhelp = QObject::tr("Default refresh rate "
                                 "when watching a video. "
@@ -1998,18 +2864,17 @@ static HostRefreshRateComboBox *TVVidModeRefreshRate(int idx=-1)
                                 "Leave at \"Any\" to automatically use the best available");
     QString qstr = (idx<0) ? "TVVidModeRefreshRate" :
         QString("TVVidModeRefreshRate%1").arg(idx);
-    HostRefreshRateComboBox *gc = new HostRefreshRateComboBox(qstr);
-    QString lstr = (idx<1) ? QObject::tr("Rate") : "";
+    HostRefreshRateComboBoxTree *gc = new HostRefreshRateComboBoxTree(qstr);
+    QString lstr = QObject::tr("Rate");
     QString hstr = (idx<0) ? dhelp : ohelp;
 
     gc->setLabel(lstr);
-    gc->setLabelAboveWidget(idx<1);
     gc->setHelpText(hstr);
-    gc->setEnabled(false);
+//TODO    gc->setEnabled(false);
     return gc;
 }
 
-static HostComboBox *TVVidModeForceAspect(int idx=-1)
+static HostComboBoxTree *TVVidModeForceAspect(int idx=-1)
 {
     QString dhelp = QObject::tr("Aspect ratio when watching a video.");
     QString ohelp = QObject::tr("Aspect ratio when watching a "
@@ -2017,9 +2882,8 @@ static HostComboBox *TVVidModeForceAspect(int idx=-1)
 
     QString qstr = (idx<0) ? "TVVidModeForceAspect" :
         QString("TVVidModeForceAspect%1").arg(idx);
-    HostComboBox *gc = new HostComboBox(qstr);
-    gc->setLabel( (idx<1) ? QObject::tr("Aspect") : "" );
-    gc->setLabelAboveWidget(idx<1);
+    HostComboBoxTree *gc = new HostComboBoxTree(qstr);
+    gc->setLabel(QObject::tr("Aspect"));
 
     QString hstr = (idx<0) ? dhelp : ohelp;
     gc->setHelpText(hstr+"  "+
@@ -2032,61 +2896,53 @@ static HostComboBox *TVVidModeForceAspect(int idx=-1)
     return gc;
 }
 
-class VideoModeSettings : public TriggeredConfigurationGroup
+static HostCheckBoxTree *UseVideoModes()
 {
-  public:
-    VideoModeSettings() :
-        TriggeredConfigurationGroup(false, true, false, false)
-    {
-        setLabel(QObject::tr("Video Mode Settings"));
-        setUseLabel(false);
-
-        Setting *videomode = UseVideoModes();
-        addChild(videomode);
-        setTrigger(videomode);
-
-        ConfigurationGroup* defaultsettings =
-            new HorizontalConfigurationGroup(false, false);
-
-        HostComboBox *res = TVVidModeResolution();
-        HostRefreshRateComboBox *rate = TVVidModeRefreshRate();
-        defaultsettings->addChild(GuiVidModeResolution());
-        defaultsettings->addChild(res);
-        defaultsettings->addChild(rate);
-        defaultsettings->addChild(TVVidModeForceAspect());
-        connect(res, SIGNAL(valueChanged(const QString&)),
-                rate, SLOT(ChangeResolution(const QString&)));
+    HostCheckBoxTree *gc = new HostCheckBoxTree("UseVideoModes");
+    gc->setLabel(QObject::tr("Separate video modes for GUI and TV playback"));
+    gc->setValue(false);
+    gc->setHelpText(QObject::tr("Switch X Window video modes for TV. "
+                    "Requires \"xrandr\" support."));
 
-        ConfigurationGroup* overrides =
-            new GridConfigurationGroup(5, true, true, false, true);
-        overrides->setLabel(QObject::tr("Overrides for specific video sizes"));
+    GroupSetting* defaultsettings = new GroupSetting();
 
-        for (int idx = 0; idx < 3; ++idx)
-        {
-            //input side
-            overrides->addChild(VidModeWidth(idx));
-            overrides->addChild(VidModeHeight(idx));
-            // output side
-            overrides->addChild(res = TVVidModeResolution(idx));
-            overrides->addChild(rate = TVVidModeRefreshRate(idx));
-            overrides->addChild(TVVidModeForceAspect(idx));
-            connect(res, SIGNAL(valueChanged(const QString&)),
-                    rate, SLOT(ChangeResolution(const QString&)));
-        }
+    defaultsettings->setLabel(QObject::tr("Default video mode") );
+
+    HostComboBoxTree *res = TVVidModeResolution();
+    HostRefreshRateComboBoxTree *rate = TVVidModeRefreshRate();
+    defaultsettings->addChild(GuiVidModeResolution());
+    defaultsettings->addChild(res);
+    defaultsettings->addChild(rate);
+    defaultsettings->addChild(TVVidModeForceAspect());
+    QObject::connect(res, SIGNAL(settingValueChanged(const QString&)),
+            rate, SLOT(ChangeResolution(const QString&)));
 
-        ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
-        settings->addChild(defaultsettings);
-        settings->addChild(overrides);
+    gc->addChild(true,defaultsettings);
 
-        addTarget("1", settings);
-        addTarget("0", new VerticalConfigurationGroup(true));
+    for (int idx = 0; idx < 3; ++idx)
+    {
+        GroupSetting * videoOverride = new GroupSetting();
+        videoOverride->setLabel(QObject::tr("Video override") + " #"+QString("%1").arg(idx+1));
+        //input side
+        videoOverride->addChild(VidModeWidth(idx));
+        videoOverride->addChild(VidModeHeight(idx));
+        // output side
+        videoOverride->addChild(res = TVVidModeResolution(idx));
+        videoOverride->addChild(rate = TVVidModeRefreshRate(idx));
+        videoOverride->addChild(TVVidModeForceAspect(idx));
+        QObject::connect(res, SIGNAL(settingValueChanged(const QString&)),
+                rate, SLOT(ChangeResolution(const QString&)));
+        gc->addChild(true,videoOverride);
     }
-};
+
+    return gc;
+}
+
 #endif
 
-static HostCheckBox *HideMouseCursor()
+static HostCheckBoxTree *HideMouseCursor()
 {
-    HostCheckBox *gc = new HostCheckBox("HideMouseCursor");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("HideMouseCursor");
     gc->setLabel(QObject::tr("Hide mouse cursor in MythTV"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("Toggles mouse cursor visibility for touchscreens. "
@@ -2096,9 +2952,9 @@ static HostCheckBox *HideMouseCursor()
 };
 
 
-static HostCheckBox *RunInWindow()
+static HostCheckBoxTree *RunInWindow()
 {
-    HostCheckBox *gc = new HostCheckBox("RunFrontendInWindow");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("RunFrontendInWindow");
     gc->setLabel(QObject::tr("Use window border"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("Toggles between windowed and "
@@ -2106,10 +2962,10 @@ static HostCheckBox *RunInWindow()
     return gc;
 }
 
-static HostCheckBox *UseFixedWindowSize()
+static HostCheckBoxTree *UseFixedWindowSize()
 {
 {
-    HostCheckBox *gc = new HostCheckBox("UseFixedWindowSize");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("UseFixedWindowSize");
     gc->setLabel(QObject::tr("Use fixed window size"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr(
@@ -2119,9 +2975,9 @@ static HostCheckBox *UseFixedWindowSize()
 }
 }
 
-static HostComboBox *MythDateFormatCB()
+static HostComboBoxTree *MythDateFormatCB()
 {
-    HostComboBox *gc = new HostComboBox("DateFormat");
+    HostComboBoxTree *gc = new HostComboBoxTree("DateFormat");
     gc->setLabel(QObject::tr("Date format"));
 
     QDate sampdate = QDate::currentDate();
@@ -2160,9 +3016,9 @@ static HostComboBox *MythDateFormatCB()
     return gc;
 }
 
-static HostComboBox *MythShortDateFormat()
+static HostComboBoxTree *MythShortDateFormat()
 {
-    HostComboBox *gc = new HostComboBox("ShortDateFormat");
+    HostComboBoxTree *gc = new HostComboBoxTree("ShortDateFormat");
     gc->setLabel(QObject::tr("Short date format"));
 
     QDate sampdate = QDate::currentDate();
@@ -2199,9 +3055,9 @@ static HostComboBox *MythShortDateFormat()
     return gc;
 }
 
-static HostComboBox *MythTimeFormat()
+static HostComboBoxTree *MythTimeFormat()
 {
-    HostComboBox *gc = new HostComboBox("TimeFormat");
+    HostComboBoxTree *gc = new HostComboBoxTree("TimeFormat");
     gc->setLabel(QObject::tr("Time format"));
 
     QTime samptime = QTime::currentTime();
@@ -2219,9 +3075,9 @@ static HostComboBox *MythTimeFormat()
     return gc;
 }
 
-static HostComboBox *ChannelFormat()
+static HostComboBoxTree *ChannelFormat()
 {
-    HostComboBox *gc = new HostComboBox("ChannelFormat");
+    HostComboBoxTree *gc = new HostComboBoxTree("ChannelFormat");
     gc->setLabel(QObject::tr("Channel format"));
     gc->addSelection(QObject::tr("number"), "<num>");
     gc->addSelection(QObject::tr("number callsign"), "<num> <sign>");
@@ -2233,9 +3089,9 @@ static HostComboBox *ChannelFormat()
     return gc;
 }
 
-static HostComboBox *LongChannelFormat()
+static HostComboBoxTree *LongChannelFormat()
 {
-    HostComboBox *gc = new HostComboBox("LongChannelFormat");
+    HostComboBoxTree *gc = new HostComboBoxTree("LongChannelFormat");
     gc->setLabel(QObject::tr("Long channel format"));
     gc->addSelection(QObject::tr("number"), "<num>");
     gc->addSelection(QObject::tr("number callsign"), "<num> <sign>");
@@ -2247,9 +3103,9 @@ static HostComboBox *LongChannelFormat()
     return gc;
 }
 
-static GlobalCheckBox *LastFreeCard()
+static GlobalCheckBoxTree *LastFreeCard()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("LastFreeCard");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("LastFreeCard");
     bc->setLabel(QObject::tr("Avoid conflicts between Live TV and "
                  "scheduled shows"));
     bc->setValue(false);
@@ -2259,9 +3115,9 @@ static GlobalCheckBox *LastFreeCard()
     return bc;
 }
 
-static GlobalCheckBox *LiveTVPriority()
+static GlobalCheckBoxTree *LiveTVPriority()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("LiveTVPriority");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("LiveTVPriority");
     bc->setLabel(QObject::tr("Allow Live TV to move scheduled shows"));
     bc->setValue(false);
     bc->setHelpText(QObject::tr("If enabled, scheduled recordings will "
@@ -2270,20 +3126,9 @@ static GlobalCheckBox *LiveTVPriority()
     return bc;
 }
 
-static HostCheckBox *ChannelGroupRememberLast()
+static HostComboBoxTree *ChannelGroupDefault()
 {
-    HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast");
-    gc->setLabel(QObject::tr("Remember last channel group"));
-    gc->setHelpText(QObject::tr("If enabled, the EPG will initially display "
-                    "only the channels from the last channel group selected. Pressing "
-                    "\"4\" will toggle channel group."));
-    gc->setValue(false);
-    return gc;
-}
-
-static HostComboBox *ChannelGroupDefault()
-{
-    HostComboBox *gc = new HostComboBox("ChannelGroupDefault");
+    HostComboBoxTree *gc = new HostComboBoxTree("ChannelGroupDefault");
     gc->setLabel(QObject::tr("Default channel group"));
 
     ChannelGroupList changrplist;
@@ -2303,9 +3148,9 @@ static HostComboBox *ChannelGroupDefault()
     return gc;
 }
 
-static HostCheckBox *BrowseChannelGroup()
+static HostCheckBoxTree *BrowseChannelGroup()
 {
-    HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("BrowseChannelGroup");
     gc->setLabel(QObject::tr("Browse/change channels from Channel Group"));
     gc->setHelpText(QObject::tr("If enabled, Live TV will browse or change "
                     "channels from the selected channel group. The \"All "
@@ -2315,33 +3160,25 @@ static HostCheckBox *BrowseChannelGroup()
     return gc;
 }
 
-// Channel Group Settings
-class ChannelGroupSettings : public TriggeredConfigurationGroup
+static HostCheckBoxTree *ChannelGroupRememberLast()
 {
-  public:
-    ChannelGroupSettings() : TriggeredConfigurationGroup(false, true, false, false)
-    {
-         setLabel(QObject::tr("Remember last channel group"));
-         setUseLabel(false);
-
-         Setting* RememberChanGrpEnabled = ChannelGroupRememberLast();
-         addChild(RememberChanGrpEnabled);
-         setTrigger(RememberChanGrpEnabled);
+    HostCheckBoxTree *gc = new HostCheckBoxTree("ChannelGroupRememberLast");
+    gc->setLabel(QObject::tr("Remember last channel group"));
+    gc->setHelpText(QObject::tr("If enabled, the EPG will initially display "
+                    "only the channels from the last channel group selected. Pressing "
+                    "\"4\" will toggle channel group."));
+    gc->addChild(false, ChannelGroupDefault());
 
-         ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
-         settings->addChild(ChannelGroupDefault());
-         addTarget("0", settings);
+    gc->setValue(false);
 
-         // show nothing if RememberChanGrpEnabled is on
-         addTarget("1", new VerticalConfigurationGroup(true,false));
-     };
-};
+    return gc;
+}
 
 // General RecPriorities settings
 
-static GlobalCheckBox *GRSchedMoveHigher()
+static GlobalCheckBoxTree *GRSchedMoveHigher()
 {
-    GlobalCheckBox *bc = new GlobalCheckBox("SchedMoveHigher");
+    GlobalCheckBoxTree *bc = new GlobalCheckBoxTree("SchedMoveHigher");
     bc->setLabel(QObject::tr("Reschedule higher priorities"));
     bc->setHelpText(QObject::tr("Move higher priority programs to other "
                     "cards and showings when resolving conflicts. This "
@@ -2352,9 +3189,9 @@ static GlobalCheckBox *GRSchedMoveHigher()
     return bc;
 }
 
-static GlobalComboBox *GRSchedOpenEnd()
+static GlobalComboBoxTree *GRSchedOpenEnd()
 {
-    GlobalComboBox *bc = new GlobalComboBox("SchedOpenEnd");
+    GlobalComboBoxTree *bc = new GlobalComboBoxTree("SchedOpenEnd");
     bc->setLabel(QObject::tr("Avoid back to back recordings"));
     bc->setHelpText(QObject::tr("Selects the situations where the scheduler "
                     "will avoid assigning shows to the same card if their "
@@ -2367,9 +3204,9 @@ static GlobalComboBox *GRSchedOpenEnd()
     return bc;
 }
 
-static GlobalSpinBox *GRDefaultStartOffset()
+static GlobalSpinBoxTree *GRDefaultStartOffset()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("DefaultStartOffset",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("DefaultStartOffset",
                                           -10, 30, 5, true);
     bs->setLabel(QObject::tr("Default 'Start Early' minutes for new "
                              "recording rules"));
@@ -2382,9 +3219,9 @@ static GlobalSpinBox *GRDefaultStartOffset()
     return bs;
 }
 
-static GlobalSpinBox *GRDefaultEndOffset()
+static GlobalSpinBoxTree *GRDefaultEndOffset()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("DefaultEndOffset",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("DefaultEndOffset",
                                           -10, 30, 5, true);
     bs->setLabel(QObject::tr("Default 'End Late' minutes for new "
                              "recording rules"));
@@ -2397,9 +3234,9 @@ static GlobalSpinBox *GRDefaultEndOffset()
     return bs;
 }
 
-static GlobalSpinBox *GRPrefInputRecPriority()
+static GlobalSpinBoxTree *GRPrefInputRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("PrefInputPriority", 1, 99, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("PrefInputPriority", 1, 99, 1);
     bs->setLabel(QObject::tr("Preferred input priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
                     "matches the preferred input selected in the 'Scheduling "
@@ -2408,9 +3245,9 @@ static GlobalSpinBox *GRPrefInputRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRHDTVRecPriority()
+static GlobalSpinBoxTree *GRHDTVRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("HDTVRecPriority", -99, 99, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("HDTVRecPriority", -99, 99, 1);
     bs->setLabel(QObject::tr("HDTV recording priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
                     "is marked as an HDTV broadcast in the TV listings."));
@@ -2418,9 +3255,9 @@ static GlobalSpinBox *GRHDTVRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRWSRecPriority()
+static GlobalSpinBoxTree *GRWSRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("WSRecPriority", -99, 99, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("WSRecPriority", -99, 99, 1);
     bs->setLabel(QObject::tr("Widescreen recording priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
                     "is marked as widescreen in the TV listings."));
@@ -2428,9 +3265,9 @@ static GlobalSpinBox *GRWSRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRAutoRecPriority()
+static GlobalSpinBoxTree *GRAutoRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("AutoRecPriority", -99, 99, 1);
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("AutoRecPriority", -99, 99, 1);
     bs->setLabel(QObject::tr("Automatic priority range (+/-)"));
     bs->setHelpText(QObject::tr("Up to this number of priority points may "
                     "be added for titles that are usually watched soon after "
@@ -2440,9 +3277,9 @@ static GlobalSpinBox *GRAutoRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRSignLangRecPriority()
+static GlobalSpinBoxTree *GRSignLangRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("SignLangRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("SignLangRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Sign language recording priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
@@ -2451,9 +3288,9 @@ static GlobalSpinBox *GRSignLangRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GROnScrSubRecPriority()
+static GlobalSpinBoxTree *GROnScrSubRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("OnScrSubRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("OnScrSubRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("In-vision Subtitles Recording Priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
@@ -2462,9 +3299,9 @@ static GlobalSpinBox *GROnScrSubRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRCCRecPriority()
+static GlobalSpinBoxTree *GRCCRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("CCRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("CCRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Subtitles/CC recording priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
@@ -2474,9 +3311,9 @@ static GlobalSpinBox *GRCCRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRHardHearRecPriority()
+static GlobalSpinBoxTree *GRHardHearRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("HardHearRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("HardHearRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Hard of hearing priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
@@ -2486,9 +3323,9 @@ static GlobalSpinBox *GRHardHearRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRAudioDescRecPriority()
+static GlobalSpinBoxTree *GRAudioDescRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("AudioDescRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("AudioDescRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Audio described priority"));
     bs->setHelpText(QObject::tr("Additional priority when a showing "
@@ -2497,9 +3334,9 @@ static GlobalSpinBox *GRAudioDescRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRSingleRecordRecPriority()
+static GlobalSpinBoxTree *GRSingleRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("SingleRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("SingleRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Single recordings priority"));
     bs->setHelpText(QObject::tr("Single recordings will receive this "
@@ -2508,9 +3345,9 @@ static GlobalSpinBox *GRSingleRecordRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRWeekslotRecordRecPriority()
+static GlobalSpinBoxTree *GRWeekslotRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("WeekslotRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("WeekslotRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Weekslot recordings priority"));
     bs->setHelpText(QObject::tr("Weekslot recordings will receive this "
@@ -2519,9 +3356,9 @@ static GlobalSpinBox *GRWeekslotRecordRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRTimeslotRecordRecPriority()
+static GlobalSpinBoxTree *GRTimeslotRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("TimeslotRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("TimeslotRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Timeslot recordings priority"));
     bs->setHelpText(QObject::tr("Timeslot recordings will receive this "
@@ -2530,9 +3367,9 @@ static GlobalSpinBox *GRTimeslotRecordRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRChannelRecordRecPriority()
+static GlobalSpinBoxTree *GRChannelRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("ChannelRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("ChannelRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Channel recordings priority"));
     bs->setHelpText(QObject::tr("Channel recordings will receive this "
@@ -2541,9 +3378,9 @@ static GlobalSpinBox *GRChannelRecordRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRAllRecordRecPriority()
+static GlobalSpinBoxTree *GRAllRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("AllRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("AllRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("All recordings priority"));
     bs->setHelpText(QObject::tr("The 'All' recording type will receive this "
@@ -2552,9 +3389,9 @@ static GlobalSpinBox *GRAllRecordRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GRFindOneRecordRecPriority()
+static GlobalSpinBoxTree *GRFindOneRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("FindOneRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("FindOneRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Find one recordings priority"));
     bs->setHelpText(QObject::tr("Find One, Find Weekly and Find Daily "
@@ -2564,9 +3401,9 @@ static GlobalSpinBox *GRFindOneRecordRecPriority()
     return bs;
 }
 
-static GlobalSpinBox *GROverrideRecordRecPriority()
+static GlobalSpinBoxTree *GROverrideRecordRecPriority()
 {
-    GlobalSpinBox *bs = new GlobalSpinBox("OverrideRecordRecPriority",
+    GlobalSpinBoxTree *bs = new GlobalSpinBoxTree("OverrideRecordRecPriority",
                                             -99, 99, 1);
     bs->setLabel(QObject::tr("Override recordings priority"));
     bs->setHelpText(QObject::tr("Override recordings will receive this "
@@ -2575,9 +3412,9 @@ static GlobalSpinBox *GROverrideRecordRecPriority()
     return bs;
 }
 
-static HostLineEdit *DefaultTVChannel()
+static HostLineEditTree *DefaultTVChannel()
 {
-    HostLineEdit *ge = new HostLineEdit("DefaultTVChannel");
+    HostLineEditTree *ge = new HostLineEditTree("DefaultTVChannel");
     ge->setLabel(QObject::tr("Guide starts at channel"));
     ge->setValue("3");
     ge->setHelpText(QObject::tr("The program guide starts on this channel if "
@@ -2585,9 +3422,9 @@ static HostLineEdit *DefaultTVChannel()
     return ge;
 }
 
-static HostSpinBox *EPGRecThreshold()
+static HostSpinBoxTree *EPGRecThreshold()
 {
-    HostSpinBox *gs = new HostSpinBox("SelChangeRecThreshold", 1, 600, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("SelChangeRecThreshold", 1, 600, 1);
     gs->setLabel(QObject::tr("Record threshold"));
     gs->setValue(16);
     gs->setHelpText(QObject::tr("Pressing SELECT on a show that is at least "
@@ -2596,9 +3433,9 @@ static HostSpinBox *EPGRecThreshold()
     return gs;
 }
 
-static HostComboBox *MythLanguage()
+static HostComboBoxTree *MythLanguage()
 {
-    HostComboBox *gc = new HostComboBox("Language");
+    HostComboBoxTree *gc = new HostComboBoxTree("Language");
     gc->setLabel(QObject::tr("Language"));
 
     QMap<QString, QString> langMap = MythTranslation::getLanguages();
@@ -2620,9 +3457,9 @@ static HostComboBox *MythLanguage()
     return gc;
 }
 
-static void ISO639_fill_selections(SelectSetting *widget, uint i)
+static void ISO639_fill_selections(ComboBoxTree *listSetting, uint i)
 {
-    widget->clearSelections();
+    listSetting->clearSelections();
     QString q = QString("ISO639Language%1").arg(i);
     QString lang = gCoreContext->GetSetting(q, "").toLower();
 
@@ -2643,13 +3480,13 @@ static void ISO639_fill_selections(SelectSetting *widget, uint i)
             desc = desc.left(idx);
 
         const QString il = iso639_key_to_str3(it.key());
-        widget->addSelection(desc, il, il == lang);
+        listSetting->addSelection(desc, il, il == lang);
     }
 }
 
-static GlobalComboBox *ISO639PreferredLanguage(uint i)
+static GlobalComboBoxTree *ISO639PreferredLanguage(uint i)
 {
-    GlobalComboBox *gc = new GlobalComboBox(QString("ISO639Language%1").arg(i));
+    GlobalComboBoxTree *gc = new GlobalComboBoxTree(QString("ISO639Language%1").arg(i));
     gc->setLabel(QObject::tr("Guide language #%1").arg(i+1));
     // We should try to get language from "MythLanguage"
     // then use code 2 to code 3 map in iso639.h
@@ -2660,29 +3497,33 @@ static GlobalComboBox *ISO639PreferredLanguage(uint i)
     return gc;
 }
 
-static HostCheckBox *NetworkControlEnabled()
+static HostSpinBoxTree *NetworkControlPort()
+{
+    HostSpinBoxTree *gs = new HostSpinBoxTree("NetworkControlPort", 1025, 65535, 1);
+    gs->setLabel(QObject::tr("Network Remote Control port"));
+    gs->setValue(6546);
+    gs->setHelpText(QObject::tr("This specifies what port the network remote "
+                    "Control interface will listen on for new connections."));
+    return gs;
+}
+
+static HostCheckBoxTree *NetworkControlEnabled()
 {
-    HostCheckBox *gc = new HostCheckBox("NetworkControlEnabled");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("NetworkControlEnabled");
     gc->setLabel(QObject::tr("Enable Network Remote Control interface"));
     gc->setHelpText(QObject::tr("This enables support for controlling "
                     "mythfrontend over the network."));
     gc->setValue(false);
+
+    gc->addChild(true, NetworkControlPort());
     return gc;
 }
 
-static HostSpinBox *NetworkControlPort()
-{
-    HostSpinBox *gs = new HostSpinBox("NetworkControlPort", 1025, 65535, 1);
-    gs->setLabel(QObject::tr("Network Remote Control port"));
-    gs->setValue(6546);
-    gs->setHelpText(QObject::tr("This specifies what port the network remote "
-                    "Control interface will listen on for new connections."));
-    return gs;
-}
 
-static HostLineEdit *UDPNotifyPort()
+
+static HostLineEditTree *UDPNotifyPort()
 {
-    HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
+    HostLineEditTree *ge = new HostLineEditTree("UDPNotifyPort");
     ge->setLabel(QObject::tr("UDP notify port"));
     ge->setValue("6948");
     ge->setHelpText(QObject::tr("MythTV will listen for "
@@ -2692,9 +3533,9 @@ static HostLineEdit *UDPNotifyPort()
     return ge;
 }
 
-static HostCheckBox *RealtimePriority()
+static HostCheckBoxTree *RealtimePriority()
 {
-    HostCheckBox *gc = new HostCheckBox("RealtimePriority");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("RealtimePriority");
     gc->setLabel(QObject::tr("Enable realtime priority threads"));
     gc->setHelpText(QObject::tr("When running mythfrontend with root "
                     "privileges, some threads can be given enhanced priority. "
@@ -2704,21 +3545,9 @@ static HostCheckBox *RealtimePriority()
     return gc;
 }
 
-static HostCheckBox *EnableMediaMon()
-{
-    HostCheckBox *gc = new HostCheckBox("MonitorDrives");
-    gc->setLabel(QObject::tr("Monitor CD/DVD") +
-                 QObject::tr(" (and other removable devices)"));
-    gc->setHelpText(QObject::tr("This enables support for monitoring "
-                    "your CD/DVD drives for new disks and launching "
-                    "the proper plugin to handle them."));
-    gc->setValue(false);
-    return gc;
-}
-
-static HostLineEdit *IgnoreMedia()
+static HostLineEditTree *IgnoreMedia()
 {
-    HostLineEdit *ge = new HostLineEdit("IgnoreDevices");
+    HostLineEditTree *ge = new HostLineEditTree("IgnoreDevices");
     ge->setLabel(QObject::tr("Ignore devices"));
     ge->setValue("");
     ge->setHelpText(QObject::tr("If there are any devices that you do not want "
@@ -2727,32 +3556,22 @@ static HostLineEdit *IgnoreMedia()
     return ge;
 }
 
-class MythMediaSettings : public TriggeredConfigurationGroup
+static HostCheckBoxTree *EnableMediaMon()
 {
-  public:
-     MythMediaSettings() :
-         TriggeredConfigurationGroup(false, false, true, true)
-     {
-         setLabel(QObject::tr("MythMediaMonitor"));
-         setUseLabel(false);
-
-         Setting* enabled = EnableMediaMon();
-         addChild(enabled);
-         setTrigger(enabled);
-
-         ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
-         settings->addChild(IgnoreMedia());
-         addTarget("1", settings);
-
-         // show nothing if fillEnabled is off
-         addTarget("0", new VerticalConfigurationGroup(true));
-     };
-};
-
+    HostCheckBoxTree *gc = new HostCheckBoxTree("MonitorDrives");
+    gc->setLabel(QObject::tr("Monitor CD/DVD") +
+                 QObject::tr(" (and other removable devices)"));
+    gc->setHelpText(QObject::tr("This enables support for monitoring "
+                    "your CD/DVD drives for new disks and launching "
+                    "the proper plugin to handle them."));
+    gc->addChild(true,IgnoreMedia());
+    gc->setValue(false);
+    return gc;
+}
 
-static HostComboBox *DisplayGroupTitleSort()
+static HostComboBoxTree *DisplayGroupTitleSort()
 {
-    HostComboBox *gc = new HostComboBox("DisplayGroupTitleSort");
+    HostComboBoxTree *gc = new HostComboBoxTree("DisplayGroupTitleSort");
     gc->setLabel(QObject::tr("Sort titles"));
     gc->addSelection(QObject::tr("Alphabetically"),
             QString::number(PlaybackBox::TitleSortAlphabetical));
@@ -2763,21 +3582,9 @@ static HostComboBox *DisplayGroupTitleSort()
     return gc;
 }
 
-static HostCheckBox *PlaybackWatchList()
-{
-    HostCheckBox *gc = new HostCheckBox("PlaybackWatchList");
-    gc->setLabel(QObject::tr("Include the 'Watch List' group"));
-    gc->setValue(true);
-    gc->setHelpText(QObject::tr("The 'Watch List' is an abbreviated list of "
-                                "recordings sorted to highlight series and "
-                                "shows that need attention in order to "
-                                "keep up to date."));
-    return gc;
-}
-
-static HostCheckBox *PlaybackWLStart()
+static HostCheckBoxTree *PlaybackWLStart()
 {
-    HostCheckBox *gc = new HostCheckBox("PlaybackWLStart");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("PlaybackWLStart");
     gc->setLabel(QObject::tr("Start from the Watch List view"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, the 'Watch List' will be the "
@@ -2786,9 +3593,9 @@ static HostCheckBox *PlaybackWLStart()
     return gc;
 }
 
-static HostCheckBox *PlaybackWLAutoExpire()
+static HostCheckBoxTree *PlaybackWLAutoExpire()
 {
-    HostCheckBox *gc = new HostCheckBox("PlaybackWLAutoExpire");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("PlaybackWLAutoExpire");
     gc->setLabel(QObject::tr("Exclude recordings not set for Auto-Expire"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("Set this if you turn off Auto-Expire only "
@@ -2798,9 +3605,9 @@ static HostCheckBox *PlaybackWLAutoExpire()
     return gc;
 }
 
-static HostSpinBox *PlaybackWLMaxAge()
+static HostSpinBoxTree *PlaybackWLMaxAge()
 {
-    HostSpinBox *gs = new HostSpinBox("PlaybackWLMaxAge", 30, 180, 10);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("PlaybackWLMaxAge", 30, 180, 10);
     gs->setLabel(QObject::tr("Maximum days counted in the score"));
     gs->setValue(60);
     gs->setHelpText(QObject::tr("The 'Watch List' scores are based on 1 point "
@@ -2810,9 +3617,9 @@ static HostSpinBox *PlaybackWLMaxAge()
     return gs;
 }
 
-static HostSpinBox *PlaybackWLBlackOut()
+static HostSpinBoxTree *PlaybackWLBlackOut()
 {
-    HostSpinBox *gs = new HostSpinBox("PlaybackWLBlackOut", 0, 5, 1);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("PlaybackWLBlackOut", 0, 5, 1);
     gs->setLabel(QObject::tr("Days to exclude weekly episodes after delete"));
     gs->setValue(2);
     gs->setHelpText(QObject::tr("When an episode is deleted or marked as "
@@ -2823,40 +3630,36 @@ static HostSpinBox *PlaybackWLBlackOut()
     return gs;
 }
 
-class WatchListSettings : public TriggeredConfigurationGroup
+
+static HostCheckBoxTree *PlaybackWatchList()
 {
-  public:
-     WatchListSettings() :
-         TriggeredConfigurationGroup(false, false, true, true)
-     {
-
-         Setting* watchList = PlaybackWatchList();
-         addChild(watchList);
-         setTrigger(watchList);
-
-         ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
-         settings->addChild(PlaybackWLStart());
-         settings->addChild(PlaybackWLAutoExpire());
-         settings->addChild(PlaybackWLMaxAge());
-         settings->addChild(PlaybackWLBlackOut());
-         addTarget("1", settings);
-
-         addTarget("0", new VerticalConfigurationGroup(true));
-    };
-};
+    HostCheckBoxTree *gc = new HostCheckBoxTree("PlaybackWatchList");
+    gc->setLabel(QObject::tr("Include the 'Watch List' group"));
+    gc->setValue(true);
+    gc->setHelpText(QObject::tr("The 'Watch List' is an abbreviated list of "
+                                "recordings sorted to highlight series and "
+                                "shows that need attention in order to "
+                                "keep up to date."));
+
+    gc->addChild(true,PlaybackWLStart());
+    gc->addChild(true,PlaybackWLAutoExpire());
+    gc->addChild(true,PlaybackWLMaxAge());
+    gc->addChild(true,PlaybackWLBlackOut());
+    return gc;
+}
 
-static HostCheckBox *LCDShowTime()
+static HostCheckBoxTree *LCDShowTime()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowTime");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowTime");
     gc->setLabel(QObject::tr("Display time"));
     gc->setHelpText(QObject::tr("Display current time on idle LCD display. "));
     gc->setValue(true);
     return gc;
 }
 
-static HostCheckBox *LCDShowRecStatus()
+static HostCheckBoxTree *LCDShowRecStatus()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowRecStatus");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowRecStatus");
     gc->setLabel(QObject::tr("Display recording status"));
     gc->setHelpText(QObject::tr("Display current recordings information on "
                                 "LCD display."));
@@ -2864,18 +3667,18 @@ static HostCheckBox *LCDShowRecStatus()
     return gc;
 }
 
-static HostCheckBox *LCDShowMenu()
+static HostCheckBoxTree *LCDShowMenu()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowMenu");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowMenu");
     gc->setLabel(QObject::tr("Display menus"));
     gc->setHelpText(QObject::tr("Display selected menu on LCD display. "));
     gc->setValue(true);
     return gc;
 }
 
-static HostSpinBox *LCDPopupTime()
+static HostSpinBoxTree *LCDPopupTime()
 {
-    HostSpinBox *gs = new HostSpinBox("LCDPopupTime", 1, 300, 1, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("LCDPopupTime", 1, 300, 1, true);
     gs->setLabel(QObject::tr("Menu pop-up time"));
     gs->setHelpText(QObject::tr("How many seconds the menu will "
                     "remain visible after navigation."));
@@ -2883,9 +3686,9 @@ static HostSpinBox *LCDPopupTime()
     return gs;
 }
 
-static HostCheckBox *LCDShowMusic()
+static HostCheckBoxTree *LCDShowMusic()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowMusic");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowMusic");
     gc->setLabel(QObject::tr("Display music artist and title"));
     gc->setHelpText(QObject::tr("Display playing artist and song title in "
                     "MythMusic on LCD display."));
@@ -2893,9 +3696,9 @@ static HostCheckBox *LCDShowMusic()
     return gc;
 }
 
-static HostComboBox *LCDShowMusicItems()
+static HostComboBoxTree *LCDShowMusicItems()
 {
-    HostComboBox *gc = new HostComboBox("LCDShowMusicItems");
+    HostComboBoxTree *gc = new HostComboBoxTree("LCDShowMusicItems");
     gc->setLabel(QObject::tr("Items"));
     gc->addSelection(QObject::tr("Artist - Title"), "ArtistTitle");
     gc->addSelection(QObject::tr("Artist [Album] Title"), "ArtistAlbumTitle");
@@ -2903,18 +3706,18 @@ static HostComboBox *LCDShowMusicItems()
     return gc;
 }
 
-static HostCheckBox *LCDShowChannel()
+static HostCheckBoxTree *LCDShowChannel()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowChannel");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowChannel");
     gc->setLabel(QObject::tr("Display channel information"));
     gc->setHelpText(QObject::tr("Display tuned channel information on LCD display."));
     gc->setValue(true);
     return gc;
 }
 
-static HostCheckBox *LCDShowVolume()
+static HostCheckBoxTree *LCDShowVolume()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowVolume");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowVolume");
     gc->setLabel(QObject::tr("Display volume information"));
     gc->setHelpText(QObject::tr("Display volume level information "
                                 "on LCD display."));
@@ -2922,18 +3725,18 @@ static HostCheckBox *LCDShowVolume()
     return gc;
 }
 
-static HostCheckBox *LCDShowGeneric()
+static HostCheckBoxTree *LCDShowGeneric()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDShowGeneric");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDShowGeneric");
     gc->setLabel(QObject::tr("Display generic information"));
     gc->setHelpText(QObject::tr("Display generic information on LCD display."));
     gc->setValue(true);
     return gc;
 }
 
-static HostCheckBox *LCDBacklightOn()
+static HostCheckBoxTree *LCDBacklightOn()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDBacklightOn");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDBacklightOn");
     gc->setLabel(QObject::tr("Backlight always on"));
     gc->setHelpText(QObject::tr("Turn on the backlight permanently "
                                 "on the LCD display."));
@@ -2941,27 +3744,27 @@ static HostCheckBox *LCDBacklightOn()
     return gc;
 }
 
-static HostCheckBox *LCDHeartBeatOn()
+static HostCheckBoxTree *LCDHeartBeatOn()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDHeartBeatOn");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDHeartBeatOn");
     gc->setLabel(QObject::tr("Heartbeat always on"));
     gc->setHelpText(QObject::tr("Turn on the LCD heartbeat."));
     gc->setValue(false);
     return gc;
 }
 
-static HostCheckBox *LCDBigClock()
+static HostCheckBoxTree *LCDBigClock()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDBigClock");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDBigClock");
     gc->setLabel(QObject::tr("Display large clock"));
     gc->setHelpText(QObject::tr("On multiline displays try and display the time as large as possible."));
     gc->setValue(false);
     return gc;
 }
 
-static HostLineEdit *LCDKeyString()
+static HostLineEditTree *LCDKeyString()
 {
-    HostLineEdit *ge = new HostLineEdit("LCDKeyString");
+    HostLineEditTree *ge = new HostLineEditTree("LCDKeyString");
     ge->setLabel(QObject::tr("LCD key order"));
     ge->setValue("ABCDEF");
     ge->setHelpText(QObject::tr("Enter the 6 Keypad Return Codes for your "
@@ -2972,67 +3775,36 @@ static HostLineEdit *LCDKeyString()
     return ge;
 }
 
-static HostCheckBox *LCDEnable()
+static HostCheckBoxTree *LCDEnable()
 {
-    HostCheckBox *gc = new HostCheckBox("LCDEnable");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("LCDEnable");
     gc->setLabel(QObject::tr("Enable LCD device"));
     gc->setHelpText(QObject::tr("Use an LCD display to view MythTV status "
                     "information."));
+
+    gc->addChild(true, LCDShowTime());
+    gc->addChild(true, LCDShowMenu());
+    gc->addChild(true, LCDShowMusic());
+    gc->addChild(true, LCDShowMusicItems());
+    gc->addChild(true, LCDShowChannel());
+    gc->addChild(true, LCDShowRecStatus());
+    gc->addChild(true, LCDShowVolume());
+    gc->addChild(true, LCDShowGeneric());
+    gc->addChild(true, LCDBacklightOn());
+    gc->addChild(true, LCDHeartBeatOn());
+    gc->addChild(true, LCDBigClock());
+    gc->addChild(true, LCDKeyString());;
+    gc->addChild(true, LCDPopupTime());
+
     gc->setValue(false);
     return gc;
 }
 
-class LcdSettings : public TriggeredConfigurationGroup
-{
-  public:
-    LcdSettings() : TriggeredConfigurationGroup(false, false,  false, false,
-                                                false, false, false, false)
-    {
-         setLabel(QObject::tr("LCD device display"));
-         setUseLabel(false);
-
-         Setting* lcd_enable = LCDEnable();
-         addChild(lcd_enable);
-         setTrigger(lcd_enable);
-
-         ConfigurationGroup *settings =
-             new VerticalConfigurationGroup(false, true, false, false);
-         ConfigurationGroup *setHoriz =
-             new HorizontalConfigurationGroup(false, false, false, false);
-
-         ConfigurationGroup* setLeft  =
-             new VerticalConfigurationGroup(false, false, false, false);
-         ConfigurationGroup* setRight =
-             new VerticalConfigurationGroup(false, false, false, false);
-
-         setLeft->addChild(LCDShowTime());
-         setLeft->addChild(LCDShowMenu());
-         setLeft->addChild(LCDShowMusic());
-         setLeft->addChild(LCDShowMusicItems());
-         setLeft->addChild(LCDShowChannel());
-         setLeft->addChild(LCDShowRecStatus());
-         setRight->addChild(LCDShowVolume());
-         setRight->addChild(LCDShowGeneric());
-         setRight->addChild(LCDBacklightOn());
-         setRight->addChild(LCDHeartBeatOn());
-         setRight->addChild(LCDBigClock());
-         setRight->addChild(LCDKeyString());
-         setHoriz->addChild(setLeft);
-         setHoriz->addChild(setRight);
-         settings->addChild(setHoriz);
-         settings->addChild(LCDPopupTime());
-
-         addTarget("1", settings);
-
-         addTarget("0", new VerticalConfigurationGroup(true));
-    };
-};
-
 
 #if CONFIG_DARWIN
-static HostCheckBox *MacGammaCorrect()
+static HostCheckBoxTree *MacGammaCorrect()
 {
-    HostCheckBox *gc = new HostCheckBox("MacGammaCorrect");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("MacGammaCorrect");
     gc->setLabel(QObject::tr("Enable gamma correction for video"));
     gc->setValue(false);
     gc->setHelpText(QObject::tr("If enabled, QuickTime will correct the gamma "
@@ -3041,9 +3813,9 @@ static HostCheckBox *MacGammaCorrect()
     return gc;
 }
 
-static HostCheckBox *MacScaleUp()
+static HostCheckBoxTree *MacScaleUp()
 {
-    HostCheckBox *gc = new HostCheckBox("MacScaleUp");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("MacScaleUp");
     gc->setLabel(QObject::tr("Scale video as necessary"));
     gc->setValue(true);
     gc->setHelpText(QObject::tr("If enabled, video will be scaled to fit your "
@@ -3052,9 +3824,9 @@ static HostCheckBox *MacScaleUp()
     return gc;
 }
 
-static HostSpinBox *MacFullSkip()
+static HostSpinBoxTree *MacFullSkip()
 {
-    HostSpinBox *gs = new HostSpinBox("MacFullSkip", 0, 30, 1, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("MacFullSkip", 0, 30, 1, true);
     gs->setLabel(QObject::tr("Frames to skip in fullscreen mode"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("Video displayed in fullscreen or non-windowed "
@@ -3065,22 +3837,9 @@ static HostSpinBox *MacFullSkip()
     return gs;
 }
 
-static HostCheckBox *MacMainEnabled()
+static HostSpinBoxTree *MacMainSkip()
 {
-    HostCheckBox *gc = new HostCheckBox("MacMainEnabled");
-    gc->setLabel(QObject::tr("Video in main window"));
-    gc->setValue(true);
-    gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
-                    "main GUI window. Disable this when you only want video "
-                    "on the desktop or in a floating window. Only valid when "
-                    "\"Use GUI size for TV playback\" and \"Run the "
-                    "frontend in a window\" are checked."));
-    return gc;
-}
-
-static HostSpinBox *MacMainSkip()
-{
-    HostSpinBox *gs = new HostSpinBox("MacMainSkip", 0, 30, 1, true);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("MacMainSkip", 0, 30, 1, true);
     gs->setLabel(QObject::tr("Frames to skip"));
     gs->setValue(0);
     gs->setHelpText(QObject::tr("Video in the main window will skip this many "
@@ -3089,9 +3848,9 @@ static HostSpinBox *MacMainSkip()
     return gs;
 }
 
-static HostSpinBox *MacMainOpacity()
+static HostSpinBoxTree *MacMainOpacity()
 {
-    HostSpinBox *gs = new HostSpinBox("MacMainOpacity", 0, 100, 5, false);
+    HostSpinBoxTree *gs = new HostSpinBoxTree("MacMainOpacity", 0, 100, 5, false);
     gs->setLabel(QObject::tr("Opacity"));
     gs->setValue(100);
     gs->setHelpText(QObject::tr("The opacity of the main window. Set to "
@@ -3100,36 +3859,18 @@ static HostSpinBox *MacMainOpacity()
     return gs;
 }
 
-class MacMainSettings : public TriggeredConfigurationGroup
-{
-  public:
-    MacMainSettings() : TriggeredConfigurationGroup(false)
-    {
-        setLabel(QObject::tr("Video in main window"));
-        setUseLabel(false);
-        Setting *gc = MacMainEnabled();
-        addChild(gc);
-        setTrigger(gc);
-
-        VerticalConfigurationGroup *opts =
-            new VerticalConfigurationGroup(false, false);
-        opts->addChild(MacMainSkip());
-        opts->addChild(MacMainOpacity());
-
-        addTarget("1", opts);
-        addTarget("0", new VerticalConfigurationGroup(false, false));
-    }
-};
-
-static HostCheckBox *MacFloatEnabled()
+static HostCheckBoxTree *MacMainEnabled()
 {
-    HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
-    gc->setLabel(QObject::tr("Video in floating window"));
-    gc->setValue(false);
-    gc->setHelpText(QObject::tr("If enabled, video will be displayed in a "
-                    "floating window. Only valid when \"Use GUI size for TV "
-                    "playback\" and \"Run the frontend in a window\" are "
-                    "checked."));
+    HostCheckBoxTree *gc = new HostCheckBoxTree("MacMainEnabled");
+    gc->setLabel(QObject::tr("Video in main window"));
+    gc->setValue(true);
+    gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
+                    "main GUI window. Disable this when you only want video "
+                    "on the desktop or in a floating window. Only valid when "
+                    "\"Use GUI size for TV playback\" and \"Run the "
+                    "frontend in a window\" are checked."));
+    gc->addChild(true, MacMainSkip());
+    gc->addChild(true, MacMainOpacity()); 
     return gc;
 }
 
@@ -3155,36 +3896,18 @@ static HostSpinBox *MacFloatOpacity()
     return gs;
 }
 
-class MacFloatSettings : public TriggeredConfigurationGroup
+static HostCheckBox *MacFloatEnabled()
 {
-  public:
-    MacFloatSettings() : TriggeredConfigurationGroup(false)
-    {
-        setLabel(QObject::tr("Video in floating window"));
-        setUseLabel(false);
-        Setting *gc = MacFloatEnabled();
-        addChild(gc);
-        setTrigger(gc);
-
-        VerticalConfigurationGroup *opts =
-            new VerticalConfigurationGroup(false, false);
-        opts->addChild(MacFloatSkip());
-        opts->addChild(MacFloatOpacity());
-
-        addTarget("1", opts);
-        addTarget("0", new VerticalConfigurationGroup(false, false));
-    }
-};
+    HostCheckBox *gc = new HostCheckBox("MacFloatEnabled");
+    gc->setLabel(QObject::tr("Video in floating window"));
+    gc->setValue(false);
+    gc->setHelpText(QObject::tr("If enabled, video will be displayed in a "
+                    "floating window. Only valid when \"Use GUI size for TV "
+                    "playback\" and \"Run the frontend in a window\" are "
+                    "checked."));
 
-static HostCheckBox *MacDockEnabled()
-{
-    HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
-    gc->setLabel(QObject::tr("Video in the dock"));
-    gc->setValue(true);
-    gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
-                    "application's dock icon. Only valid when \"Use GUI size "
-                    "for TV playback\" and \"Run the frontend in a window\" "
-                    "are checked."));
+    gc->addChild(true, MacFloatSkip());
+    gc->addChild(true, MacFloatOpacity());
     return gc;
 }
 
@@ -3199,32 +3922,17 @@ static HostSpinBox *MacDockSkip()
     return gs;
 }
 
-class MacDockSettings : public TriggeredConfigurationGroup
+static HostCheckBox *MacDockEnabled()
 {
-  public:
-    MacDockSettings() : TriggeredConfigurationGroup(false)
-    {
-        setLabel(QObject::tr("Video in the dock"));
-        setUseLabel(false);
-        Setting *gc = MacDockEnabled();
-        addChild(gc);
-        setTrigger(gc);
-
-        Setting *skip = MacDockSkip();
-        addTarget("1", skip);
-        addTarget("0", new HorizontalConfigurationGroup(false, false));
-    }
-};
+    HostCheckBox *gc = new HostCheckBox("MacDockEnabled");
+    gc->setLabel(QObject::tr("Video in the dock"));
+    gc->setValue(true);
+    gc->setHelpText(QObject::tr("If enabled, video will be displayed in the "
+                    "application's dock icon. Only valid when \"Use GUI size "
+                    "for TV playback\" and \"Run the frontend in a window\" "
+                    "are checked."));
 
-static HostCheckBox *MacDesktopEnabled()
-{
-    HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
-    gc->setLabel(QObject::tr("Video on the desktop"));
-    gc->setValue(false);
-    gc->setHelpText(QObject::tr("If enabled, video will be displayed on the "
-                    "desktop, behind the Finder icons. Only valid when \"Use "
-                    "GUI size for TV playback\" and \"Run the frontend in a "
-                    "window\" are checked."));
+    gc->addChild(true, MacDockSkip());
     return gc;
 }
 
@@ -3239,27 +3947,25 @@ static HostSpinBox *MacDesktopSkip()
     return gs;
 }
 
-class MacDesktopSettings : public TriggeredConfigurationGroup
+static HostCheckBox *MacDesktopEnabled()
 {
-  public:
-    MacDesktopSettings() : TriggeredConfigurationGroup(false)
-    {
-        setLabel(QObject::tr("Video on the desktop"));
-        setUseLabel(false);
-        Setting *gc = MacDesktopEnabled();
-        addChild(gc);
-        setTrigger(gc);
-
-        Setting *skip = MacDesktopSkip();
-        addTarget("1", skip);
-        addTarget("0", new HorizontalConfigurationGroup(false, false));
-    }
-};
+    HostCheckBox *gc = new HostCheckBox("MacDesktopEnabled");
+    gc->setLabel(QObject::tr("Video on the desktop"));
+    gc->setValue(false);
+    gc->setHelpText(QObject::tr("If enabled, video will be displayed on the "
+                    "desktop, behind the Finder icons. Only valid when \"Use "
+                    "GUI size for TV playback\" and \"Run the frontend in a "
+                    "window\" are checked."));
+
+    gc->addChild(true, MacDesktopSkip());
+    return gc;
+}
+
 #endif
 
-static HostCheckBox *WatchTVGuide()
+static HostCheckBoxTree *WatchTVGuide()
 {
-    HostCheckBox *gc = new HostCheckBox("WatchTVGuide");
+    HostCheckBoxTree *gc = new HostCheckBoxTree("WatchTVGuide");
     gc->setLabel(QObject::tr("Show the program guide when starting Live TV"));
     gc->setHelpText(QObject::tr("This starts the program guide immediately "
              "upon starting to watch Live TV."));
@@ -3269,119 +3975,72 @@ static HostCheckBox *WatchTVGuide()
 
 MainGeneralSettings::MainGeneralSettings()
 {
-    DatabaseSettings::addDatabaseSettings(this);
+    setLabel(QObject::tr("General"));
 
-    VerticalConfigurationGroup *pin =
-        new VerticalConfigurationGroup(false, true, false, false);
+    addChild(new MythDbSettings());
+
+    GroupSetting *pin = new GroupSetting();
     pin->setLabel(QObject::tr("Settings Access"));
     pin->addChild(SetupPinCodeRequired());
     pin->addChild(SetupPinCode());
     addChild(pin);
 
-    VerticalConfigurationGroup *general =
-        new VerticalConfigurationGroup(false, true, false, false);
+    GroupSetting *general = new GroupSetting();
     general->setLabel(QObject::tr("General"));
     general->addChild(UseVirtualKeyboard());
     general->addChild(ScreenShotPath());
     addChild(general);
 
-    VerticalConfigurationGroup *media =
-        new VerticalConfigurationGroup(false, true, false, false);
-    media->setLabel(QObject::tr("Media Monitor"));
-    MythMediaSettings *mediaMon = new MythMediaSettings();
-    media->addChild(mediaMon);
-    addChild(media);
+    addChild(EnableMediaMon());
 
-    VerticalConfigurationGroup *shutdownSettings =
-        new VerticalConfigurationGroup(true, true, false, false);
+    GroupSetting *shutdownSettings = new GroupSetting();
     shutdownSettings->setLabel(QObject::tr("Shutdown/Reboot Settings"));
     shutdownSettings->addChild(OverrideExitMenu());
     shutdownSettings->addChild(HaltCommand());
     shutdownSettings->addChild(RebootCommand());
     addChild(shutdownSettings);
 
-    VerticalConfigurationGroup *remotecontrol =
-        new VerticalConfigurationGroup(false, true, false, false);
+    GroupSetting *remotecontrol = new GroupSetting();
     remotecontrol->setLabel(QObject::tr("Remote Control"));
     remotecontrol->addChild(LircDaemonDevice());
     remotecontrol->addChild(NetworkControlEnabled());
-    remotecontrol->addChild(NetworkControlPort());
     remotecontrol->addChild(UDPNotifyPort());
     addChild(remotecontrol);
 }
 
 PlaybackSettings::PlaybackSettings()
 {
-    uint i = 0, total = 8;
-#if CONFIG_DARWIN
-    total += 2;
-#endif // USING_DARWIN
-
-
-    VerticalConfigurationGroup* general1 =
-        new VerticalConfigurationGroup(false);
-    general1->setLabel(QObject::tr("General Playback") +
-                      QString(" (%1/%2)").arg(++i).arg(total));
-
-    HorizontalConfigurationGroup *columns =
-        new HorizontalConfigurationGroup(false, false, true, true);
-
-    VerticalConfigurationGroup *column1 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    column1->addChild(RealtimePriority());
-    column1->addChild(DecodeExtraAudio());
-    column1->addChild(JumpToProgramOSD());
-    columns->addChild(column1);
-
-    VerticalConfigurationGroup *column2 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    column2->addChild(ClearSavedPosition());
-    column2->addChild(AltClearSavedPosition());
-    column2->addChild(AutomaticSetWatched());
-    column2->addChild(ContinueEmbeddedTVPlay());
-    columns->addChild(column2);
-
-    general1->addChild(columns);
-    general1->addChild(LiveTVIdleTimeout());
-    addChild(general1);
-
-    VerticalConfigurationGroup* general2 =
-        new VerticalConfigurationGroup(false);
-    general2->setLabel(QObject::tr("General Playback") +
-                      QString(" (%1/%2)").arg(++i).arg(total));
-
-    HorizontalConfigurationGroup* oscan =
-        new HorizontalConfigurationGroup(false, false, true, true);
-    VerticalConfigurationGroup *ocol1 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    VerticalConfigurationGroup *ocol2 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    ocol1->addChild(VertScanPercentage());
-    ocol1->addChild(YScanDisplacement());
-    ocol2->addChild(HorizScanPercentage());
-    ocol2->addChild(XScanDisplacement());
-    oscan->addChild(ocol1);
-    oscan->addChild(ocol2);
-
-    HorizontalConfigurationGroup* aspect_fill =
-        new HorizontalConfigurationGroup(false, false, true, true);
-    aspect_fill->addChild(AspectOverride());
-    aspect_fill->addChild(AdjustFill());
-
-    general2->addChild(oscan);
-    general2->addChild(aspect_fill);
-    general2->addChild(LetterboxingColour());
-    general2->addChild(PIPLocationComboBox());
-    general2->addChild(PlaybackExitPrompt());
-    general2->addChild(EndOfRecordingExitPrompt());
-    addChild(general2);
+    setLabel(QObject::tr("Playback"));
+    GroupSetting * general = new GroupSetting();
+    general->setLabel(QObject::tr("General Playback"));
+    general->addChild(RealtimePriority());
+    general->addChild(DecodeExtraAudio());
+    general->addChild(JumpToProgramOSD());
+    general->addChild(ClearSavedPosition());
+    general->addChild(AltClearSavedPosition());
+    general->addChild(AutomaticSetWatched());
+    general->addChild(ContinueEmbeddedTVPlay());
+    general->addChild(LiveTVIdleTimeout());
+    general->addChild(VertScanPercentage());
+    general->addChild(HorizScanPercentage());
+    general->addChild(YScanDisplacement());
+    general->addChild(XScanDisplacement());
+    general->addChild(AspectOverride());
+    general->addChild(AdjustFill());
+    general->addChild(LetterboxingColour());
+    general->addChild(PIPLocationComboBox());
+    general->addChild(PlaybackExitPrompt());
+    general->addChild(EndOfRecordingExitPrompt());
+    addChild(general);
 
-    QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
-    addChild(new PlaybackProfileConfigs(tmp));
+    //QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
+    //addChild(new GroupSetting("PlaybackProfileConfigs TODO"));
+    //TODO addChild(new PlaybackProfileConfigs(tmp));
+    addChild(new PlaybackProfileConfigs());
+    //addChild(new PlaybackProfileConfigsTree());
 
-    VerticalConfigurationGroup* pbox = new VerticalConfigurationGroup(false);
-    pbox->setLabel(QObject::tr("View Recordings") +
-                   QString(" (%1/%2)").arg(++i).arg(total));
+    GroupSetting* pbox = new GroupSetting();
+    pbox->setLabel(QObject::tr("View Recordings"));
     pbox->addChild(PlayBoxOrdering());
     pbox->addChild(PlayBoxEpisodeSort());
     // Disabled until we re-enable live previews
@@ -3390,34 +4049,30 @@ PlaybackSettings::PlaybackSettings()
     pbox->addChild(PBBStartInTitle());
     addChild(pbox);
 
-    VerticalConfigurationGroup* pbox2 = new VerticalConfigurationGroup(false);
-    pbox2->setLabel(QObject::tr("Recording Groups") +
-                    QString(" (%1/%2)").arg(++i).arg(total));
+    GroupSetting* pbox2 = new GroupSetting();
+    pbox2->setLabel(QObject::tr("Recording Groups"));
     pbox2->addChild(DisplayRecGroup());
     pbox2->addChild(QueryInitialFilter());
     pbox2->addChild(RememberRecGroup());
     pbox2->addChild(UseGroupNameAsAllPrograms());
     addChild(pbox2);
 
-    VerticalConfigurationGroup* pbox3 = new VerticalConfigurationGroup(false);
-    pbox3->setLabel(QObject::tr("View Recordings") +
-                    QString(" (%1/%2)").arg(++i).arg(total));
+    GroupSetting* pbox3 = new GroupSetting();
+    pbox3->setLabel(QObject::tr("View Recordings"));
     pbox3->addChild(DisplayGroupTitleSort());
-    pbox3->addChild(new WatchListSettings());
+    addChild(PlaybackWatchList());
     addChild(pbox3);
 
-    VerticalConfigurationGroup* seek = new VerticalConfigurationGroup(false);
-    seek->setLabel(QObject::tr("Seeking") +
-                   QString(" (%1/%2)").arg(++i).arg(total));
+    GroupSetting* seek = new GroupSetting();
+    seek->setLabel(QObject::tr("Seeking"));
     seek->addChild(SmartForward());
     seek->addChild(FFRewReposTime());
     seek->addChild(FFRewReverse());
     seek->addChild(ExactSeeking());
     addChild(seek);
 
-    VerticalConfigurationGroup* comms = new VerticalConfigurationGroup(false);
-    comms->setLabel(QObject::tr("Commercial Skip") +
-                    QString(" (%1/%2)").arg(++i).arg(total));
+    GroupSetting* comms = new GroupSetting();
+    comms->setLabel(QObject::tr("Commercial Skip"));
     comms->addChild(AutoCommercialSkip());
     comms->addChild(CommRewindAmount());
     comms->addChild(CommNotifyAmount());
@@ -3426,45 +4081,32 @@ PlaybackSettings::PlaybackSettings()
     addChild(comms);
 
 #if CONFIG_DARWIN
-    VerticalConfigurationGroup* mac1 = new VerticalConfigurationGroup(false);
-    mac1->setLabel(QObject::tr("Mac OS X Video Settings") +
-                   QString(" (%1/%2)").arg(++i).arg(total));
-    mac1->addChild(MacGammaCorrect());
-    mac1->addChild(MacScaleUp());
-    mac1->addChild(MacFullSkip());
-    addChild(mac1);
-
-    VerticalConfigurationGroup* mac2 = new VerticalConfigurationGroup(false);
-    mac2->setLabel(QObject::tr("Mac OS X Video Settings") +
-                   QString(" (%1/%2)").arg(++i).arg(total));
-    mac2->addChild(new MacMainSettings());
-    mac2->addChild(new MacFloatSettings());
-
-    HorizontalConfigurationGroup *row =
-        new HorizontalConfigurationGroup(false, false, true, true);
-    row->addChild(new MacDockSettings());
-    row->addChild(new MacDesktopSettings());
-    mac2->addChild(row);
-
+    GroupSetting* mac = new GroupSetting();
+    mac->setLabel(QObject::tr("Mac OS X Video Settings"));
+    mac->addChild(MacGammaCorrect());
+    mac->addChild(MacScaleUp());
+    mac->addChild(MacFullSkip());
+    mac->addChild(MacMainEnabled());
+    mac->addChild(MacFloatEnabled());
+    mac->addChild(MacDockEnabled());
+    mac->addChild(MacDesktopSettings());
     addChild(mac2);
 #endif
 }
 
 OSDSettings::OSDSettings()
 {
-    VerticalConfigurationGroup* osd = new VerticalConfigurationGroup(false);
-    osd->setLabel(QObject::tr("On-screen Display"));
+    setLabel(QObject::tr("On-screen Display"));
 
-    osd->addChild(EnableMHEG());
-    osd->addChild(PersistentBrowseMode());
-    osd->addChild(BrowseAllTuners());
-    osd->addChild(CCBackground());
-    osd->addChild(DefaultCCMode());
-    osd->addChild(PreferCC708());
-    osd->addChild(SubtitleFont());
-    osd->addChild(OSDCC708TextZoomPercentage());
-    osd->addChild(SubtitleCodec());
-    addChild(osd);
+    addChild(EnableMHEG());
+    addChild(PersistentBrowseMode());
+    addChild(BrowseAllTuners());
+    addChild(CCBackground());
+    addChild(DefaultCCMode());
+    addChild(PreferCC708());
+    addChild(SubtitleFont());
+    addChild(OSDCC708TextZoomPercentage());
+    addChild(SubtitleCodec());
 
     //VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false);
     //cc->setLabel(QObject::tr("Closed Captions"));
@@ -3479,8 +4121,9 @@ OSDSettings::OSDSettings()
 
 GeneralSettings::GeneralSettings()
 {
-    VerticalConfigurationGroup* general = new VerticalConfigurationGroup(false);
-    general->setLabel(QObject::tr("General (Basic)"));
+    setLabel(QObject::tr("General"));
+    GroupSetting* general = new GroupSetting();
+    general->setLabel(QObject::tr("Basic"));
     general->addChild(ChannelOrdering());
     general->addChild(ChannelFormat());
     general->addChild(LongChannelFormat());
@@ -3488,91 +4131,68 @@ GeneralSettings::GeneralSettings()
     general->addChild(LiveTVPriority());
     addChild(general);
 
-    VerticalConfigurationGroup* autoexp = new VerticalConfigurationGroup(false);
-    autoexp->setLabel(QObject::tr("General (Auto-Expire)"));
+    GroupSetting* autoexp = new GroupSetting();
+    autoexp->setLabel(QObject::tr("Auto-Expire"));
     autoexp->addChild(AutoExpireMethod());
-
-    VerticalConfigurationGroup *expgrp0 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    expgrp0->addChild(AutoExpireDefault());
-    expgrp0->addChild(RerecordWatched());
-    expgrp0->addChild(AutoExpireWatchedPriority());
-
-    VerticalConfigurationGroup *expgrp1 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    expgrp1->addChild(AutoExpireLiveTVMaxAge());
-    expgrp1->addChild(AutoExpireDayPriority());
-    expgrp1->addChild(AutoExpireExtraSpace());
-
-    HorizontalConfigurationGroup *expgrp =
-        new HorizontalConfigurationGroup(false, false, true, true);
-    expgrp->addChild(expgrp0);
-    expgrp->addChild(expgrp1);
-
-    autoexp->addChild(expgrp);
-    autoexp->addChild(new DeletedExpireOptions());
-
+    autoexp->addChild(AutoExpireDefault());
+    autoexp->addChild(RerecordWatched());
+    autoexp->addChild(AutoExpireWatchedPriority());
+    autoexp->addChild(AutoExpireLiveTVMaxAge());
+    autoexp->addChild(AutoExpireDayPriority());
+    autoexp->addChild(AutoExpireExtraSpace());
+    autoexp->addChild(AutoExpireInsteadOfDelete());
     addChild(autoexp);
 
-    VerticalConfigurationGroup* jobs = new VerticalConfigurationGroup(false);
-    jobs->setLabel(QObject::tr("General (Jobs)"));
+    GroupSetting* jobs = new GroupSetting();
+    jobs->setLabel(QObject::tr("Jobs"));
     jobs->addChild(CommercialSkipMethod());
     jobs->addChild(CommFlagFast());
     jobs->addChild(AggressiveCommDetect());
     jobs->addChild(DefaultTranscoder());
     jobs->addChild(DeferAutoTranscodeDays());
 
-    VerticalConfigurationGroup* autogrp0 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    autogrp0->addChild(AutoMetadataLookup());
-    autogrp0->addChild(AutoCommercialFlag());
-    autogrp0->addChild(AutoTranscode());
-
-    VerticalConfigurationGroup* autogrp1 =
-        new VerticalConfigurationGroup(false, false, true, true);
-    autogrp0->addChild(AutoRunUserJob(1));
-    autogrp1->addChild(AutoRunUserJob(2));
-    autogrp1->addChild(AutoRunUserJob(3));
-    autogrp1->addChild(AutoRunUserJob(4));
-
-    HorizontalConfigurationGroup *autogrp =
-        new HorizontalConfigurationGroup(true, true, false, true);
+    GroupSetting* autogrp = new GroupSetting();
     autogrp->setLabel(
         QObject::tr("Default Job Queue Settings for New Scheduled Recordings"));
-    autogrp->addChild(autogrp0);
-    autogrp->addChild(autogrp1);
+    autogrp->addChild(AutoMetadataLookup());
+    autogrp->addChild(AutoCommercialFlag());
+    autogrp->addChild(AutoTranscode());
+    autogrp->addChild(AutoRunUserJob(1));
+    autogrp->addChild(AutoRunUserJob(2));
+    autogrp->addChild(AutoRunUserJob(3));
+    autogrp->addChild(AutoRunUserJob(4));
+
     jobs->addChild(autogrp);
 
     addChild(jobs);
 
-    VerticalConfigurationGroup* general2 = new VerticalConfigurationGroup(false);
-    general2->setLabel(QObject::tr("General (Advanced)"));
+    GroupSetting* general2 = new GroupSetting();
+    general2->setLabel(QObject::tr("Advanced"));
     general2->addChild(RecordPreRoll());
     general2->addChild(RecordOverTime());
     general2->addChild(CategoryOverTimeSettings());
     addChild(general2);
 
-    VerticalConfigurationGroup* changrp = new VerticalConfigurationGroup(false);
-    changrp->setLabel(QObject::tr("General (Channel Groups)"));
-    ChannelGroupSettings *changroupsettings = new ChannelGroupSettings();
-    changrp->addChild(changroupsettings);
+    GroupSetting* changrp = new GroupSetting();
+    changrp->setLabel(QObject::tr("Channel Groups"));
+    changrp->addChild(ChannelGroupRememberLast());
     changrp->addChild(BrowseChannelGroup());
     addChild(changrp);
 }
 
 EPGSettings::EPGSettings()
 {
-    VerticalConfigurationGroup* epg = new VerticalConfigurationGroup(false);
-    epg->setLabel(QObject::tr("Program Guide") + " 1/1");
-    epg->addChild(WatchTVGuide());
-    epg->addChild(DefaultTVChannel());
-    epg->addChild(EPGRecThreshold());
-    addChild(epg);
+    setLabel(QObject::tr("Program Guide"));
+    addChild(WatchTVGuide());
+    addChild(DefaultTVChannel());
+    addChild(EPGRecThreshold());
 }
 
 GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
 {
-    VerticalConfigurationGroup* sched = new VerticalConfigurationGroup(false);
+    setLabel(QObject::tr("Recording Priorities"));
+
+    GroupSetting* sched = new GroupSetting();
     sched->setLabel(QObject::tr("Scheduler Options"));
 
     sched->addChild(GRSchedMoveHigher());
@@ -3585,7 +4205,7 @@ GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
     sched->addChild(GRAutoRecPriority());
     addChild(sched);
 
-    VerticalConfigurationGroup* access = new VerticalConfigurationGroup(false);
+    GroupSetting* access = new GroupSetting();
     access->setLabel(QObject::tr("Accessibility Options"));
 
     access->addChild(GRSignLangRecPriority());
@@ -3595,7 +4215,7 @@ GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
     access->addChild(GRAudioDescRecPriority());
     addChild(access);
 
-    VerticalConfigurationGroup* rtype = new VerticalConfigurationGroup(false);
+    GroupSetting* rtype = new GroupSetting();
     rtype->setLabel(QObject::tr("Recording Type Priority Settings"));
 
     rtype->addChild(GRSingleRecordRecPriority());
@@ -3610,7 +4230,9 @@ GeneralRecPrioritiesSettings::GeneralRecPrioritiesSettings()
 
 AppearanceSettings::AppearanceSettings()
 {
-    VerticalConfigurationGroup* screen = new VerticalConfigurationGroup(false);
+    setLabel(QObject::tr("Appearance"));
+
+    GroupSetting* screen = new GroupSetting();
     screen->setLabel(QObject::tr("Theme") + " / " + QObject::tr("Screen Settings"));
 
     screen->addChild(MenuTheme());
@@ -3624,38 +4246,23 @@ AppearanceSettings::AppearanceSettings()
 //    screen->addChild(DisplaySizeHeight());
 //    screen->addChild(DisplaySizeWidth());
 
-    VerticalConfigurationGroup *column1 =
-        new VerticalConfigurationGroup(false, false, false, false);
-
-    column1->addChild(GuiWidth());
-    column1->addChild(GuiHeight());
-    column1->addChild(GuiOffsetX());
-    column1->addChild(GuiOffsetY());
-
-    VerticalConfigurationGroup *column2 =
-        new VerticalConfigurationGroup(false, false, false, false);
-
-    column2->addChild(GuiSizeForTV());
-    column2->addChild(HideMouseCursor());
-    column2->addChild(RunInWindow());
-    column2->addChild(UseFixedWindowSize());
-
-    HorizontalConfigurationGroup *columns =
-        new HorizontalConfigurationGroup(false, false, false, false);
-
-    columns->addChild(column1);
-    columns->addChild(column2);
-
-    screen->addChild(columns);
+    screen->addChild(GuiWidth());
+    screen->addChild(GuiHeight());
+    screen->addChild(GuiOffsetX());
+    screen->addChild(GuiOffsetY());
+    screen->addChild(GuiSizeForTV());
+    screen->addChild(HideMouseCursor());
+    screen->addChild(RunInWindow());
+    screen->addChild(UseFixedWindowSize());
 
     addChild(screen);
 
 #if defined(USING_XRANDR) || CONFIG_DARWIN
     const vector<DisplayResScreen> scr = GetVideoModes();
     if (!scr.empty())
-        addChild(new VideoModeSettings());
+        addChild(UseVideoModes()); 
 #endif
-    VerticalConfigurationGroup* dates = new VerticalConfigurationGroup(false);
+    GroupSetting* dates = new GroupSetting();
     dates->setLabel(QObject::tr("Localization"));
     dates->addChild(MythLanguage());
     dates->addChild(ISO639PreferredLanguage(0));
@@ -3665,7 +4272,7 @@ AppearanceSettings::AppearanceSettings()
     dates->addChild(MythTimeFormat());
     addChild(dates);
 
-    addChild(new LcdSettings());
+    addChild(LCDEnable());
 }
 
 // vim:set sw=4 ts=4 expandtab:
diff --git a/mythtv/programs/mythfrontend/globalsettings.h b/mythtv/programs/mythfrontend/globalsettings.h
index 93e774a..a6a0815 100644
--- a/mythtv/programs/mythfrontend/globalsettings.h
+++ b/mythtv/programs/mythfrontend/globalsettings.h
@@ -7,48 +7,49 @@
 #include "settings.h"
 #include "mythcontext.h"
 #include "videodisplayprofile.h"
+#include "standardsettings.h"
 
 #include <QMutex>
 
 class QFileInfo;
 
-class PlaybackSettings : public ConfigurationWizard
+class PlaybackSettings : public GroupSetting
 {
   public:
     PlaybackSettings();
 };
 
-class OSDSettings: virtual public ConfigurationWizard
+class OSDSettings: virtual public GroupSetting
 {
   public:
     OSDSettings();
 };
 
-class GeneralSettings : public ConfigurationWizard
+class GeneralSettings : public GroupSetting
 {
   public:
     GeneralSettings();
 };
 
-class EPGSettings : public ConfigurationWizard
+class EPGSettings : public GroupSetting
 {
   public:
     EPGSettings();
 };
 
-class AppearanceSettings : public ConfigurationWizard
+class AppearanceSettings : public GroupSetting
 {
   public:
     AppearanceSettings();
 };
 
-class MainGeneralSettings : public ConfigurationWizard
+class MainGeneralSettings : public GroupSetting
 {
   public:
     MainGeneralSettings();
 };
 
-class GeneralRecPrioritiesSettings : public ConfigurationWizard
+class GeneralRecPrioritiesSettings : public GroupSetting
 {
   public:
     GeneralRecPrioritiesSettings();
@@ -60,7 +61,22 @@ class XboxSettings : public ConfigurationWizard
     XboxSettings();
 };
 
-class PlaybackProfileItemConfig : public QObject, public ConfigurationWizard
+class HostRefreshRateComboBoxTree : public HostComboBoxTree
+{
+    Q_OBJECT
+  public:
+    HostRefreshRateComboBoxTree(const QString &name) 
+        : HostComboBoxTree(name, ""){ }
+    virtual ~HostRefreshRateComboBoxTree() { ; }
+
+  public slots:
+    virtual void ChangeResolution(const QString& resolution);
+
+  private:
+    static const vector<double> GetRefreshRates(const QString &resolution);
+};
+
+class PlaybackProfileItemConfig : public GroupSetting
 {
     Q_OBJECT
 
@@ -78,22 +94,22 @@ class PlaybackProfileItemConfig : public QObject, public ConfigurationWizard
     void deint1Changed(const QString &deint);
 
   private:
-    ProfileItem          &item;
-    TransComboBoxSetting *cmp[2];
-    TransSpinBoxSetting  *width[2];
-    TransSpinBoxSetting  *height[2];
-    TransComboBoxSetting *decoder;
-    TransSpinBoxSetting  *max_cpus;
-    TransCheckBoxSetting *skiploop;
-    TransComboBoxSetting *vidrend;
-    TransComboBoxSetting *osdrend;
-    TransCheckBoxSetting *osdfade;
-    TransComboBoxSetting *deint0;
-    TransComboBoxSetting *deint1;
-    TransLineEditSetting *filters;
+    ProfileItem       &item;
+    TransComboBoxTree *cmp[2];
+    TransSpinBoxTree  *width[2];
+    TransSpinBoxTree  *height[2];
+    TransComboBoxTree *decoder;
+    TransSpinBoxTree  *max_cpus;
+    TransCheckBoxTree *skiploop;
+    TransComboBoxTree *vidrend;
+    TransComboBoxTree *osdrend;
+    TransCheckBoxTree *osdfade;
+    TransComboBoxTree *deint0;
+    TransComboBoxTree *deint1;
+    TransLineEditTree *filters;
 };
 
-class PlaybackProfileConfig : public VerticalConfigurationGroup
+class PlaybackProfileConfig : public GroupSetting
 {
     Q_OBJECT
 
@@ -122,30 +138,68 @@ class PlaybackProfileConfig : public VerticalConfigurationGroup
     uint        groupid;
 
     VerticalConfigurationGroup  *last_main;
-    vector<TransLabelSetting*>   labels;
+    vector<GroupSetting*>   labels;
     vector<TransButtonSetting*>  editProf;
     vector<TransButtonSetting*>  delProf;
     vector<TransSpinBoxSetting*> priority;
 };
 
-class PlaybackProfileConfigs : public TriggeredConfigurationGroup
+
+
+
+class PlaybackProfileConfigs : public HostComboBoxTree
 {
     Q_OBJECT
 
   public:
-    PlaybackProfileConfigs(const QString &str);
+    PlaybackProfileConfigs();
     virtual ~PlaybackProfileConfigs();
+    virtual void customEvent(QEvent *event);
+    virtual void menu();
 
   private:
     void InitUI(void);
 
   private slots:
-    void btnPress(QString);
-    void triggerChanged(const QString&);
+    void changeCurrentProfile(const QString&);
+    void newProfile(const QString &name);
+    void deleteProfile();
 
   private:
     QStringList   profiles;
-    HostComboBox *grouptrigger;
+    QMap<QString, GroupSetting *> m_profileTrees; 
+};
+
+/*
+class PlaybackProfileConfigItemCriteriaTree;
+
+class PlaybackProfileConfigItemTree : public GroupSetting
+{
+    Q_OBJECT
+  public:
+    PlaybackProfileConfigItemTree(ProfileItem &item);
+    virtual void Load();
+  private slots:
+    void decoderChanged(const QString&);
+    void vrenderChanged(const QString&);
+    void orenderChanged(const QString &renderer);
+    void deint0Changed(const QString &deint);
+    void deint1Changed(const QString &deint);
+  private:
+    ProfileItem m_item;
+    PlaybackProfileConfigItemCriteriaTree * m_criteria1;
+    PlaybackProfileConfigItemCriteriaTree * m_criteria2;
+    TransComboBoxTree    *m_decoder;
+    TransSpinBoxTree   *m_max_cpus;
+    TransCheckBoxTree    *m_skiploop;
+    TransComboBoxTree    *m_vidrend;
+    TransComboBoxTree    *m_osdrend;
+    TransCheckBoxTree    *m_osdfade;
+    TransComboBoxTree    *m_deint0;
+    TransComboBoxTree    *m_deint1;
+    TransLineEditTree *m_filters;
+
 };
+*/
 
 #endif
diff --git a/mythtv/programs/mythfrontend/main.cpp b/mythtv/programs/mythfrontend/main.cpp
index 33a8840..dbd60e0 100644
--- a/mythtv/programs/mythfrontend/main.cpp
+++ b/mythtv/programs/mythfrontend/main.cpp
@@ -829,15 +829,22 @@ static void TVMenuCallback(void *data, QString &selection)
         startPrevious();
     else if (sel == "settings appearance")
     {
-        AppearanceSettings *settings = new AppearanceSettings();
-        DialogCode res = settings->exec();
-        delete settings;
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
 
+        if (gs->Create())
+        {
+            gs->setSettings(new AppearanceSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
+        /* TODO
         if (kDialogCodeRejected != res)
         {
             qApp->processEvents();
             GetMythMainWindow()->JumpTo("Reload Theme");
-        }
+        }*/
     }
     else if (sel == "settings themechooser")
     {
@@ -889,8 +896,16 @@ static void TVMenuCallback(void *data, QString &selection)
     }
     else if (sel == "settings general")
     {
-        GeneralSettings settings;
-        settings.exec();
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
+
+        if (gs->Create())
+        {
+            gs->setSettings(new GeneralSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
     }
     else if (sel == "settings audiogeneral")
     {
@@ -899,25 +914,61 @@ static void TVMenuCallback(void *data, QString &selection)
     }
     else if (sel == "settings maingeneral")
     {
-        MainGeneralSettings mainsettings;
-        mainsettings.exec();
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
+
+        if (gs->Create())
+        {
+            gs->setSettings(new MainGeneralSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
+
+        /*TODO need to execute this after
         QStringList strlist( QString("REFRESH_BACKEND") );
         gCoreContext->SendReceiveStringList(strlist);
+        */
+        
     }
     else if (sel == "settings playback")
     {
-        PlaybackSettings settings;
-        settings.exec();
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
+
+        if (gs->Create())
+        {
+            gs->setSettings(new PlaybackSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
     }
     else if (sel == "settings osd")
     {
-        OSDSettings settings;
-        settings.exec();
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
+
+        if (gs->Create())
+        {
+            gs->setSettings(new OSDSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
     }
     else if (sel == "settings epg")
     {
-        EPGSettings settings;
-        settings.exec();
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
+
+        if (gs->Create())
+        {
+            gs->setSettings(new EPGSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
     }
     else if (sel == "settings channelgroups")
     {
@@ -926,8 +977,16 @@ static void TVMenuCallback(void *data, QString &selection)
     }
     else if (sel == "settings generalrecpriorities")
     {
-        GeneralRecPrioritiesSettings settings;
-        settings.exec();
+        MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+        StandardSettingDialog *gs = new StandardSettingDialog(mainStack, "maingeeralsettings");
+
+        if (gs->Create())
+        {
+            gs->setSettings(new GeneralRecPrioritiesSettings());
+            mainStack->AddScreen(gs);
+        }
+        else
+            delete gs;
     }
     else if (sel == "settings channelrecpriorities")
     {
@@ -1056,6 +1115,7 @@ static bool RunMenu(QString themedir, QString themename)
 // the default values
 static void WriteDefaults()
 {
+/*
     PlaybackSettings ps;
     ps.Load();
     ps.Save();
@@ -1079,7 +1139,7 @@ static void WriteDefaults()
     grs.Save();
     VideoGeneralSettings vgs;
     vgs.Load();
-    vgs.Save();
+    vgs.Save();*/
 }
 
 static int internal_play_media(const QString &mrl, const QString &plot,
diff --git a/mythtv/programs/mythfrontend/mythfrontend.pro b/mythtv/programs/mythfrontend/mythfrontend.pro
index cf985d6..debf109 100644
--- a/mythtv/programs/mythfrontend/mythfrontend.pro
+++ b/mythtv/programs/mythfrontend/mythfrontend.pro
@@ -39,7 +39,9 @@ HEADERS += videoplayercommand.h         videopopups.h
 HEADERS += videofilter.h                videolist.h
 HEADERS += videoplayersettings.h        videodlg.h
 HEADERS += videoglobalsettings.h        upnpscanner.h
-HEADERS += commandlineparser.h
+HEADERS += commandlineparser.h         
+HEADERS += standardsettings.h
 
 SOURCES += main.cpp playbackbox.cpp viewscheduled.cpp audiogeneralsettings.cpp
 SOURCES += globalsettings.cpp manualschedule.cpp programrecpriority.cpp
@@ -60,7 +62,9 @@ SOURCES += videoplayercommand.cpp       videopopups.cpp
 SOURCES += videofilter.cpp              videolist.cpp
 SOURCES += videoplayersettings.cpp      videodlg.cpp
 SOURCES += videoglobalsettings.cpp      upnpscanner.cpp
-SOURCES += commandlineparser.cpp
+SOURCES += commandlineparser.cpp        
+SOURCES += standardsettings.cpp 
 
 macx {
     mac_bundle {
diff --git a/mythtv/programs/mythfrontend/standardsettings.cpp b/mythtv/programs/mythfrontend/standardsettings.cpp
index b15ee98..81e3c71 100755
--- a/mythtv/programs/mythfrontend/standardsettings.cpp
+++ b/mythtv/programs/mythfrontend/standardsettings.cpp
@@ -27,19 +27,31 @@ void StandardSetting::SetDBValue(const QString &text){
     setSettingValue(text);
 };
 
-void StandardSetting::setSettingValue(const QString newValue)
+void StandardSetting::customEvent(QEvent *event)
 {
-    m_settingValue=newValue;
+    if (event->type() == DialogCompletionEvent::kEventType)
+    {
+        DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
+        QString resultid  = dce->GetId();
+
+        if (resultid == "editsetting")
+            this->resultEdit(dce);
+    }
 }
 
-const QString StandardSetting::getHelpText()
+void StandardSetting::setSettingValue(const QString newValue)
 {
-    return GetText("help");
+    if (m_settingValue != newValue)
+    {
+        m_settingValue=newValue;
+        settingValueChanged(m_settingValue);
+        emit settingValueChanged(m_settingValue);
+    }
 }
 
-const QString StandardSetting::getTextValue() const
+const QString StandardSetting::getHelpText()
 {
-    return GetText("value");
+    return GetText("help");
 }
 
 bool StandardSetting::haveChanged()
@@ -50,10 +62,25 @@ bool StandardSetting::haveChanged()
 }
 
 GroupSetting::GroupSetting(const QString &text)
-    :MythGenericTree (text, 0, true)
+    :MythGenericTree (text, 0, true),
+    m_item(0)
 {
 }
 
+void GroupSetting::update()
+{
+    if (m_item)
+    {
+        m_item->SetTextFromMap(m_strings);
+        QList< MythGenericTree * > *children = getAllChildren ();
+        m_item->setDrawArrow(children->size() > 0);
+        //force the update
+        QString text = m_item->GetText();
+        m_item->SetText("");
+        m_item->SetText(text);
+    } 
+}   
+
 void GroupSetting::setLabel(const QString &label)
 {
     SetText(label);
@@ -68,16 +95,14 @@ void GroupSetting::setHelpText(const QString &description)
     SetText(description,"help");
 }
 
-//TODO remove the need for this
-void GroupSetting::setScreen(MythScreenType *screen)
+bool GroupSetting::haveChanged()
 {
-    m_screen = screen;
 
     QList<MythGenericTree*>::iterator it;
     QList<MythGenericTree*> *children = this->getAllChildren();
 
     if (!children)
-        return;
+        return false;
 
     MythGenericTree *child = NULL;
 
@@ -87,34 +112,43 @@ void GroupSetting::setScreen(MythScreenType *screen)
         if (!child)
             continue;
         GroupSetting * setting = dynamic_cast<GroupSetting*>(child);
-        if (setting)
-            setting->setScreen(screen);
+        if (setting && setting->haveChanged())
+            return true;
     }
+    return false;
 }
 
-bool GroupSetting::haveChanged()
+class MyItem : public MythUIButtonListItem
 {
+  public:
+    MyItem(MythUIButtonList *list, const QString &text, GroupSetting * setting)
+        :MythUIButtonListItem(list, text),
+        m_setting(setting){
+            m_setting->setItem(this);
+        }
+    virtual ~MyItem()
+    {
+        m_setting->setItem(NULL);
+    }
+    GroupSetting *m_setting;
+};
 
-    QList<MythGenericTree*>::iterator it;
-    QList<MythGenericTree*> *children = this->getAllChildren();
 
-    if (!children)
-        return false;
 
-    MythGenericTree *child = NULL;
+MythUIButtonListItem *GroupSetting::CreateListButton(MythUIButtonList *list)
+{
+    MythUIButtonListItem *item = new MyItem(list, getString(),this);
+    item->SetData(qVariantFromValue((MythGenericTree*)this));
+    item->SetTextFromMap(m_strings);
+    item->SetImageFromMap(m_imageFilenames);
 
-    for (it = children->begin(); it != children->end(); ++it)
-    {
-        child = *it;
-        if (!child)
-            continue;
-        GroupSetting * setting = dynamic_cast<GroupSetting*>(child);
-        if (setting && setting->haveChanged())
-            return true;
-    }
-    return false;
+    if (visibleChildCount() > 0)
+        item->setDrawArrow(true);
+
+    return item;
 }
 
+
 void GroupSetting::Save()
 {
     QList<MythGenericTree*>::iterator it;
@@ -136,6 +170,17 @@ void GroupSetting::Save()
     }
 }
 
+void GroupSetting::setItem(MythUIButtonListItem * item)
+{
+    m_item = item;
+};
+
+void GroupSetting::setEnabled(bool enabled)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("GroupSetting::setEnabled(%1) for %2")
+        .arg(enabled).arg(getLabel()));
+};
+
 void GroupSetting::Load()
 {
     QList<MythGenericTree*>::iterator it;
@@ -161,21 +206,61 @@ void GroupSetting::edit()
 {
     DialogCompletionEvent *dce =
             new DialogCompletionEvent("editsetting", 0, "", "");
-    QCoreApplication::postEvent(m_screen, dce);
+    QCoreApplication::postEvent(this, dce);
 }
 
-TextualSetting::TextualSetting(const QString &settingName, const QString &text, bool password)
+void GroupSetting::menu()
+{
+    MythScreenStack *popupStack =
+                            GetMythMainWindow()->GetStack("popup stack");
+
+    MythDialogBox * m_menuPopup =
+            new MythDialogBox(GetText(), popupStack, "optionmenu");
+
+    if (m_menuPopup->Create())
+        popupStack->AddScreen(m_menuPopup);
+
+    m_menuPopup->SetReturnEvent(this, "menusetting");
+
+    m_menuPopup->AddButton(QObject::tr("Reset to default"),"reset");
+    m_menuPopup->AddButton(QObject::tr("Reload"),"reload");
+    m_menuPopup->AddButton(QObject::tr("Save"),"save");
+
+}
+
+void GroupSetting::resultMenu(DialogCompletionEvent *dce)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("GroupSetting::resultMenu"));
+    if (dce->GetResult()!=-1)
+    {
+        QString choice = dce->GetData().toString();
+        if (choice=="reset")
+        {
+            //TODO reset to default
+        }
+        else if (choice=="save")
+        {
+            //TODO save
+        }
+        else if (choice=="load")
+        {
+            //TODO load
+        }
+    }
+}
+
+LineEditTree::LineEditTree(const QString &settingName, const QString &text, bool password)
     : StandardSetting(settingName, text),
     m_password(password)
 {
 }
 
-void TextualSetting::setValue(const QString &newValue)
+void LineEditTree::setValue(const QString &newValue)
 {
     setSettingValue(newValue);
 }
 
-void TextualSetting::edit()
+void LineEditTree::edit()
 {
     MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
 
@@ -185,23 +270,25 @@ void TextualSetting::edit()
 
     if (settingdialog->Create())
     {
-        settingdialog->SetReturnEvent(m_screen, "editsetting");
+        settingdialog->SetReturnEvent(this, "editsetting");
         popupStack->AddScreen(settingdialog);
     }
 }
 
-void TextualSetting::resultEdit(DialogCompletionEvent *dce)
+void LineEditTree::resultEdit(DialogCompletionEvent *dce)
 {
     if (m_settingValue!=dce->GetResultText())
     {
         m_haveChanged=true;
         setSettingValue(dce->GetResultText());
+        LOG(VB_GENERAL, LOG_ERR, QString("LineEditTree::resultEdit"));
+        update();
     }
 }
 
-void TextualSetting::setSettingValue(const QString newValue)
+void LineEditTree::setSettingValue(const QString newValue)
 {
-    m_settingValue = newValue;
+    StandardSetting::setSettingValue(newValue);
 
     if (m_password)
         if (m_settingValue.isEmpty())
@@ -212,46 +299,45 @@ void TextualSetting::setSettingValue(const QString newValue)
         SetText(m_settingValue,"value");
 }
 
-BoolSetting::BoolSetting(const QString &settingName, const QString &text)
+CheckBoxTree::CheckBoxTree(const QString &settingName, const QString &text)
     : StandardSetting(settingName, text)
 {
 }
 
-void BoolSetting::edit()
+void CheckBoxTree::edit()
 {
-    //LOG(VB_GENERAL, LOG_ERR, "BoolSetting::edit()");
-    DialogCompletionEvent *dce =
-            new DialogCompletionEvent("editsetting", 0, "", QVariant::fromValue((MythGenericTree*)this));
-    QCoreApplication::postEvent(m_screen, dce);
+    LOG(VB_GENERAL, LOG_ERR, QString("CheckBoxTree::edit()"));
+    if (m_settingValue=="1")
+        setSettingValue(m_settingValue="0");
+    else
+        setSettingValue(m_settingValue="1");
+    m_haveChanged=true;
+    update();
 }
 
-void BoolSetting::addChild (bool value, GroupSetting *child)
+void CheckBoxTree::addChild (bool value, GroupSetting *child)
 {
     if (value)
-        m_OnChildren.append(child);
+        m_OnChildren.addChild(child);
     else
-        m_OffChildren.append(child);
-/*
-    child = StandardSetting::addNode(child);
-    child->SetVisible(m_settingValue=="1");
-    return child;*/
+        m_OffChildren.addChild(child);
 }
 
-void BoolSetting::setSettingValue(const QString newValue)
+void CheckBoxTree::setSettingValue(const QString newValue)
 {
-    m_settingValue = newValue;
+    StandardSetting::setSettingValue(newValue);
 
-    QList< GroupSetting * > *nodes = NULL;
+    QList< MythGenericTree * > *newChildren;
 
-    if (m_settingValue=="1")
+    if (newValue=="1")
     {
         SetText(QObject::tr("On"),"value");
-        nodes=&m_OnChildren;
+        newChildren=m_OnChildren.getAllChildren ();
     }
     else
     {
         SetText(QObject::tr("Off"),"value");
-        nodes=&m_OffChildren;
+        newChildren=m_OffChildren.getAllChildren ();
     }
 
     QList< MythGenericTree * > *children = getAllChildren ();
@@ -261,15 +347,19 @@ void BoolSetting::setSettingValue(const QString newValue)
         this->removeNode(child);
     }
 
-
-    GroupSetting *node;
-    foreach(node, *nodes)
+    foreach(child, *newChildren)
     {
-        this->addNode(node);
+        GroupSetting * setting = dynamic_cast<GroupSetting*>(child); 
+        if (!setting)continue;
+        this->addNode(child);
+        setting->Load();
     }
+    update();
+
+
 }
 
-void BoolSetting::setValue(bool newValue)
+void CheckBoxTree::setValue(bool newValue)
 {
     if (newValue)
         setSettingValue("1");
@@ -277,8 +367,9 @@ void BoolSetting::setValue(bool newValue)
         setSettingValue("0");
 }
 
-void BoolSetting::resultEdit(DialogCompletionEvent *dce)
+void CheckBoxTree::resultEdit(DialogCompletionEvent *dce)
 {
+    LOG(VB_GENERAL, LOG_ERR, QString(" CheckBoxTree::resultEdit %1").arg(GetText())); 
     if (m_settingValue=="1")
         setSettingValue(m_settingValue="0");
     else
@@ -286,45 +377,55 @@ void BoolSetting::resultEdit(DialogCompletionEvent *dce)
     m_haveChanged=true;
 }
 
-RangeSetting::RangeSetting(const QString &settingName, int min, int max, int step, bool allow_single_step)
+SpinBoxTree::SpinBoxTree(const QString &settingName, int min, int max, int step, bool allow_single_step)
     : StandardSetting(settingName)
 {
     m_min  = min;
     m_max  = max;
 }
 
-void RangeSetting::setValue(int newValue)
+void SpinBoxTree::setValue(int newValue)
+{
+    setSettingValue(QString("%1").arg(newValue));
+}
+
+void SpinBoxTree::setSettingValue(const QString &newValue)
 {
-    m_settingValue=QString("%1").arg(newValue);
+    StandardSetting::setSettingValue(newValue);
+    SetText(newValue,"value");
     update();
 }
 
-void RangeSetting::edit()
+void SpinBoxTree::edit()
 {
     MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
 
 
     MythTextInputDialog *settingdialog =
-                                    new MythTextInputDialog(popupStack,
-                                    "Range: " +this->GetText(),(InputFilter)(FilterAlpha | FilterSymbols | FilterPunct) ,false, m_settingValue);
+        new MythTextInputDialog(popupStack,
+            "Range: " +this->GetText(),
+            (InputFilter)(FilterAlpha | FilterSymbols | FilterPunct) ,
+            false, m_settingValue);
+
     if (settingdialog->Create())
     {
-        settingdialog->SetReturnEvent(m_screen, "editsetting");
+        settingdialog->SetReturnEvent(this, "editsetting");
         popupStack->AddScreen(settingdialog);
     }
 }
 
-void RangeSetting::resultEdit(DialogCompletionEvent *dce)
+void SpinBoxTree::resultEdit(DialogCompletionEvent *dce)
 {
     if (m_settingValue!=dce->GetResultText())
     {
         int newValue=dce->GetResultText().toInt();
         if (newValue< m_min || newValue > m_max)
         {
-            //TODO display out of bound message;
-            MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
-            MythConfirmationDialog * errorDialog = new MythConfirmationDialog(popupStack, 
-                QObject::tr("out of bound, the value should be between %1 and %2")
+            MythScreenStack *popupStack = 
+                GetMythMainWindow()->GetStack("popup stack");
+            MythConfirmationDialog * errorDialog = 
+                new MythConfirmationDialog(popupStack, 
+                QObject::tr("Out of bound, the value should be between %1 and %2")
                     .arg(m_min).arg(m_max),false);
             if (errorDialog->Create())
                 popupStack->AddScreen(errorDialog);
@@ -333,24 +434,17 @@ void RangeSetting::resultEdit(DialogCompletionEvent *dce)
         {
             m_haveChanged=true;
             setSettingValue(dce->GetResultText());
-            
         }
-        update();
     }
 }
 
-void RangeSetting::update()
-{
-    SetText(m_settingValue,"value");
-}
-
-ListSetting::ListSetting(const QString &settingName, const QString &text)
+ComboBoxTree::ComboBoxTree(const QString &settingName, const QString &text)
     :StandardSetting(settingName, text)
 {
     Load();
 }
 
-void ListSetting::setValue(int newValue)
+void ComboBoxTree::setValue(int newValue)
 {
     QMapIterator<QString, QString> i(m_options);
     while (i.hasNext())
@@ -365,42 +459,49 @@ void ListSetting::setValue(int newValue)
     }
 }
 
-void ListSetting::setSettingValue(const QString newValue)
+void ComboBoxTree::setValue(const QString & newValue)
 {
-        LOG(VB_GENERAL, LOG_ERR, QString("ListSetting::setSettingValue(%1) for %2")
-            .arg(newValue).arg(m_settingName));
-    m_settingValue=newValue;
+    setSettingValue(newValue);
+}
+
+void ComboBoxTree::setSettingValue(const QString newValue)
+{
+    StandardSetting::setSettingValue(newValue);
     if (m_options.contains(m_settingValue))
     {
-        LOG(VB_GENERAL, LOG_ERR, QString("ListSetting::setSettingValue(%1) for %2 => %3")
-            .arg(newValue).arg(m_settingName).arg(m_options[m_settingValue]));
         SetText(m_options[m_settingValue],"value");
     }
     else
     {
-        LOG(VB_GENERAL, LOG_ERR, QString("*ListSetting::setSettingValue(%1) for %2")
-            .arg(newValue).arg(m_settingName));
+        //TODO wha should I do here
         SetText(newValue+"*","value");
     }
 }
 
 
-void ListSetting::addSelection(QString label, QString value, bool select)
+void ComboBoxTree::addSelection(QString label, QString value, bool select)
 {
     m_options[value]=label;
     //TODO do something with select
-        LOG(VB_GENERAL, LOG_ERR, QString("%1 => %2 =? %3")
-            .arg(m_settingName).arg(value).arg(m_settingValue));
+    if (select)
+    LOG(VB_GENERAL, LOG_ERR, QString("ComboBoxTree::addSelection %1").arg(GetText()));
     if (value == m_settingValue && m_options.contains(m_settingValue))
         SetText(m_options[m_settingValue],"value");
 }
 
-void ListSetting::clearSelections()
+void ComboBoxTree::removeSelection(QString value)
+{
+    m_options.remove(value);
+    //TODO update "value"
+}
+
+void ComboBoxTree::clearSelections()
 {
     m_options.clear();
+    //TODO update "value"
 }
 
-void ListSetting::edit()
+void ComboBoxTree::edit()
 {
     MythScreenStack *popupStack =
                             GetMythMainWindow()->GetStack("popup stack");
@@ -411,7 +512,7 @@ void ListSetting::edit()
     if (m_menuPopup->Create())
         popupStack->AddScreen(m_menuPopup);
 
-    m_menuPopup->SetReturnEvent(m_screen, "editsetting");
+    m_menuPopup->SetReturnEvent(this, "editsetting");
 
     //populate the list of choice
     QMapIterator<QString, QString> i(m_options);
@@ -425,92 +526,20 @@ void ListSetting::edit()
     }
 }
 
-void ListSetting::resultEdit(DialogCompletionEvent *dce)
+void ComboBoxTree::resultEdit(DialogCompletionEvent *dce)
 {
     if (dce->GetResult()!=-1 && m_settingValue!=dce->GetData().toString())
     {
         m_haveChanged=true;
         setSettingValue(dce->GetData().toString());
+        update();
     }
 }
 
-MythSpinBoxDialog::MythSpinBoxDialog(MythScreenStack *parent,
-                                         const QString &message,
-                                         const QString &defaultValue)
-   : MythScreenType(parent, "mythspinboxpopup")
-{
-    m_message = message;
-    m_defaultValue = defaultValue;
-    m_spinBox = NULL;
-
-    m_id = "";
-    m_retObject = NULL;
-}
-
-bool MythSpinBoxDialog::Create(void)
-{
-    if (!LoadWindowFromXML("standardsetting-ui.xml", "MythSpinBoxDialog", this))
-        return false;
-
-    MythUIText *messageText = NULL;
-    MythUIButton *okButton = NULL;
-    MythUIButton *cancelButton = NULL;
-
-    bool err = false;
-    UIUtilE::Assign(this, m_spinBox, "input", &err);
-    UIUtilE::Assign(this, messageText, "message", &err);
-    UIUtilE::Assign(this, okButton, "ok", &err);
-    UIUtilW::Assign(this, cancelButton, "cancel");
-    if (!m_spinBox)LOG(VB_GENERAL, LOG_ERR, "spinBox");
-    if (!messageText)LOG(VB_GENERAL, LOG_ERR, "messageText");
-    if (!okButton)LOG(VB_GENERAL, LOG_ERR, "okButton");
-
-    if (err)
-    {
-        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'MythSpinBoxDialog'");
-        return false;
-    }
-
-    if (cancelButton)
-        connect(cancelButton, SIGNAL(Clicked()), SLOT(Close()));
-    connect(okButton, SIGNAL(Clicked()), SLOT(sendResult()));
-
-    m_spinBox->SetValue(m_defaultValue);
-
-    messageText->SetText(m_message);
-
-    BuildFocusList();
-
-    return true;
-}
-
-void MythSpinBoxDialog::SetReturnEvent(QObject *retobject,
-                                         const QString &resultid)
-{
-    m_retObject = retobject;
-    m_id = resultid;
-}
-
-void MythSpinBoxDialog::sendResult()
-{
-    QString inputString = m_spinBox->GetValue();
-    emit haveResult(inputString);
-
-    if (m_retObject)
-    {
-        DialogCompletionEvent *dce = new DialogCompletionEvent(m_id, 0,
-                                                            inputString, "");
-        QCoreApplication::postEvent(m_retObject, dce);
-    }
-
-    Close();
-}
-
-void MythSpinBoxDialog::SetRange(int low, int high, int step, uint pageMultiple)
+HostComboBoxTree::HostComboBoxTree(const QString &settingName, const QString &text)
+    :ComboBoxTree(settingName, text), HostDBStorage (this, settingName)
 {
-    if (m_spinBox)
-        m_spinBox->SetRange(low, high, step, pageMultiple);
-}
+};
 
 StandardSettingDialog::StandardSettingDialog(MythScreenStack *parent, const char *name) :
     MythScreenType(parent, name),
@@ -521,14 +550,11 @@ StandardSettingDialog::StandardSettingDialog(MythScreenStack *parent, const char
     m_selectedSettingLabel(0),
     m_selectedSettingValue(0),
     m_selectedSettingHelp(0),
-    m_cancelButton(0),
-    m_saveButton(0),
-    m_menuPopup(0),
     m_loaded(false),
-    m_editedSetting(0)
+    m_justChangeSelected(false),
+    m_parentSelected(0)
 {
     m_settingsTree=new GroupSetting(name);
-    m_settingsTree->setScreen(this);
 }
 
 StandardSettingDialog::~StandardSettingDialog()
@@ -537,7 +563,6 @@ StandardSettingDialog::~StandardSettingDialog()
 
 bool StandardSettingDialog::Create(void)
 {
-    LOG(VB_GENERAL, LOG_ERR, "StandardSettingDialog::Create");
     if (!LoadWindowFromXML("standardsetting-ui.xml", "settingssetup", this))
         return false;
 
@@ -550,8 +575,10 @@ bool StandardSettingDialog::Create(void)
     UIUtilW::Assign(this, m_selectedSettingValue, "selectedsettingvalue");
     UIUtilW::Assign(this, m_selectedSettingHelp, "selectedsettinghelp");
 
-    connect(m_buttonTree,SIGNAL(itemSelected(MythUIButtonListItem*)), this,SLOT(settingSelected(MythUIButtonListItem*)));
     connect(m_buttonTree,SIGNAL(itemClicked(MythUIButtonListItem*)), this,SLOT(settingClicked(MythUIButtonListItem*)));
+    connect(m_buttonTree,SIGNAL(itemSelected(MythUIButtonListItem*)), this,SLOT(settingSelected(MythUIButtonListItem*)));
+    //nodeChanged is send only when the node change not when it is initialize so I use itemSelected instead
+    //connect(m_buttonTree,SIGNAL(nodeChanged(MythGenericTree*)), this,SLOT(groupSettingChanged(MythGenericTree*)));
 
     if (error)
     {
@@ -562,51 +589,52 @@ bool StandardSettingDialog::Create(void)
     return true;
 }
 
-void StandardSettingDialog::settingSelected(MythUIButtonListItem *item)
+void StandardSettingDialog::groupSettingChanged(MythGenericTree *node)
 {
-    MythGenericTree * node = qVariantValue<MythGenericTree*>(item->GetData());
-    if (m_title)
+    QString title;
+    QString groupHelp;
+    QString settingLabel;
+    QString settingValue;
+    QString settingHelp;
+
+    if (node)
     {
+        settingLabel = node->GetText();
+        settingValue = node->GetText("value");
+        settingHelp = node->GetText("help");
+
+        /* This is not exactly what I am looking for,
+        I am trying to get the current root (i.e. from where the tree is displayed)
+        So the following code does not work for more than on list
+        I need to create a signal in MythUIButtonTree to give me that node */
+        /*node = node->getParent();
         if (node)
         {
-            /*QString newTitle;
-            MythGenericTree * parentNode;
-            while (parentNode = node->getParent())
-            {
-                newTitle=QString("%1 > %2").arg(parentNode->GetText()).arg(newTitle);
-                node = parentNode;
-            }
-            m_title->SetText(newTitle);*/
-            m_title->SetText(node->getParent()->GetText());
-        }
+            title = node->GetText();
+            groupHelp = node->GetText("help");
+        }*/
     }
 
+    if (m_title)
+        m_title->SetText(title);
     if (m_grouphelp)
-    {
-        m_grouphelp->SetText(node->getParent()->GetText("help"));
-    }
-    else
-        LOG(VB_GENERAL, LOG_ERR, "StandardSettingDialog::settingSelected()");
-
+        m_grouphelp->SetText(groupHelp);
     if (m_selectedSettingLabel)
-        m_selectedSettingLabel->SetText(item->GetText());
+        m_selectedSettingLabel->SetText(settingLabel);
     if (m_selectedSettingValue)
-        m_selectedSettingValue->SetText(item->GetText("value"));
+        m_selectedSettingValue->SetText(settingValue);
     if (m_selectedSettingHelp)
-        m_selectedSettingHelp->SetText(item->GetText("help"));
-
-    
+        m_selectedSettingHelp->SetText(settingHelp);
 }
 
 void StandardSettingDialog::settingClicked(MythUIButtonListItem *item)
 {
+    LOG(VB_GENERAL, LOG_ERR, QString("StandardSettingDialog::settingClicked"));
     MythGenericTree* tree = item->GetData().value<MythGenericTree*>();
+    if (!tree)return;
     StandardSetting *ss = dynamic_cast<StandardSetting*>(tree);
     if (ss)
-    {
-        m_editedSetting=ss;
         ss->edit();
-    }
     else 
     {
         GroupSetting *gs = dynamic_cast<GroupSetting*>(tree);
@@ -614,11 +642,21 @@ void StandardSettingDialog::settingClicked(MythUIButtonListItem *item)
         {
             MythGenericTree *child = gs->getVisibleChildAt(0);
             if (child)
-            m_buttonTree->SetCurrentNode(child);
+                m_buttonTree->SetCurrentNode(child);
         }
     }
 }
 
+void StandardSettingDialog::settingSelected(MythUIButtonListItem *item)
+{
+    LOG(VB_GENERAL, LOG_ERR, QString("StandardSettingDialog::settingSelected %1").arg(item->GetText()));
+    m_justChangeSelected=true;
+    MythGenericTree* tree = item->GetData().value<MythGenericTree*>();
+    if (tree)
+        groupSettingChanged(tree);
+}
+
+
 void StandardSettingDialog::customEvent(QEvent *event)
 {
     if (event->type() == DialogCompletionEvent::kEventType)
@@ -626,18 +664,7 @@ void StandardSettingDialog::customEvent(QEvent *event)
         DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
         QString resultid  = dce->GetId();
 
-        if (resultid == "editsetting")
-        {
-            if (!m_editedSetting) return;
-            m_editedSetting->resultEdit(dce);
-            m_editedSetting=NULL;
-
-            //Force to refresh the button tree. not very elegant but no choice at the moment
-            MythGenericTree *currentNode = m_buttonTree->GetCurrentNode();
-            m_buttonTree->AssignTree(m_settingsTree);
-            m_buttonTree->SetCurrentNode(currentNode);
-        }
-        else if (resultid == "exit")
+        if (resultid == "exit")
         {
             int buttonnum = dce->GetResult();
             if (buttonnum == 0)
@@ -648,16 +675,18 @@ void StandardSettingDialog::customEvent(QEvent *event)
             else if (buttonnum == 1)
                 MythScreenType::Close();
         }
+        
     }
 }
 
+
 void StandardSettingDialog::setSettings(GroupSetting * groupSettings)
 {
     m_settingsTree=groupSettings;
-    m_settingsTree->setScreen(this);
     m_settingsTree->Load();
     m_buttonTree->AssignTree(m_settingsTree);
-        BuildFocusList();
+    groupSettingChanged(m_settingsTree);
+    BuildFocusList();
 }
 
 void StandardSettingDialog::Save()
@@ -670,25 +699,58 @@ void StandardSettingDialog::Close(void)
 {
     if (m_settingsTree->haveChanged())
     {
-        QString label = tr("Exit ?");
+        ShowMenu();
+    }
+    else
+        MythScreenType::Close();
+}
 
-        MythScreenStack *popupStack =
-                                GetMythMainWindow()->GetStack("popup stack");
+void StandardSettingDialog::ShowMenu (void)
+{
+    QString label = tr("Exit ?");
 
-        MythDialogBox * m_menuPopup =
-                new MythDialogBox(label, popupStack, "exitmenu");
+    MythScreenStack *popupStack =
+                            GetMythMainWindow()->GetStack("popup stack");
 
-        if (m_menuPopup->Create())
-            popupStack->AddScreen(m_menuPopup);
+    MythDialogBox * m_menuPopup =
+            new MythDialogBox(label, popupStack, "exitmenu");
 
-        m_menuPopup->SetReturnEvent(this, "exit");
+    if (m_menuPopup->Create())
+        popupStack->AddScreen(m_menuPopup);
 
-        m_menuPopup->AddButton(tr("Save then Exit"));
-        m_menuPopup->AddButton(tr("Exit without saving changes"));
-        m_menuPopup->AddButton(tr("Cancel"));
-    }
-    else
-        MythScreenType::Close();
+    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"));
+}
+
+bool StandardSettingDialog::keyPressEvent (QKeyEvent * event)
+{
+    if (MythScreenType::keyPressEvent (event))
+        return true;
+
+    QStringList actions;
+    bool handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions);
+
+    for (int i = 0; i < actions.size() && !handled; i++)
+    {
+        QString action = actions[i];
+        handled = true;
+
+        if (action == "INFO") //should it be MENU?
+        {
+            GroupSetting *gs = dynamic_cast<GroupSetting*>(m_buttonTree->GetCurrentNode());
+            if (gs)
+            {
+                gs->menu();
+            }
+        }
+        else
+            handled = false;
+    } 
+
+    return handled;
 }
 
 
@@ -696,3 +758,4 @@ void StandardSettingDialog::Close(void)
 
 
 
+
diff --git a/mythtv/programs/mythfrontend/standardsettings.h b/mythtv/programs/mythfrontend/standardsettings.h
index 095057d..a01e99f 100755
--- a/mythtv/programs/mythfrontend/standardsettings.h
+++ b/mythtv/programs/mythfrontend/standardsettings.h
@@ -5,17 +5,18 @@
 #include <mythdialogbox.h>
 #include <mythuibuttontree.h>
 #include <mythgenerictree.h>
+#include <mythuibuttonlist.h>
 #include <QMap>
 
 /** TODO LIST
- ListSetting is not properly initialize, it should show the label not the value
+ ComboBoxTree is not properly initialize, it should show the label not the value
 Implement Save method
 */
 
 /*
 MythUIButtonListItem Type
 
-*TextualSetting
+*LineEditTree
 PasswordSetting
 DirectorySetting
 FileSetting
@@ -23,10 +24,10 @@ FileSetting
 SpinSetting
 GroupSetting
 GroupBooleanSetting
-GroupListSetting
-ListSetting
-ListSetting+refresh
-FreeListSetting
+GroupComboBoxTree
+ComboBoxTree
+ComboBoxTree+refresh
+FreeComboBoxTree
 Button for testing
 */
 /*
@@ -57,8 +58,9 @@ class GlobalDBSetting : public DBSetting
 /**
  * Group Setting together
  */
-class GroupSetting : public MythGenericTree, public Storage
+class GroupSetting : public QObject, public MythGenericTree, public Storage
 {
+    Q_OBJECT
   public:
     GroupSetting(const QString &text = "");
     virtual ~GroupSetting(){};
@@ -68,62 +70,62 @@ class GroupSetting : public MythGenericTree, public Storage
     void addChild(GroupSetting *groupSetting);
     void setHelpText(const QString &description);
     QString getHelpText(){return GetText("help");};
-
-    void setScreen(MythScreenType *screen);
+    void setEnabled(bool enabled);
 
     void Save();
     void Load();
     virtual void edit();
-    //virtual void resultEdit(DialogCompletionEvent *dce);
+    virtual void menu();
+    virtual void resultMenu(DialogCompletionEvent *dce);
     virtual bool haveChanged();
+
+    /*Hack to be able to update*/
+    MythUIButtonListItem *CreateListButton(MythUIButtonList *list);
+    void setItem(MythUIButtonListItem * item);
+    virtual void update();
   protected:
     const QString getSettingName(){return "";};
     void setSettingValue(const QString newValue){};
-    MythScreenType *m_screen;
-
+    MythUIButtonListItem *m_item;
 };
 
 
 // allow to set a textual setting
 class StandardSetting : public GroupSetting, public StorageUser
 {
+  Q_OBJECT
   public:
     StandardSetting(const QString &settingName, const QString &text = "");
     virtual ~StandardSetting();
 
     const QString getHelpText();
-
-
-    const QString getTextValue() const;
+    //const QString getTextValue() const;
     const QString getValue() const{return GetText("value");};
+    virtual void customEvent(QEvent *event);
     virtual void resultEdit(DialogCompletionEvent *dce)=0;
     bool haveChanged();
 
     void SetDBValue(const QString &text);
     QString GetDBValue(void) const { return m_settingValue ;};
+  signals:
+    void settingValueChanged(const QString & newValue);
 
   protected:
-    //void SaveChildren();
-    //void LoadChildren();
-    //const QString settingName();//{return m_settingName;};
-    virtual void setSettingValue(const QString newValue);//{m_settingValue=newValue;};
+    virtual void setSettingValue(const QString newValue);
     QString m_settingName;
     QString m_settingValue;
-
-
     bool m_haveChanged;
-    //DBSetting * m_DBSetting;
 };
 
 
 /**
  * Display and edit a textual value
  */
-class TextualSetting : public StandardSetting
+class LineEditTree : public StandardSetting
 {
   public:
-    TextualSetting(const QString &settingName, const QString &text = "", bool password=false);
-    virtual ~TextualSetting(){};
+    LineEditTree(const QString &settingName, const QString &text = "", bool password=false);
+    virtual ~LineEditTree(){};
     void setValue(const QString &newValue);
     void setSettingValue(const QString newValue);
     void edit();
@@ -133,53 +135,50 @@ class TextualSetting : public StandardSetting
     bool m_password;
 };
 
-class GlobalTextualSetting : public TextualSetting, public GlobalDBStorage
+class GlobalLineEditTree : public LineEditTree, public GlobalDBStorage
 {
   public:
-    GlobalTextualSetting(const QString &settingName, const QString &text = "", bool password=false)
-        :TextualSetting(settingName, text, password), GlobalDBStorage (this, settingName)
+    GlobalLineEditTree(const QString &settingName, const QString &text = "", bool password=false)
+        :LineEditTree(settingName, text, password), GlobalDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        TextualSetting::Load();
+        LineEditTree::Load();
         GlobalDBStorage::Load();
     }
     void Save()
     {
-        TextualSetting::Save();
+        LineEditTree::Save();
         GlobalDBStorage::Save();
     }
-
-
-
 };
 
-class HostTextualSetting : public TextualSetting, public HostDBStorage
+class HostLineEditTree : public LineEditTree, public HostDBStorage
 {
   public:
-    HostTextualSetting(const QString &settingName, const QString &text = "", bool password=false)
-        :TextualSetting(settingName, text, password), HostDBStorage (this, settingName)
+    HostLineEditTree(const QString &settingName, const QString &text = "", bool password=false)
+        :LineEditTree(settingName, text, password), HostDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        TextualSetting::Load();
+        LineEditTree::Load();
         HostDBStorage::Load();
     }
 
     void Save()
     {
-        TextualSetting::Save();
+        LineEditTree::Save();
         HostDBStorage::Save();
     }
 };
 
-class TransTextualSetting : public TextualSetting, public TransientStorage
+class TransLineEditTree : public LineEditTree, public TransientStorage
 {
   public:
-    TransTextualSetting(bool password=false)
-        :TextualSetting("", "", password), TransientStorage()
+    TransLineEditTree(bool password=false)
+        :LineEditTree("", "", password), TransientStorage()
     {
     };
 };
@@ -189,64 +188,63 @@ class TransTextualSetting : public TextualSetting, public TransientStorage
  * Display and edit a textual value
  */
 
-class ListSetting : public StandardSetting
+class ComboBoxTree : public StandardSetting
 {
   public:
-    ListSetting(const QString &settingName, const QString &text = "");
-    virtual ~ListSetting(){};
+    ComboBoxTree(const QString &settingName, const QString &text = "");
+    virtual ~ComboBoxTree(){};
     void setValue(int newValue);
+    void setValue(const QString & newValue);
     void setSettingValue(const QString newValue);
     void addSelection(QString label, QString value, bool select = false);
+    void removeSelection(QString value);
     void clearSelections();
     virtual void edit();
     virtual void resultEdit(DialogCompletionEvent *dce);
-  private:
+  protected:
     QMap<QString, QString> m_options;
 };
 
-class GlobalListSetting : public ListSetting, public GlobalDBStorage
+class GlobalComboBoxTree : public ComboBoxTree, public GlobalDBStorage
 {
   public:
-    GlobalListSetting(const QString &settingName, const QString &text = "")
-        :ListSetting(settingName, text), GlobalDBStorage (this, settingName)
+    GlobalComboBoxTree(const QString &settingName, const QString &text = "")
+        :ComboBoxTree(settingName, text), GlobalDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        ListSetting::Load();
+        ComboBoxTree::Load();
         GlobalDBStorage::Load();
     }
     void Save()
     {
-        ListSetting::Save();
+        ComboBoxTree::Save();
         GlobalDBStorage::Save();
     }
 };
 
-class HostListSetting : public ListSetting, public HostDBStorage
+class HostComboBoxTree : public ComboBoxTree, public HostDBStorage
 {
   public:
-    HostListSetting(const QString &settingName, const QString &text = "")
-        :ListSetting(settingName, text), HostDBStorage (this, settingName)
-    {
-    };
+    HostComboBoxTree(const QString &settingName, const QString &text = "");
     void Load()
     {
-        ListSetting::Load();
+        ComboBoxTree::Load();
         HostDBStorage::Load();
     }
     void Save()
     {
-        ListSetting::Save();
+        ComboBoxTree::Save();
         HostDBStorage::Save();
     }
 };
 
-class TransListSetting : public ListSetting, public TransientStorage
+class TransComboBoxTree : public ComboBoxTree, public TransientStorage
 {
   public:
-    TransListSetting()
-        :ListSetting("", ""), TransientStorage()
+    TransComboBoxTree()
+        :ComboBoxTree("", ""), TransientStorage()
     {
     };
 };
@@ -255,133 +253,143 @@ class TransListSetting : public ListSetting, public TransientStorage
  * Display and edit a textual value
  */
 
-class BoolSetting : public StandardSetting
+class CheckBoxTree : public StandardSetting
 {
   public:
-    BoolSetting(const QString &settingName, const QString &text = "");
-    virtual ~BoolSetting(){};
+    CheckBoxTree(const QString &settingName, const QString &text = "");
+    virtual ~CheckBoxTree(){};
     void setValue(bool newValue);
     bool boolValue() const{return GetText("value")=="1";};
     void edit();
     void resultEdit(DialogCompletionEvent *dce);
+    /**
+     * Add child  for a specific state only
+     * TODO override addChild() to add to m_children
+
+     */
     void addChild (bool value, GroupSetting *child);
+     //TODO override Load/Save so m_OffChildren and m_OnChildren Loaded/Saved too
+    //void setScreen(MythScreenType *screen);
 
   protected:
     virtual void setSettingValue(const QString newValue);
   private:
-    QList<GroupSetting *> m_OnChildren;
-    QList<GroupSetting *> m_OffChildren;
+    GroupSetting m_OnChildren;
+    GroupSetting m_OffChildren;
+    QList<GroupSetting *> m_children;//both on and off
 };
 
-class GlobalBoolSetting : public BoolSetting, public GlobalDBStorage
+class GlobalCheckBoxTree : public CheckBoxTree, public GlobalDBStorage
 {
   public:
-    GlobalBoolSetting(const QString &settingName, const QString &text = "")
-        : BoolSetting(settingName, text), GlobalDBStorage (this, settingName)
+    GlobalCheckBoxTree(const QString &settingName, const QString &text = "")
+        : CheckBoxTree(settingName, text), GlobalDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        BoolSetting::Load();
+        CheckBoxTree::Load();
         GlobalDBStorage::Load();
     }
     void Save()
     {
-        BoolSetting::Save();
+        CheckBoxTree::Save();
         GlobalDBStorage::Save();
     }
 };
 
-class HostBoolSetting : public BoolSetting, public HostDBStorage
+class HostCheckBoxTree : public CheckBoxTree, public HostDBStorage
 {
   public:
-    HostBoolSetting(const QString &settingName, const QString &text = "")
-        : BoolSetting(settingName, text), HostDBStorage (this, settingName)
+    HostCheckBoxTree(const QString &settingName, const QString &text = "")
+        : CheckBoxTree(settingName, text), HostDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        BoolSetting::Load();
+        CheckBoxTree::Load();
         HostDBStorage::Load();
     }
     void Save()
     {
-        BoolSetting::Save();
+        CheckBoxTree::Save();
         HostDBStorage::Save();
     }
 };
 
-class TransBoolSetting : public BoolSetting, public TransientStorage
+class TransCheckBoxTree : public CheckBoxTree, public TransientStorage
 {
   public:
-    TransBoolSetting()
-        : BoolSetting(""), TransientStorage()
+    TransCheckBoxTree()
+        : CheckBoxTree(""), TransientStorage()
     {
     };
 };
 
 
 
-class RangeSetting : public StandardSetting
+class SpinBoxTree : public StandardSetting
 {
   public:
-    RangeSetting(const QString &settingName, int min, int max, int step, bool allow_single_step = false);
-    virtual ~RangeSetting(){};
+    SpinBoxTree(const QString &settingName, int min, int max, int step, bool allow_single_step = false);
+    virtual ~SpinBoxTree(){};
     virtual void edit();
     virtual void resultEdit(DialogCompletionEvent *dce);
-  //  void SetRange(int min, int max);
     void setValue(int newValue);
+    void setValue(const QString &newValue);
     int intValue() const{return GetText("value").toInt();};
+    void setSettingValue(const QString &newValue);
+
   protected:
-    void update();
+    //void update();
   private:
     int m_min;
     int m_max;
 };
 
-class GlobalRangeSetting: public RangeSetting, public GlobalDBStorage 
+class GlobalSpinBoxTree: public SpinBoxTree, public GlobalDBStorage 
 {
   public:
-    GlobalRangeSetting(const QString &settingName, int min, int max, int step, bool allow_single_step = false)
-        :RangeSetting(settingName, min, max, step, allow_single_step), GlobalDBStorage (this, settingName)
+    GlobalSpinBoxTree(const QString &settingName, int min, int max, int step, bool allow_single_step = false)
+        :SpinBoxTree(settingName, min, max, step, allow_single_step), GlobalDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        RangeSetting::Load();
+        SpinBoxTree::Load();
         GlobalDBStorage::Load();
     }
     void Save()
     {
-        RangeSetting::Save();
+        SpinBoxTree::Save();
         GlobalDBStorage::Save();
     }
 };
 
-class HostRangeSetting: public RangeSetting, public HostDBStorage
+class HostSpinBoxTree: public SpinBoxTree, public HostDBStorage
 {
   public:
-    HostRangeSetting(const QString &settingName, int min, int max, int step, bool allow_single_step = false)
-        :RangeSetting(settingName, min, max, step, allow_single_step), HostDBStorage (this, settingName)
+    HostSpinBoxTree(const QString &settingName, int min, int max, int step, bool allow_single_step = false)
+        :SpinBoxTree(settingName, min, max, step, allow_single_step), HostDBStorage (this, settingName)
     {
     };
     void Load()
     {
-        RangeSetting::Load();
+        SpinBoxTree::Load();
         HostDBStorage::Load();
     }
     void Save()
     {
-        RangeSetting::Save();
+        SpinBoxTree::Save();
         HostDBStorage::Save();
     }
 };
 
-class TransRangeSetting: public RangeSetting, public TransientStorage
+class TransSpinBoxTree: public SpinBoxTree, public TransientStorage
 {
   public:
-    TransRangeSetting(int min, int max, int step, bool allow_single_step = false)
-        :RangeSetting("", min, max, step, allow_single_step), TransientStorage()
+    TransSpinBoxTree(int min, int max, int step, bool allow_single_step = false)
+        :SpinBoxTree("", min, max, step, allow_single_step), TransientStorage()
     {
     };
 };
@@ -389,38 +397,6 @@ class TransRangeSetting: public RangeSetting, public TransientStorage
 
 
 
-
-class /*MUI_PUBLIC*/ MythSpinBoxDialog : public MythScreenType
-{
-    Q_OBJECT
-
-  public:
-    MythSpinBoxDialog(MythScreenStack *parent, const QString &message,
-                        const QString &defaultValue = "");
-
-    bool Create(void);
-
-    void SetRange(int low, int high, int step, uint pageMultiple = 5);
-
-    void SetReturnEvent(QObject *retobject, const QString &resultid);
-
-  signals:
-     void haveResult(QString);
-
-  protected:
-    MythUISpinBox *m_spinBox;
-    QString m_message;
-    QString m_defaultValue;
-    QObject *m_retObject;
-    QString m_id;
-
-  protected slots:
-    void sendResult();
-};
-
-
-
-
 class StandardSettingDialog : public MythScreenType
 {
     Q_OBJECT
@@ -432,27 +408,29 @@ class StandardSettingDialog : public MythScreenType
     bool Create(void);
     virtual void customEvent(QEvent *event);
     void setSettings(GroupSetting * groupSettings);
+    virtual bool keyPressEvent (QKeyEvent *);
+    virtual void ShowMenu (void);
   public slots:
     void Close(void);
   protected:
     GroupSetting *m_settingsTree;
     MythUIButtonTree *m_buttonTree;
   private slots:
-    void settingSelected(MythUIButtonListItem *item);
     void settingClicked(MythUIButtonListItem *item);
+    void settingSelected(MythUIButtonListItem *item);
+    void groupSettingChanged(MythGenericTree *item);
   private:
     void Save();
-    MythUIText *m_title;
-    MythUIText *m_grouphelp;
+    MythUIText       *m_title;
+    MythUIText       *m_grouphelp;
     MythUIButtonList *m_titleList;
-    MythUIText *m_selectedSettingLabel;
-    MythUIText *m_selectedSettingValue;
-    MythUIText *m_selectedSettingHelp;
-    MythUIButton *m_cancelButton;
-    MythUIButton *m_saveButton;
-    MythDialogBox     *m_menuPopup;
+    MythUIText       *m_selectedSettingLabel;
+    MythUIText       *m_selectedSettingValue;
+    MythUIText       *m_selectedSettingHelp;
     bool m_loaded;
-    StandardSetting * m_editedSetting;
+    bool m_justChangeSelected;
+    MythGenericTree *m_parentSelected;
+
 };
 
 
