From dca561f97e72e162efdb134631b6b38fdd493803 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 22 Feb 2020 18:59:37 -0600 Subject: Qt UI: Implement UI.Commit.Explain.Disk --- ui/qt5/commitpage.cc | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'ui/qt5') diff --git a/ui/qt5/commitpage.cc b/ui/qt5/commitpage.cc index 1bbb7b7..c58729c 100644 --- a/ui/qt5/commitpage.cc +++ b/ui/qt5/commitpage.cc @@ -43,13 +43,25 @@ CommitPage::CommitPage(QWidget *parent) : HorizonWizardPage(parent) { } void CommitPage::initializePage() { - QString netString, zoneString, softString; + QString diskString, netString, zoneString, softString; auto iterator = valid_keymaps.begin(); Q_ASSERT(field("keymap").toUInt() <= valid_keymaps.size()); std::advance(iterator, field("keymap").toUInt()); - if(horizonWizard()->network && horizonWizard()->net_dhcp && + if(horizonWizard()->auto_part) { + if(horizonWizard()->erase) { + diskString = QString{"Erase and Partition %1"} + .arg(QString::fromStdString(horizonWizard()->chosen_disk)); + } else { + diskString = QString{"Install to Free Space on %1"} + .arg(QString::fromStdString(horizonWizard()->chosen_disk)); + } + } else { + diskString = "Custom Partitioning"; + } + + if(horizonWizard()->network && horizonWizard()->interfaces.size() > 1) { QString iface = QString::fromStdString(horizonWizard()->chosen_auto_iface); netString = tr("Enabled (via %1)").arg(iface); @@ -80,14 +92,16 @@ void CommitPage::initializePage() { break; } - choices->setText(tr("
\n" - "

Keyboard Layout: %1

\n" - "

Networking: %2

\n" - "

Time Zone: %3

\n" - "

Software Selection: %4

\n" - "

Hostname: %5

\n" + choices->setText(tr("
" + "

Disk Layout: %1

\n" + "

Keyboard Layout: %2

\n" + "

Networking: %3

\n" + "

Time Zone: %4

\n" + "

Software Selection: %5

\n" + "

Hostname: %6

\n" "

Root Passphrase: [saved]

\n" "
") + .arg(diskString) .arg(QString::fromStdString(*iterator)) .arg(netString) .arg(zoneString) -- cgit v1.2.3-70-g09d2