Update partition related checks in set_valid_operations() (#788308)
Update the partition can be named and partition flags can be managed checks from being disallowed on unallocated partition types, to being allowed on primary, logical and extended partition types. This is in preparation for the introduction of new unallocated partition type. Bug 788308 - Remove whole_device partition flag
This commit is contained in:
parent
59185b133c
commit
24123c4298
|
@ -1124,16 +1124,20 @@ void Win_GParted::set_valid_operations()
|
|||
)
|
||||
allow_toggle_busy_state( true ) ;
|
||||
|
||||
// Allow naming on devices that support it
|
||||
if ( selected_partition_ptr->type != TYPE_UNALLOCATED &&
|
||||
selected_partition_ptr->status == STAT_REAL &&
|
||||
devices[current_device].partition_naming_supported() )
|
||||
// Allow partition naming on devices that support it
|
||||
if ( selected_partition_ptr->status == STAT_REAL &&
|
||||
devices[current_device].partition_naming_supported() &&
|
||||
( selected_partition_ptr->type == TYPE_PRIMARY ||
|
||||
selected_partition_ptr->type == TYPE_LOGICAL ||
|
||||
selected_partition_ptr->type == TYPE_EXTENDED ) )
|
||||
allow_name_partition( true );
|
||||
|
||||
// Manage flags
|
||||
if ( selected_partition_ptr->type != TYPE_UNALLOCATED &&
|
||||
selected_partition_ptr->status == STAT_REAL &&
|
||||
! selected_partition_ptr->whole_device )
|
||||
// Allow partition flag management
|
||||
if ( selected_partition_ptr->status == STAT_REAL &&
|
||||
! selected_partition_ptr->whole_device &&
|
||||
( selected_partition_ptr->type == TYPE_PRIMARY ||
|
||||
selected_partition_ptr->type == TYPE_LOGICAL ||
|
||||
selected_partition_ptr->type == TYPE_EXTENDED ) )
|
||||
allow_manage_flags( true );
|
||||
|
||||
#ifdef ENABLE_ONLINE_RESIZE
|
||||
|
|
Loading…
Reference in New Issue