diff --git a/src/modules/partition/gui/EncryptWidget.cpp b/src/modules/partition/gui/EncryptWidget.cpp index 0ddd60831..3627e59c8 100644 --- a/src/modules/partition/gui/EncryptWidget.cpp +++ b/src/modules/partition/gui/EncryptWidget.cpp @@ -42,6 +42,16 @@ EncryptWidget::EncryptWidget( QWidget* parent ) } +void +EncryptWidget::reset() +{ + m_passphraseLineEdit->clear(); + m_confirmLineEdit->clear(); + + m_encryptCheckBox->setChecked( false ); +} + + EncryptWidget::State EncryptWidget::state() const { @@ -49,6 +59,13 @@ EncryptWidget::state() const } +void +EncryptWidget::setText( const QString& text ) +{ + m_encryptCheckBox->setText( text ); +} + + QString EncryptWidget::passphrase() const { @@ -129,7 +146,7 @@ EncryptWidget::onPassphraseEdited() m_iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::No, CalamaresUtils::Original, m_iconLabel->size() ) ); - m_iconLabel->setToolTip( "Please enter the same passphrase in both boxes." ); + m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes." ) ); } updateState(); diff --git a/src/modules/partition/gui/EncryptWidget.h b/src/modules/partition/gui/EncryptWidget.h index b0686d982..7e3d654da 100644 --- a/src/modules/partition/gui/EncryptWidget.h +++ b/src/modules/partition/gui/EncryptWidget.h @@ -36,7 +36,10 @@ public: explicit EncryptWidget( QWidget* parent = nullptr ); + void reset(); + State state() const; + void setText( const QString& text ); QString passphrase() const;