Skip to content

Commit

Permalink
DriveSetup: Added disk name to the DiskView.
Browse files Browse the repository at this point in the history
* The disk device name will be shown on the disk map.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
  • Loading branch information
Dancsó Róbert authored and axeld committed Jan 23, 2013
1 parent 900ce21 commit c8ae0dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/apps/drivesetup/DiskView.cpp
Expand Up @@ -202,7 +202,13 @@ class DiskView::PartitionLayout : public BDiskDeviceVisitor {

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);
Expand Down

0 comments on commit c8ae0dd

Please sign in to comment.