Commit Graph

71 Commits

Author SHA1 Message Date
Mike Fleetwood 391e5e12f9 Rename FS_LVM2 -> FS_LVM2_PV (#160787)
This is the first step of adding support for just LVM2 Phyiscal Volumes,
a subset of full LVM2 support.

Make it clear that it is only LVM2 PVs being treated like a file system.

Bug #160787 - lvm support
2012-01-31 10:26:51 -07:00
Curtis Gedak 2bcd5d2954 Cleanup btrfs code
Move btrfs higher up the file system list.
Remove btrfs skip references as btrfs is now supported.
2011-10-22 10:44:29 -06:00
Curtis Gedak 55b71a77bc Fix unused parameter compiler warning
Removed unused parameter.  Prior to this change the compiler would
complain with the following message:

error: unused parameter ‘cylinder_size’
2011-07-18 13:31:54 -06:00
Curtis Gedak 813010b148 Update AUTHORS file and minor variable rename
Add recognition for the work done by Markus Elfring.
Also minor variable rename and added comment for patch to bug #634090.
2011-07-18 13:28:49 -06:00
Markus Elfring 91b971691d Bug #634090: Change some attributes to local variables
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>
2011-07-18 13:28:49 -06:00
Curtis Gedak 8a58b5b53e Enable compile and link with libparted 3.0 (#651559)
The release of (lib)parted 3.0 includes a change to the Application
Programing Interface - API.  Most importantly, libparted 3.0 removes
many file system specific function calls, and hence the capabilities
provided by these functions.  In order for GParted to compile and link
with libparted 3.0, this libparted functionality is lost.

Specifically, the functionality that is lost when GParted is compiled
and linked with libparted 3.0 is as follows:

  - Loss of ability to grow and shrink FAT16 and FAT32 file systems
  - Loss of ability to shrink HFS and HFS+ file systems
  - Loss of ability to determine used and unused sectors in HFS and
      HFS+ file systems
  - Loss of ability to erase file system signatures on partition
      create and format

It is hoped that other free software projects will include some or all
of the above lost functionality, which can then be added back to
GParted.

This commit includes a change in how FAT16 and FAT32 file systems are
moved.  Specifically the move is now performed internally by GParted
when linked with libparted 3.0.  The move functionality is provided by
libparted for prior libparted versions (e.g. less than 3.0).

This is the final enhancement in a series of commits that enable
GParted to compile with libparted version 3.0.

Closes Bug #651559 - Doesn't compile against parted 3.0
2011-06-09 09:59:41 -06:00
Seth Heeren 18fed5030f leaked FS structures for new partition dialog
FILESYSTEMS vector copies anyway
2010-10-05 12:46:26 -06:00
Luca Bruno 9c41afae91 Use ext2 as default when creating new filesystems
Default to ext2 for filesystem creation, instead of the
alphabetically preceding btrfs. Do not use get_label(),
as it is not available in older gtkmm.
2010-10-05 08:51:53 -06:00
Curtis Gedak adc55bec50 Fix partitions created using MiB alignment are 1 MiB larger (#631026)
Closes bug #631026 - Partitions created using MiB alignment are
                     1 MiB larger than specified
2010-09-30 11:31:25 -06:00
Curtis Gedak a30f991ca5 Fix size reduced by 1 MiB when created after cylinder aligned partition
Prior to this enhancement creating a new partition aligned to MiB
after a partition aligned to cylinder would result in the creation of
a partition that was 1 MiB smaller in size than requested.  In the
case of a 1 MiB new partition, a warning message would be displayed
indicating that "A partition cannot have a length of 0 sectors".

This problem is avoided by applying similar logic as was used to
address the following bug:
Bug #626946 - Destination partition smaller than source partition
2010-09-09 13:18:02 -06:00
Curtis Gedak b74dba4f67 Change behavior to better align with GNOME HIG on drop-down lists
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."
2010-05-26 17:33:38 -06:00
Curtis Gedak 95c9577d8f Limit graphic movement according to required boot record space
Also respect minimum size for extended partition in graphical
representation.

This change is part of adding the option to align to MiB (#617409).
2010-05-25 16:26:08 -06:00
Curtis Gedak 40bb656de5 Disable resizing when the total area is less than two mebibytes 2010-05-25 16:26:07 -06:00
Curtis Gedak e62a23b5b5 Add partition alignment option to align to MiB (#617409)
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.
2010-05-20 10:00:14 -06:00
Curtis Gedak 2cdfb4c55a Change partition alignment check box to a drop down menu
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.
2010-05-09 14:45:26 -06:00
Curtis Gedak 7e2ca14756 Rename get_length method to get_sector_length
This rename is to try to reduce future confusion between
partition length in sectors versus partition length in bytes.
2010-04-28 09:11:44 -06:00
Curtis Gedak 70448f4fb0 Replace sector math with get_byte_length method where appropriate
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-27 12:54:14 -06:00
Curtis Gedak cb08e8c7dd Remove 512 byte based units and rename _FACTOR to BYTE
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.
2010-04-26 13:40:38 -06:00
Curtis Gedak 81a903cda2 Replace constant MEBIBYTE with appropriate MEBI_FACTOR math
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-26 13:21:18 -06:00
Curtis Gedak 5d2bf2ec5d Replace default sector size with appropriate sector size
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-26 11:52:33 -06:00
Curtis Gedak 74ecd2ed3f Set sector size and add to operation and dialog methods
This change is in preparation for supporting sectors sizes > 512 bytes.
2010-04-19 19:22:31 -06:00
Curtis Gedak eb7e09aac8 Remove GParted:: prefix from in front of UNIT constants 2010-03-24 14:37:08 -06:00
Curtis Gedak 1aa81bba94 Enhance sector_to_unit() for sector sizes > 512 bytes 2010-03-24 14:37:08 -06:00
Curtis Gedak f9f603256e Convert file system maximum from sector to byte value 2010-03-24 14:37:08 -06:00
Curtis Gedak 40d7dbac4b Convert file system minimum from sector to byte value 2010-03-24 14:37:08 -06:00
Curtis Gedak 70584176de Disable extended option for non-MSDOS and non-DVH disk types (#583906)
According to parted documentation, only "msdos" and "dvh" disk
types (or partition table types) support extended partitions.
All other disk types support primary partitions only.
2010-02-24 11:39:42 -07: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 a960d280d8 Change field labels to sentence capitalization (#583885)
This change done to align with the GNOME Human Interface Guidelines.
http://library.gnome.org/devel/hig-book/stable/design-text-labels.html.en
2009-10-21 15:25:44 -06:00
Seth Hunter df541b8986 Fix problem with create new partition size off by one sector (#596552)
With "Round to cylinders" deactivated, creating a new partition would
create a partition that was one sector too large.

Closes GParted bug #596552
2009-09-28 16:32:04 -06:00
Curtis Gedak dc1ab54d8f Added detection of btrfs file system
svn path=/trunk/; revision=1075
2009-02-23 20:22:30 +00:00
Curtis Gedak 3ef0293876 Added detection of LUKS encrypted partitions
svn path=/trunk/; revision=1071
2009-02-18 16:19:49 +00:00
Curtis Gedak 4ef71e5004 Added lvm2 physical volume detection
svn path=/trunk/; revision=1000
2008-12-07 18:43:35 +00:00
Curtis Gedak c4bc4430c7 Fixed incorrect spelling of filesystem and mountpoint
svn path=/trunk/; revision=970
2008-11-18 23:58:17 +00:00
Curtis Gedak b10f2325d7 Migrated Round to cylinders checkbutton from dialog partition new to dialog base partition so that it can be used by all dialogs that inherit from dialog base partion (e.g., New, Copy, and Resize/Move)
svn path=/trunk/; revision=856
2008-06-15 17:18:26 +00:00
Curtis Gedak 16afc3bb75 Corrected math in partition creation/resize dialogs that prevented operations on partition sizes >= 1 TB
svn path=/trunk/; revision=828
2008-04-21 17:08:43 +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 f96c8dea05 trivial cleanups
* trivial cleanups
2006-03-28 12:40:29 +00:00
Bart Hakvoort 9830c8f63e did lots of work on the resizer, it's behaviour should be more natural and
* include/Frame_Resizer_Base.h,
  include/Frame_Resizer_Extended.h,
  src/Dialog_Base_Partition.cc,
  src/Dialog_Partition_Copy.cc,
  src/Dialog_Partition_New.cc,
  src/Dialog_Partition_Resize_Move.cc,
  src/Frame_Resizer_Base.cc,
  src/Frame_Resizer_Extended.cc: did lots of work on the resizer, it's
  behaviour should be more natural and satisfying now. (see also
  #331591)
* src/Win_GParted.cc: extended partition was resizable even when it's
  busy. fixed.
* src/ntfs.cc: made scan output more readable.
* src/FrameVisualDisk.cc: added FIXME
2006-03-01 19:16:13 +00:00
Bart Hakvoort 391ca32a2b in some places i still used MiB's instead of sectors to store sizes. this
* in some places i still used MiB's instead of sectors to store sizes.
  this has been fixed everywhere. Only the spinbuttons still use
  MiB's. I have a few ideas on how to solve this, but i'll take it up
  with #usability first.
2006-02-25 10:09:30 +00:00
Bart Hakvoort 7d4b6a2eea :sector_to_unit() and use it in several places fixed errors with
* implemented Utils::sector_to_unit() and use it in several places
* (finally) fixed errors with ntfsresizing (had a lot to do with
  difference between MB and MiB)
* resizing of reiserfs now shows more detailed feedback
* support for TebiByte (TiB) unit
2006-01-22 00:07:27 +00:00
Bart Hakvoort 2b509a8332 //www.iec.ch/zone/si/si_bytes.htm
* changed KB/MB/GB/TB to KiB/MiB/GiB/TiB after reading http://www.iec.ch/zone/si/si_bytes.htm
2006-01-20 23:35:06 +00:00
Bart Hakvoort f9ab3cdd3c commented 'ss .imbue( std::locale( "" ) )' (#157871) cleanups allow forced
* src/Utils.cc: commented 'ss .imbue( std::locale( "" ) )' (#157871)
* src/Win_GParted.cc,
  src/TreeView_Detail.cc,
  src/Dialog_Base_Partition.cc: cleanups
* include/Dialog_Partition_New.h,
  include/Partition.h,
  src/Dialog_Partition_New.cc,
  src/GParted_Core.cc,
  src/Partition.cc: allow forced partitionsizes (aka: do not round to
  cylinder). (#169486)
2006-01-07 15:04:42 +00:00
Bart Hakvoort 808b777019 replaced the inline Utils functions with static functions. This shaves a
* replaced the inline Utils functions with static functions.
  This shaves a few kbytes (24 in fact) off the binary and is a bit
  cleaner code-wise (imho).
2005-12-13 21:30:13 +00:00
Bart Hakvoort 642f0a145b from now on each partition has a reference to it's device. make use of new
* include/Partition.h,
  src/Partition.cc: from now on each partition has a reference to it's
  device.
* src/Win_GParted.cc,
  src/Dialog_Partition_New.cc: make use of new Set() from partition
* include/GParted_Core.h,
  src/GParted_Core.cc: since ped_file_system_clobber() ignored reiser4
  i've implemented a custom 'filesystem signature remover'.
  Also made use of the fact a partition now knows on which device it
  lives.
* src/Operation.cc: the get_string() didn't use
  Get_Filesystem_String() and thus returned faulty strings. Also did
  some cleanups.
2005-12-07 22:44:40 +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 cc18d11ad5 hmmz, lots of shimmery internals.. Instead of using a boolean to indicate
* hmmz, lots of shimmery internals..
  Instead of using a boolean to indicate support for certain
  features i now use and enum (NONE, LIBPARTED, EXTENDED).
  This allowed me to clean up some stuff that annoyed me ;)
  Still.. the core could use a bit more love...
2005-11-27 00:57:11 +00:00
Bart Hakvoort fa255c48de removed sleep( 1 ). This isn't needed anymore now the layout is scanned
* src/GParted_Core.cc: removed sleep( 1 ). This isn't needed anymore now the layout is scanned before the re-readtest. (saves seconds at scantime :) )
* replaced C-style typeconversion with static_casts throughout the project.
2005-01-19 20:01:39 +00:00
Bart Hakvoort e3a9b2d14c The fixes from 12-09 unearthed a number of long forgotten issues and
* The fixes from 12-09 unearthed a number of long forgotten issues and annoyances. Hopefully they're all resolved now.
2004-12-12 14:57:04 +00:00
Bart Hakvoort a42a0c2fee Fixed a bunch of issues with min. and max. sizes of filesystems.
* Fixed a bunch of issues with min. and max. sizes of filesystems.
2004-12-10 20:42:23 +00:00
Bart Hakvoort 951797caa7 added MIN and MAX to filesystemstruct to set min. and max sizes of a
* 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)
2004-12-09 22:56:33 +00:00