Commit Graph

19 Commits

Author SHA1 Message Date
Mike Fleetwood 8979913a3f Remove "../include/" from GParted header #includes
It made the code look a little messy, is easily resolved in the build
system and made the dependencies more complicated than needed.  Each
GParted header was tracked via multiple different names (different
numbers of "../include/" prefixes).  For example just looking at how
DialogFeatures.o depends on Utils.h:

    $ cd src
    $ make DialogFeatures.o
    $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po
     ../include/DialogFeatures.h ../include/../include/Utils.h \
     ../include/../include/../include/../include/../include/../include/Utils.h \
     ../include/../include/../include/Utils.h \

After removing "../include/" from the GParted header #includes, just
need to add "-I../include" to the compile command via the AM_CPPFLAGS in
src/Makefile.am.  Now the dependencies on GParted header files are
tracked under a single name (with a single "../include/" prefix).  Now
DialogFeatures.o only depends on a single name to Utils.h:

    $ make DialogFeatures.o
    $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po
     ../include/DialogFeatures.h ../include/Utils.h ../include/i18n.h \
2016-12-12 13:15:34 -07:00
Mike Fleetwood 91e5a0960e Remove remaining use of retired vol_id
Vol_id has been retired and removed from all supported distributions.
See earlier commit "Remove use of retired vol_id from FS_Info module
(#767842)" for more details.  Therefore remove it's use from GParted
entirely.
2016-08-06 09:47:58 -06:00
Mike Fleetwood 48d898ebfd Include Partition.h header everywhere it's used
Lots of files which use the Partition class relied on the declaration
being included via other header files.  This is bad practice.

Add #include "Partition.h" into every file which uses the Partition
class which doesn't already include it.  Header file #include guards are
specifically to allow this.
2016-01-26 10:11:35 -07:00
Daniel Mustieles 3861b9257b Replace obsolete FSF postal address in copyright notices (#721565)
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
2014-01-26 10:53:23 +00:00
Mike Fleetwood 2b51d87147 Make include guards unique (#539297)
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
2013-06-05 10:57:39 -06:00
Phillip Susi e4210ba08d Cleanup duplicate fs code
Many filesystems do not implement some of their methods, but had to provide
dummy implementations.  Remove all of the dummy implementations and instead
just provide one in the base FileSystem class.
2013-03-11 18:40:31 -06:00
Mike Fleetwood 795a92f5b2 Add file system specific remove() methods (#670171)
This commit only adds a remove() method to every file system and an
optional call to it in the relevant operations.  All remove() methods
are no operations and not enabled.

The remove() method provides explicit controlled removal of a file
system before the partition is deleted or overwritten by being formatted
or pasted into.  When implemented, it appears as an extra step in the
relevant operation.  The file system specific remove() method is
explicitly allowed to fail and stop the operations currently being
applied.

This is different to the existing erase_filesystem_signatures() which
wipes any previous file system signatures immediately before a new file
system is written to ensure there is no possibility of the partition
containing two or more different file system signatures.  It never fails
or reports anything to the user.

NOTE:
Most file systems should NOT implement a remove() method as it will
prevent recovery from accidental partition deletion.

Bug #670171 - Add LVM PV read-write support
2012-08-30 13:47:45 -06:00
Rogier Goossens 9e96159bb2 Add support for setting UUID (#667278)
Add the ability to set a new random UUID on file systems that provide
the appropriate tools to perform this action.

Update the help manual to include this new functionality.  Also add
reference links to "setting a partition label" and "changing a
partition UUID" in the "copying and pasting a partition" section.

This patch does not include setting the UUID on an NTFS file system.

Bug #667278 - Add support for setting UUID

Bug #608308 - fix documentation - Copying and Pasting a Partition
2012-01-23 12:32:27 -07:00
Curtis Gedak ca30f986f7 Add virtual move method to FileSystem class
This is preparation work for the following bug report:
Bug #589555 - Moving a swap partition needlessly copies
              all "data" on it
2010-10-19 13:35:53 -06:00
Curtis Gedak 8cfb27b718 Cleanup file copyright entries
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.
2009-11-05 11:08:49 -07:00
Curtis Gedak 55952fe621 Renamed set_label and get_label methods to write_label and read_label respectively.
svn path=/trunk/; revision=957
2008-11-08 23:55:17 +00:00
Curtis Gedak 8d808c0b62 gparted-0.3.6 - code recreation from Source Forge
svn path=/trunk/; revision=810
2008-04-07 19:41:18 +00:00
Bart Hakvoort e3b4a7316b added support for reading volumelabels. Atm we only read ext2/3, but the
* added support for reading volumelabels. Atm we only read ext2/3, but
  the infrastructure for adding the other filesystems is in place.
  It's simply a matter of finding the right commands and parsing the
  output. (see #338528 for more info)
2006-09-12 20:34:33 +00:00
Bart Hakvoort 889ab1232f changed progressfeedbackhandling a bit. Because this affected
* changed progressfeedbackhandling a bit. Because this affected
  OperationDetail i had to make changes in almost every file.
2006-08-20 09:33:54 +00:00
Bart Hakvoort d52b0286c9 fixed Pango markup problems in operationdetails restructured
* fixed Pango markup problems in operationdetails
* restructured OperationDetail
* renamed some enums for improved readability of the source
2006-07-29 08:27:28 +00:00
Bart Hakvoort 97a9a5fa87 p
* added detailed progressfeedback. It still needs some polishing, but
  is already far better then the old situation. And what's more, it's
  finally threadsafe :p
2006-01-19 19:15:15 +00:00
Bart Hakvoort 7e4efd3c2e rewrote quite some stuff to use an enum to indentify filesystems instead
* rewrote quite some stuff to use an enum to indentify filesystems
  instead of stringcomparisons.
2005-12-07 11:21:27 +00:00
Bart Hakvoort c87cba6ee5 Changed 'bool Create( const Glib::ustring & device_path, const Partition &
* The Filesystemclasses: Changed 'bool Create( const Glib::ustring & device_path, const Partition & new_partition )'
to 'bool Create( const Partition & new_partition )'. Since i now use external tools for all filesystems, the partitionpath will suffice.
2004-12-28 13:29:01 +00:00
Bart Hakvoort 8a0ed3b6ac added support for jfs (create, copy, grow) and hfs (create, copy) fixed a
* added support for jfs (create, copy, grow) and hfs (create, copy)
* fixed a bug in copying xfs filesystems.
* fixed a number of small bugs/annoying issues.
2004-12-14 22:49:44 +00:00