[gparted] Display unrecognised whole disk devices as all grey again (#788308)



commit d5a20697c86d6b485b003f270599a20ffb25c482
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Aug 20 16:20:20 2016 +0100

    Display unrecognised whole disk devices as all grey again (#788308)
    
    Following the switch from whole_device flag to TYPE_UNPARTITIONED,
    unallocated space can be found in two partition types:
        TYPE_UNALLOCATED
        TYPE_UNPARTITIONED  (only when filesystem == FS_UNALLOCATED)
    
    As the file system in both cases is FS_UNALLOCATED check for that when
    determining whether a partition is unallocated or not.
    
    Bug 788308 - Remove whole_device partition flag

 src/DrawingAreaVisualDisk.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/DrawingAreaVisualDisk.cc b/src/DrawingAreaVisualDisk.cc
index 17daa52..b5f5cc0 100644
--- a/src/DrawingAreaVisualDisk.cc
+++ b/src/DrawingAreaVisualDisk.cc
@@ -157,8 +157,8 @@ void DrawingAreaVisualDisk::calc_usage( std::vector<visual_partition> & visual_p
 {
        for ( unsigned int t = 0 ; t < visual_partitions .size() ; t++ )
        {
-               if ( visual_partitions[t].partition_ptr->type != TYPE_UNALLOCATED &&
-                    visual_partitions[t].partition_ptr->type != TYPE_EXTENDED       )
+               if ( visual_partitions[t].partition_ptr->filesystem != FS_UNALLOCATED &&
+                    visual_partitions[t].partition_ptr->type       != TYPE_EXTENDED     )
                {
                        if ( visual_partitions[t].partition_ptr->sector_usage_known() )
                        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]