DriveSetup: Added disk name to the DiskView.

* The disk device name will be shown on the disk map.

Signed-off-by: Axel Dörfler <[email protected]>
This commit is contained in:
Dancsó Róbert
2013-01-23 21:27:04 +01:00
committed by Axel Dörfler
parent 900ce215d3
commit c8ae0dd87c
+7 -1
View File
@@ -202,7 +202,13 @@ public:
virtual bool Visit(BDiskDevice* device)
{
PartitionView* view = new PartitionView(B_TRANSLATE("Device"), 1.0,
const char* name;
if (device->Name() != NULL && device->Name()[0] != '\0')
name = device->Name();
else
name = B_TRANSLATE("Device");
PartitionView* view = new PartitionView(name, 1.0,
device->Offset(), 0, device->ID());
fViewMap.Put(device->ID(), view);
fView->GetLayout()->AddView(view);