|
|
@ -47,7 +47,7 @@ UsersPage::UsersPage( QWidget* parent )
|
|
|
|
, m_readyHostname( false )
|
|
|
|
, m_readyHostname( false )
|
|
|
|
, m_readyPassword( false )
|
|
|
|
, m_readyPassword( false )
|
|
|
|
, m_readyRootPassword( false )
|
|
|
|
, m_readyRootPassword( false )
|
|
|
|
, m_showRootPassword( true )
|
|
|
|
, m_writeRootPassword( true )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui->setupUi( this );
|
|
|
|
ui->setupUi( this );
|
|
|
|
|
|
|
|
|
|
|
@ -75,12 +75,13 @@ UsersPage::UsersPage( QWidget* parent )
|
|
|
|
ui->labelRootPasswordError->setVisible( !checked );
|
|
|
|
ui->labelRootPasswordError->setVisible( !checked );
|
|
|
|
ui->textBoxRootPassword->setVisible( !checked );
|
|
|
|
ui->textBoxRootPassword->setVisible( !checked );
|
|
|
|
ui->textBoxVerifiedRootPassword->setVisible( !checked );
|
|
|
|
ui->textBoxVerifiedRootPassword->setVisible( !checked );
|
|
|
|
|
|
|
|
checkReady( isReady() );
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
|
|
m_customUsername = false;
|
|
|
|
m_customUsername = false;
|
|
|
|
m_customHostname = false;
|
|
|
|
m_customHostname = false;
|
|
|
|
|
|
|
|
|
|
|
|
setShowRootPassword( true );
|
|
|
|
setWriteRootPassword( true );
|
|
|
|
ui->checkBoxReusePassword->setChecked( true );
|
|
|
|
ui->checkBoxReusePassword->setChecked( true );
|
|
|
|
|
|
|
|
|
|
|
|
CALAMARES_RETRANSLATE( ui->retranslateUi( this ); )
|
|
|
|
CALAMARES_RETRANSLATE( ui->retranslateUi( this ); )
|
|
|
@ -96,11 +97,14 @@ UsersPage::~UsersPage()
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
UsersPage::isReady()
|
|
|
|
UsersPage::isReady()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return m_readyFullName &&
|
|
|
|
bool readyFields = m_readyFullName &&
|
|
|
|
m_readyHostname &&
|
|
|
|
m_readyHostname &&
|
|
|
|
m_readyPassword &&
|
|
|
|
m_readyPassword &&
|
|
|
|
( !m_showRootPassword || ( ui->checkBoxReusePassword->isChecked() || m_readyRootPassword ) ) &&
|
|
|
|
m_readyUsername;
|
|
|
|
m_readyUsername;
|
|
|
|
if ( !m_writeRootPassword || ui->checkBoxReusePassword->isChecked() )
|
|
|
|
|
|
|
|
return readyFields;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return readyFields && m_readyRootPassword;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -124,7 +128,7 @@ UsersPage::createJobs( const QStringList& defaultGroupsList )
|
|
|
|
ui->textBoxUserPassword->text() );
|
|
|
|
ui->textBoxUserPassword->text() );
|
|
|
|
list.append( Calamares::job_ptr( j ) );
|
|
|
|
list.append( Calamares::job_ptr( j ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( m_showRootPassword )
|
|
|
|
if ( m_writeRootPassword )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( ui->checkBoxReusePassword->isChecked() )
|
|
|
|
if ( ui->checkBoxReusePassword->isChecked() )
|
|
|
|
j = new SetPasswordJob( "root",
|
|
|
|
j = new SetPasswordJob( "root",
|
|
|
@ -158,10 +162,10 @@ UsersPage::onActivate()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
UsersPage::setShowRootPassword( bool show )
|
|
|
|
UsersPage::setWriteRootPassword( bool write )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui->checkBoxReusePassword->setVisible( show );
|
|
|
|
ui->checkBoxReusePassword->setVisible( write );
|
|
|
|
m_showRootPassword = show;
|
|
|
|
m_writeRootPassword = write;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -424,10 +428,12 @@ void
|
|
|
|
UsersPage::setAutologinDefault( bool checked )
|
|
|
|
UsersPage::setAutologinDefault( bool checked )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui->checkBoxAutoLogin->setChecked( checked );
|
|
|
|
ui->checkBoxAutoLogin->setChecked( checked );
|
|
|
|
|
|
|
|
emit checkReady( isReady() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
UsersPage::setReusePasswordDefault( bool checked )
|
|
|
|
UsersPage::setReusePasswordDefault( bool checked )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui->checkBoxReusePassword->setChecked( checked );
|
|
|
|
ui->checkBoxReusePassword->setChecked( checked );
|
|
|
|
|
|
|
|
emit checkReady( isReady() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|