Ticket #3753: dbsettings-cleanup-180707.diff

File dbsettings-cleanup-180707.diff, 4.5 KB (added by devel@…, 17 years ago)

Cleanup of database settings dialog

  • mythtv/libs/libmyth/dbsettings.cpp

     
    6060    WOLsqlSettings(Setting *checkbox, ConfigurationGroup *group) :
    6161        TriggeredConfigurationGroup(false, false, false, false)
    6262    {
    63         setLabel(QObject::tr("Wake-On-LAN settings"));
     63        setLabel(QObject::tr("Backend Server Wakeup settings"));
    6464
    6565        addChild(checkbox);
    6666        setTrigger(checkbox);
     
    8686                                   "Please verify your database settings "
    8787                                   "below."));
    8888    addChild(info);
    89    
     89
     90    VerticalConfigurationGroup* dbServer = new VerticalConfigurationGroup();
     91    dbServer->setLabel(QObject::tr("Database Server Settings"));
    9092    dbHostName = new TransLineEditSetting(true);
    91     dbHostName->setLabel(QObject::tr("Host name"));
     93    dbHostName->setLabel(QObject::tr("Hostname"));
    9294    dbHostName->setHelpText(QObject::tr("The host name or IP address of "
    9395                                        "the machine hosting the database. "
    9496                                        "This information is required."));
    95     addChild(dbHostName);
    96 
     97    dbServer->addChild(dbHostName);
     98   
    9799    dbPort = new TransLineEditSetting(true);
    98     dbPort->setLabel(QObject::tr("Host Port"));
     100    dbPort->setLabel(QObject::tr("Port"));
    99101    dbPort->setHelpText(QObject::tr("The port number the database is running "
    100                                     "on, if it's not the default database "
    101                                     "port."));
    102     addChild(dbPort);
     102                                    "on.  Leave blank if using the default port (3306)."));
     103    dbServer->addChild(dbPort);
    103104   
    104105    dbName = new TransLineEditSetting(true);
    105     dbName->setLabel(QObject::tr("Database"));
     106    dbName->setLabel(QObject::tr("Database name"));
    106107    dbName->setHelpText(QObject::tr("The name of the database. "
    107108                                    "This information is required."));
    108     addChild(dbName);
     109    dbServer->addChild(dbName);
    109110
    110111    dbUserName = new TransLineEditSetting(true);
    111112    dbUserName->setLabel(QObject::tr("User"));
    112113    dbUserName->setHelpText(QObject::tr("The user name to use while "
    113114                                        "connecting to the database. "
    114115                                        "This information is required."));
    115     addChild(dbUserName);
     116    dbServer->addChild(dbUserName);
    116117   
    117118    dbPassword = new TransLineEditSetting(true);
    118119    dbPassword->setLabel(QObject::tr("Password"));
    119120    dbPassword->setHelpText(QObject::tr("The password to use while "
    120121                                        "connecting to the database. "
    121122                                        "This information is required."));
    122     addChild(dbPassword);
     123    dbServer->addChild(dbPassword);
    123124   
    124125    dbType = new TransComboBoxSetting(false);
    125126    dbType->setLabel(QObject::tr("Database type"));
     
    128129    dbType->setValue(0);
    129130    dbType->setHelpText(QObject::tr("The database implementation used "
    130131                                    "for your server."));
    131     addChild(dbType);
     132    dbType->setEnabled(false);
     133    //dbServer->addChild(dbType);
     134   
     135    addChild(dbServer);
     136   
    132137}
    133138
    134139MythDbSettings2::MythDbSettings2(void) :
     
    163168    addChild(sub3);
    164169   
    165170    wolEnabled = new TransCheckBoxSetting();
    166     wolEnabled->setLabel(QObject::tr("Use Wake-On-LAN to wake database"));
     171    wolEnabled->setLabel(QObject::tr("Enable Database Server Wakeup"));
    167172    wolEnabled->setHelpText(QObject::tr("If checked, the frontend will use "
    168                                         "Wake-On-LAN parameters to "
     173                                        "database wakeup parameters to "
    169174                                        "reconnect to the database server."));
    170175   
    171176    wolReconnect = new TransSpinBoxSetting(0, 60, 1, true);
     
    182187    wolCommand = new TransLineEditSetting(true);
    183188    wolCommand->setLabel(QObject::tr("Wake command"));
    184189    wolCommand->setHelpText(QObject::tr("The command executed on this "
    185                                         "frontend to wake up the database "
    186                                         "server."));
     190                                        "frontend to wake up the database server "
     191                                        "(eg. sudo /etc/init.d/mysql restart)."));
    187192   
    188193    HorizontalConfigurationGroup *group2 =
    189194        new HorizontalConfigurationGroup(false, false);