summaryrefslogtreecommitdiff
path: root/wizard/bootloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wizard/bootloader.cpp')
-rw-r--r--wizard/bootloader.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/wizard/bootloader.cpp b/wizard/bootloader.cpp
index a066d05..0b4ccf8 100644
--- a/wizard/bootloader.cpp
+++ b/wizard/bootloader.cpp
@@ -11,7 +11,7 @@ wpBootloader::wpBootloader(QWidget *parent) : QWizardPage(parent)
connect(backend, SIGNAL(finishedCommand(QString)), this, SLOT(backendFinishedCommand(QString)));
connect(bootloader, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(updateComplete()));
connect(bootloaderTarget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(updateComplete()));
- //bootloader->setItemDelegate(new ListDelegate(this));
+ bootloaderTarget->setItemDelegate(new ListDelegate(this));
}
void wpBootloader::initializePage()
@@ -36,7 +36,11 @@ void wpBootloader::receivedDataLine(QString data, QString line)
}
if(data == "bootloader_targets")
{
- QListWidgetItem *item = new QListWidgetItem(QIcon::fromTheme("drive-harddisk"), line);
+ QString dev = line.section(" ",0,0);
+ qlonglong size = line.section(" ",1,1).toLongLong();
+ QString desc = QString("%1 (%L2)").arg(backend->sizeToString(size)).arg(size);
+ desc += "<br />" + line.section(" ",2);
+ QListWidgetItem *item = new ListItem(dev, desc, "drive-harddisk", dev);
bootloaderTarget->addItem(item);
}
}
@@ -69,6 +73,6 @@ bool wpBootloader::validatePage()
{
if(!isComplete()) return false;
backend->cfg("bootloader", bootloader->currentItem()->text().section(" ",0,0).toLower());
- backend->cfg("bootloader_target", bootloaderTarget->currentItem()->text().section(" ",0,0).toLower());
+ backend->cfg("bootloader_target", bootloaderTarget->currentItem()->data(ListItem::ItemData).toString());
return true;
}