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
Include guards need to be unique within GParted code and all included
library header files.
http://en.wikipedia.org/wiki/Include_guard#Difficulties
Use this model for all include guards:
#ifndef GPARTED_FILE_NAME_H
#define GPARTED_FILE_NAME_H
...
#endif /* GPARTED_FILE_NAME_H */
Closes Bug #539297 - Make include guards unique
Steps to reproduce:
1) Open any of these dialogs: Create New Partition, Resize/Move or
Paste;
2) Update any of the following numeric entry fields to a different value
using the keyboard: Free space preceding, New size or Free space
following;
3) Press [Esc] key;
Gparted crashes.
What is happening is that the [Esc] key is leading to the dialog being
closed and calling the ~Dialog_Base_Partition() destructor. However
after this the GTK widget is calling the on_spinbutton_value_change()
registered callbacks for the change to the other two values, on the now
just deleted object.
Fix by disconnecting the change notification callbacks in the
destructor.
Closes bug #682658 - GParted crash by pressing Esc in dialogs with
number entry
Some classes contained private attributes which were used only by a single
member function. Such items were moved to the corresponding function implementations
to stress their limited usage scope.
A few unused variables were also deleted.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
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.
Restore copyright entries by original author to those of his last
known repository commit titled "released gparted-0.3.4 on
LarryT's request." on Feb 25, 2007.
Add my own copyright entries for files in which I changed source
code. Files in which I only made spelling changes do not have my
copyright entry added.
* include/Device.h,
include/Dialog_Base_Partition.h,
src/Dialog_Base_Partition.cc: replaced 'long' with 'Sector' to
prefent overflows with really large devices.
* include/Dialog_Base_Partition.h,
src/Dialog_Base_Partition.cc,
src/Dialog_Partition_Copy.cc,
src/Dialog_Partition_Resize_Move.cc: Fixed bug in copy functionality (due to unset ORIG_START startsector wasn't set correctly). Also have ORIG*
initialized in ctor of dialogbase to prevent such errors from ever happening again (this one only showed up with gcc-3.3.5) .
* added MIN and MAX to filesystemstruct to set min. and max sizes of a filesystem. So instead of checking per filesystem
i now simply check the fs.MIN or fs.MAX. this results in less and cleaner code. Also this will come in handy when adding
support for new filesystems. (This also fixed several minor bugs with filesystemsizes and gained some improvement in resizer
performance)
* Rewrote a large part of gparteds internal code. Filesystemssupport is now much more separated from the rest of gparted and
adding support for other filesystems should be a piece of cake now (hope that's true :P)
It still needs a lot of love, but the foundations are laid =)