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:
committed by
Axel Dörfler
parent
900ce215d3
commit
c8ae0dd87c
@@ -202,7 +202,13 @@ public:
|
|||||||
|
|
||||||
virtual bool Visit(BDiskDevice* device)
|
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());
|
device->Offset(), 0, device->ID());
|
||||||
fViewMap.Put(device->ID(), view);
|
fViewMap.Put(device->ID(), view);
|
||||||
fView->GetLayout()->AddView(view);
|
fView->GetLayout()->AddView(view);
|
||||||
|
|||||||
Reference in New Issue
Block a user