hrev45190 adds 2 changesets to branch 'master' old head: 900ce215d30e09071a970eded2a8d15e87e3f29e new head: 5e081035a745c3fe49713d308115352da9e96b37 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=5e08103+%5E900ce21 ---------------------------------------------------------------------------- c8ae0dd: DriveSetup: Added disk name to the DiskView. * The disk device name will be shown on the disk map. Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> [ Dancsó Róbert <dancso.robert@xxxxxxxxxxxxx> ] 5e08103: DriveSetup: fixed device row size/name. * Apparently, the order the fields are set matters, so the drive name and the size now appear in the list as they should have before. * Leave the size field empty if the size is 0. [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 16 insertions(+), 6 deletions(-) src/apps/drivesetup/DiskView.cpp | 8 +++++++- src/apps/drivesetup/PartitionList.cpp | 14 +++++++++----- ############################################################################ Commit: c8ae0dd87c35ee47eaf8281b8460b07118668758 URL: http://cgit.haiku-os.org/haiku/commit/?id=c8ae0dd Author: Dancsó Róbert <dancso.robert@xxxxxxxxxxxxx> Date: Fri Nov 30 20:48:00 2012 UTC Committer: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> Commit-Date: Wed Jan 23 20:27:04 2013 UTC DriveSetup: Added disk name to the DiskView. * The disk device name will be shown on the disk map. Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ---------------------------------------------------------------------------- diff --git a/src/apps/drivesetup/DiskView.cpp b/src/apps/drivesetup/DiskView.cpp index 7dd0df5..02e8872 100644 --- a/src/apps/drivesetup/DiskView.cpp +++ b/src/apps/drivesetup/DiskView.cpp @@ -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); ############################################################################ Revision: hrev45190 Commit: 5e081035a745c3fe49713d308115352da9e96b37 URL: http://cgit.haiku-os.org/haiku/commit/?id=5e08103 Author: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> Date: Wed Jan 23 20:27:25 2013 UTC DriveSetup: fixed device row size/name. * Apparently, the order the fields are set matters, so the drive name and the size now appear in the list as they should have before. * Leave the size field empty if the size is 0. ---------------------------------------------------------------------------- diff --git a/src/apps/drivesetup/PartitionList.cpp b/src/apps/drivesetup/PartitionList.cpp index 898e356..f2cc4fe 100644 --- a/src/apps/drivesetup/PartitionList.cpp +++ b/src/apps/drivesetup/PartitionList.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006-2012 Haiku Inc. All rights reserved. + * Copyright 2006-2013 Haiku Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -222,11 +222,11 @@ PartitionListRow::PartitionListRow(BPartition* partition) SetField(new BStringField(partition->ContentType()), kFilesystemColumn); SetField(new BStringField(partition->ContentName()), kVolumeNameColumn); } else if (partition->IsDevice()) { + SetField(new BStringField(kUnavailableString), kFilesystemColumn); if (partition->Name() != NULL && partition->Name()[0]) SetField(new BStringField(partition->Name()), kVolumeNameColumn); else SetField(new BStringField(kUnavailableString), kVolumeNameColumn); - SetField(new BStringField(kUnavailableString), kFilesystemColumn); } else if (partition->CountChildren() > 0) { SetField(new BStringField(kUnavailableString), kFilesystemColumn); SetField(new BStringField(kUnavailableString), kVolumeNameColumn); @@ -251,9 +251,13 @@ PartitionListRow::PartitionListRow(BPartition* partition) // Size - char size[1024]; - SetField(new BStringField(string_for_size(partition->Size(), size, - sizeof(size))), kSizeColumn); + if (fSize > 0) { + char size[1024]; + SetField(new BStringField(string_for_size(partition->Size(), size, + sizeof(size))), kSizeColumn); + } else { + SetField(new BStringField(kUnavailableString), kSizeColumn); + } // Additional parameters