This is part of a series of changes to enable viewing all partition
information details on a minimum 800x600 display.
Part of Bug 690542 - Partition Information Dialog Warning not readable
The code used to unnecessarily destroy and re-create the file system
objects on every scan for file system support tools.
Instead only create the file system objects once and just call each
object's get_filesystem_support() method on each rescan.
Prior to commit:
1f3b11748e
Remove GParted_Core::p_filesystem (#683149)
set_proper_filesystems() used to set GParted_Core::p_filesystem member
variable to one of the FileSystem objects, but that was just treating it
like a local variable. After the commit local variables named
p_filesystem were used where required and set_proper_filesystem() became
a function which did nothing other than call get_filesystem_object().
Now remove set_proper_filesystem() altogether and use
get_filesystem_object() in its place.
Comment is outdated after GParted stopped using ped_partition_is_busy()
for busy partition detection of normal and logical partitions since
commit:
4202992063
Fix false busy detection of unusual case with Linux Software RAID (#712533)
The String::ucompose method is for easy, i18n-friendly composition of
strings with Gtkmm. From past experience, String::ucompose should not
be used to build command lines due to differences in how locales handle
number translation. More specifically, not all locales use number
separators (spaces, commas or periods) and the decimal separator
(period or comma) in the same way.
The problem with using String::ucompose for command lines was
originally encountered and corrected in the following commit:
Fix attempt data rescue fail to open read-only view (#673246)
e494eca1f7
Use e2image features added in e2fsprogs 1.42.9 to move/copy
an ext[234] file system more efficiently by skipping unused blocks.
Fall back to the internal copy algorithm if e2image is not found
or does not support move/copy.
Bug #721516 - Use e2image to move/copy ext[234] filesystems
The gnome-common package is needed when building from the git
repository. This package was missed in the list of dependencies for
the Fedora GNU/Linux distribution.
The help manual was updated to reflect that the legend is now always
displayed on the File System Support dialog.
Bug #342682 - too much information in 'features' dialog
GunChleoc has brought to my attention an inability to create the
Scottish Gaelic (gd) translation files for the GParted help
manual using Damned Lies. In an effort to work around this challenge
I am adding "gd" to LINGUAS in help/Makefile.am, and also adding a
template help/gd/gd.po file for translation.
Work on bug 701075 inadvertently introduced a problem where ext2/3/4,
resierfs, and ntfs file systems were rounding the file system size up
to the nearest kiB.
The problem was discovered when a user resized a partition by moving
only the start boundary to the right thereby shrinking the partition.
In the situation where the resulting partition size was not an integer
kiB value (such as might occur on a 512 byte per sector device) the
file system size was rounded up to the nearest kiB. This resulted in
a file system size being set one sector larger than the partition
size.
This problem was introduced with the following commit:
Shrink file systems to exact size (#701075)
3461413d28
The fix chosen for this problem involved removing the rounding logic.
Bug 723543 - Shrink ext2/3/4 results in attempt to set partition
smaller than file system
Only recognises partitions containing BitLocker Disk Encryption content.
No other actions are supported.
Bug #723232 - BitLocker Disk Encryption not recognised
Restore the order of the source files so that they are once again
compiled in order A-Z, a-z. Order is obtained with:
fgrep .cc src/Makefile.am | LANG=C sort
fgrep .h include/Makefile.am | LANG=C sort
Make the dialog resizable, add a vertical scrollbar and set the minimum
(and therefore initial) height to 500 pixels. This is so that the
dialog entirely fits on an 800x600 screen, thus allowing the rescan
button to be pressed.
100 pixel difference is to account for the size of the top and bottom
GNOME 2 panels and two sets of title bars. Two sets of title bars
because the window manager tries to place the top of dialog title bars
in line with the bottom of the main window title bar.
Bug #342682 - too much information in 'features' dialog
Use padding to indent the legend narrative to better show hierarchy and
association with the "Legend" category as recommended in the:
GNOME HIG 2.2.3 / Visual Design / Window Layout
https://developer.gnome.org/hig-book/stable/design-window.html.en
Padding the legend narrative widget also deliberately increases the
spacing to the legend icons too.
Bug #342682 - too much information in 'features' dialog
Make the legend always shown, ready for when the dialog is resizable.
Change the widget containing the legend from an expander to a frame
widget. Set the frame to be borderless using a bold label as
recommended in the GNOME Human Interface Guidelines 2.2.1 / Controls /
Frames and Separators.
https://developer.gnome.org/hig-book/2.32/controls-frames.html.en
Bug #342682 - too much information in 'features' dialog
The DialogFeatures::DialogFeatures() constructor used four levels of
nested code blocks and reused the same variable names at multiple
levels. The variable hbox was used at three of the four levels. This
was done by commit:
91b971691d
Bug #634090: Change some attributes to local variables
In my opinion this made the code hard to understand. Give every local
variable a unique and meaningful name and remove the nested code blocks.
This is part of parent bug:
Bug #721455 - Obsolete info in license text on multiple modules
and GNOME Goal:
https://wiki.gnome.org/Initiatives/GnomeGoals/Proposals
* verify all source files to make sure they have a license and a
copyright, and that both are up-to-date
Bug #721565 - License text contains obsolete FSF postal address
Write a loop partition table to a disk and then try to create a new
partition on that disk crashes GParted.
Analysis:
1) Loop partition table, actually just the signature / label
"GNU Parted Loopback 0", is written to the disk.
2) create_partition() calls ped_disk_app_partition() to create the
partition which, arguably erroneously, clears the loop signature.
3) In erase_filesystem_signatures(), get_device_and_disk() fails because
there's no longer a loop signature for libparted to recognise. This
leaves lp_device, lp_disk and lp_partition = NULL, but incorrectly
overall_success = true.
4) Overall_success = true allows the signature erasure loop to run and
evaluate lp_device->sector_size, dereferencing a NULL pointer and
crashing GParted.
Fix erase_filesystem_signatures() to correctly handle failure from
get_device_and_disk(), broken by this commit:
246e05559d
Clear btrfs file system super block mirror copies too (#705426)
Bug #721988 - Crash when creating new partition on disk with loop label