Ignore:
Timestamp:
02/27/14 09:29:53 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
2078496, ae41693
Parents:
5eaf60c
Message:

Update the pc-dmconf to reflect the ability to add an auto-login delay timer now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-dmconf/mainwindow.cpp

    rb40a859 r7c53dd2  
    7979    getUsers(); 
    8080    ui->UsersList->clear(); 
     81    QString autoLogDelay = pcbsd::Utils::getValFromSHFile(DM_CONFIG_FILE, "AUTO_LOGIN_DELAY"); 
     82    if(!autoLogDelay.isEmpty()){ 
     83      ui->spin_autoLogDelay->setValue(autoLogDelay.toInt()); 
     84    } 
     85     
    8186    QString autoLogUser = pcbsd::Utils::getValFromSHFile(DM_CONFIG_FILE, "AUTO_LOGIN_USER"); 
    8287    for (int  i=0; i<mvUsers.size(); i++) 
     
    152157    bool ok; 
    153158    system("touch " + DM_CONFIG_FILE.toLatin1()); 
    154     if ( ui->AutoLoginEnabledCB->isChecked() ) { 
     159    if ( ui->AutoLoginEnabledCB->isChecked() && !ui->UsersList->currentText().isEmpty() ) { 
    155160       // First ask for password 
    156161       QString pw = QInputDialog::getText(this, tr("Password Request"), 
     
    163168       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "AUTO_LOGIN_USER", "AUTO_LOGIN_USER=" + ui->UsersList->currentText(), -1); 
    164169       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "AUTO_LOGIN_PASSWORD", "AUTO_LOGIN_PASSWORD=" + pw, -1); 
     170       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "AUTO_LOGIN_DELAY","AUTO_LOGIN_DELAY="+QString::number(ui->spin_autoLogDelay->value()), -1); 
    165171    } else { 
     172       ui->AutoLoginEnabledCB->setChecked(false); //make sure this is not checked to reflect file contents 
    166173       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ENABLE_AUTO_LOGIN", "ENABLE_AUTO_LOGIN=FALSE", -1); 
    167174       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "AUTO_LOGIN_USER", "", -1); 
    168175       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "AUTO_LOGIN_PASSWORD", "", -1); 
     176       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "AUTO_LOGIN_DELAY","", -1); 
    169177    } 
    170178 
Note: See TracChangeset for help on using the changeset viewer.