hrev44923 adds 1 changeset to branch 'master' old head: 8df20d2c850097dd8980beb383ba683c748dd691 new head: 9d5955453c334d64a384bb98d2ab468287d24738 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=9d59554+%5E8df20d2 ---------------------------------------------------------------------------- 9d59554: Add partition type to fs column for unknown file systems. * Original patch by Morgul as part of #4235. This does not close the ticket, however. * Updated the patch to not show empty '()' in case the partition type returned was NULL. [ Axel DÃrfler <axeld@xxxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44923 Commit: 9d5955453c334d64a384bb98d2ab468287d24738 URL: http://cgit.haiku-os.org/haiku/commit/?id=9d59554 Author: Axel DÃrfler <axeld@xxxxxxxxxxxxxxxx> Date: Wed Nov 28 22:26:39 2012 UTC Ticket: https://dev.haiku-os.org/ticket/4235 ---------------------------------------------------------------------------- 1 file changed, 20 insertions(+), 7 deletions(-) src/apps/drivesetup/PartitionList.cpp | 27 ++++++++++++++++++++------- ---------------------------------------------------------------------------- diff --git a/src/apps/drivesetup/PartitionList.cpp b/src/apps/drivesetup/PartitionList.cpp index f711aa3..7571e9e 100644 --- a/src/apps/drivesetup/PartitionList.cpp +++ b/src/apps/drivesetup/PartitionList.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 Haiku Inc. All rights reserved. + * Copyright 2006-2012 Haiku Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -202,6 +202,8 @@ PartitionListRow::PartitionListRow(BPartition* partition) BPath path; partition->GetPath(&path); + // Device icon + BBitmap* icon = NULL; if (partition->IsDevice()) { icon_size size = B_MINI_ICON; @@ -214,6 +216,8 @@ PartitionListRow::PartitionListRow(BPartition* partition) SetField(new BBitmapStringField(icon, path.Path()), kDeviceColumn); + // File system & volume name + if (partition->ContainsFileSystem()) { SetField(new BStringField(partition->ContentType()), kFilesystemColumn); SetField(new BStringField(partition->ContentName()), kVolumeNameColumn); @@ -221,23 +225,32 @@ PartitionListRow::PartitionListRow(BPartition* partition) SetField(new BStringField(kUnavailableString), kFilesystemColumn); SetField(new BStringField(kUnavailableString), kVolumeNameColumn); } else { - if (partition->ContainsFileSystem()) - SetField(new BStringField(partition->Type()), kFilesystemColumn); - else + BString partitionType(partition->Type()); + if (!partitionType.IsEmpty()) { + partitionType.Prepend("("); + partitionType.Append(")"); + SetField(new BStringField(partitionType), kFilesystemColumn); + } else SetField(new BStringField(kUnavailableString), kFilesystemColumn); + SetField(new BStringField(kUnavailableString), kVolumeNameColumn); } - if (partition->IsMounted() && partition->GetMountPoint(&path) == B_OK) { + // Mounted at + + if (partition->IsMounted() && partition->GetMountPoint(&path) == B_OK) SetField(new BStringField(path.Path()), kMountedAtColumn); - } else { + else SetField(new BStringField(kUnavailableString), kMountedAtColumn); - } + + // Size char size[1024]; SetField(new BStringField(string_for_size(partition->Size(), size, sizeof(size))), kSizeColumn); + // Additional parameters + if (partition->Parameters() != NULL) { BString parameters;