Ignore:
Timestamp:
Jul 12, 2013 7:12:21 AM (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
aa08afb2
Parents:
c3b938b
Message:

Add option to pc-dmconf to enable / disable show password function

File:
1 edited

Legend:

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

    rfb7fe1b r708d4b3  
    9393      ui->EnableXDCMP->setChecked(true); 
    9494 
     95    ui->checkShowPW->setChecked(false); 
     96    QString showpw = pcbsd::Utils::getValFromSHFile(DM_CONFIG_FILE, "ENABLE_VIEW_PASSWORD_BUTTON"); 
     97    if ( showpw == "TRUE" ) 
     98      ui->checkShowPW->setChecked(true); 
     99 
    95100    ui->SaveButton->setEnabled(false); 
    96101} 
     
    161166       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ALLOW_REMOTE_LOGIN", "ALLOW_REMOTE_LOGIN=FALSE", -1); 
    162167 
     168    if ( ui->checkShowPW->isChecked() ) 
     169       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ENABLE_VIEW_PASSWORD_BUTTON", "ENABLE_VIEW_PASSWORD_BUTTON=TRUE", -1); 
     170    else 
     171       pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ENABLE_VIEW_PASSWORD_BUTTON", "ENABLE_VIEW_PASSWORD_BUTTON=FALSE", -1); 
     172 
    163173    // Lastly make sure we set perms 
    164174    system("chmod 600 " + DM_CONFIG_FILE.toLatin1()); 
     
    175185/////////////////////////////////////////////////////////////////////////////// 
    176186void MainWindow::on_EnableXDCMP_clicked(bool checked) 
     187{ 
     188  Q_UNUSED(checked); 
     189  ui->SaveButton->setEnabled(true); 
     190} 
     191 
     192/////////////////////////////////////////////////////////////////////////////// 
     193void MainWindow::on_checkShowPW_clicked(bool checked) 
    177194{ 
    178195  Q_UNUSED(checked); 
Note: See TracChangeset for help on using the changeset viewer.