summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-18 14:28:06 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-18 14:28:06 -0600
commit4646086e4a621574227cce8aaf30b16803f302bf (patch)
tree570484965607748d0ecae7e62dae0440500d112b /ui
parentf9b2cdf39fbab4337646003c7440f2feaef4c9af (diff)
downloadhorizon-4646086e4a621574227cce8aaf30b16803f302bf.tar.gz
horizon-4646086e4a621574227cce8aaf30b16803f302bf.tar.bz2
horizon-4646086e4a621574227cce8aaf30b16803f302bf.tar.xz
horizon-4646086e4a621574227cce8aaf30b16803f302bf.zip
Qt UI: Specifically note when disks appear empty
Diffstat (limited to 'ui')
-rw-r--r--ui/qt5/partitionchoicepage.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/ui/qt5/partitionchoicepage.cc b/ui/qt5/partitionchoicepage.cc
index 63317e7..f98ab91 100644
--- a/ui/qt5/partitionchoicepage.cc
+++ b/ui/qt5/partitionchoicepage.cc
@@ -83,9 +83,6 @@ PartitionChoicePage::PartitionChoicePage(QWidget *parent)
void PartitionChoicePage::initializePage() {
Q_ASSERT(horizonWizard()->chosen_disk.size() > 0);
- QString chosen{QString::fromStdString(horizonWizard()->chosen_disk)};
- descLabel->setText(descLabel->text().arg(chosen));
-
/* these options are, as of right now, always available */
eraseButton->setHidden(false);
eraseLabel->setHidden(false);
@@ -109,8 +106,20 @@ void PartitionChoicePage::initializePage() {
fitInButton->setHidden(false);
fitInLabel->setHidden(false);
}
+ } else {
+ if(d->has_fs()) {
+ useExistingButton->setHidden(false);
+ useExistingLabel->setHidden(false);
+ } else {
+ /* No label and no FS. */
+ descLabel->setText(tr("The disk at %1 does not contain a recognised disklabel or file system. "
+ "It may be empty, or it may contain data that isn't readable by System Installation.\n\n"
+ "Continuing will erase any data present on the disk, if any."));
+ }
}
+ QString chosen{QString::fromStdString(horizonWizard()->chosen_disk)};
+ descLabel->setText(descLabel->text().arg(chosen));
}
bool PartitionChoicePage::isComplete() const {