GParted requires libparted version 2.2 or higher to support devices
with sector sizes > 512 bytes.
This commit marks the end of a series of enhancements required to
provide support for sector sizes > 512 bytes.
Do not show unallocated space of exactly 1 MiB in size if:
a) The space is at the front of the drive.
This space is reserved for the partition table and the
Master Boot Record.
or
b) The space immediately precedes a logical partition.
This space is reserved for the Extended Boot Record.
Quote from GNOME Human Interface Guidelines 2.2.1 on Drop-down lists:
"Selecting an item from a drop-down list should not affect the
values of any other controls. It may sensitize, insensitize, hide
or show other controls, however."
Make align to MiB the default setting instead of align to cylinder.
Migrate logic for alignment to cylinder into its own method
snap_to_cylinder, and place common logic in snap_to_alignment.
Add alignment checks for situations where space is needed for Master
Boot Record or Extended Boot Record.
Adjust ranges on spin buttons according to required boot record space.
Copy fix for off by one sector (#596552) from
Dialog_Partition_New::Get_New_Partition to
Dialog_Base_Partition::Get_New_Partition
Enhance resize / move logic for checking locations of nearby logical
partitions to not depend on the partition ordering.
Note: This commit does not include limiting graphic movement according
to required boot record space.
Also add signal handler to alignment menu to update file system
minimum size.
This enhancement is to prepare for adding a third alignment
option to align to MiB.
This enhancement was added because the current libparted library,
version 2.2, does not appear to detect file systems for sector
sizes other than 512 bytes.
With the removal of the 512 byte constants, such as MEBIBYTE, it
was possible to rename the _FACTOR constants back to BYTE
constants. The _FACTOR constants, such as MEBI_FACTOR, were a
temporary measure to help in the transition to support devices
with sector sizes > 512 bytes.
The device sector size is needed in all calculations that convert
between sectors and bytes. The device sector_size is included in
the partition object because this object is used to contain
operation information in addition to actual partitions and
unallocated space. A second option was considered to pass the
device object to many methods, but this was considered a much
larger task that might not provide significant gains in
maintainability.