Commit Graph

2484 Commits

Author SHA1 Message Date
Mike Fleetwood 287526681d Add devid to the cache of btrfs device information (#723842)
Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood 1712809e01 Display usage for multi-device btrfs file systems (#723842)
Currently GParted fails to report the usage of a multi-device btrfs file
system if it is mounted or if the used space is larger than the size of
an individual member device.  When GParted does display usage figures it
also incorrectly reports the file system wide used figure against every
member device.

Mounted case:
    statvfs() provides an FS size which is larger than any individual
    device so is rejected.  See:
        GParted_Core::mounted_set_used_sectors()
            Utils::get_mounted_filesystem_usage()
            partition .set_sector_usage()

Unmounted case, FS used > device size:
    FS used figure is larger than any individual device so free space is
    calculated as a negative number and rejected.  See:
        btrfs::set_used_sectors()

Btrfs has a volume manager layer within the file system which allows it
to provide multiple levels of data redundancy, RAID levels, and use
multiple devices both of which can be changed while the file system is
mounted.  To achieve this btrfs has to allocate space at two different
level: (1) chunks of 256 MiB or more at the volume manager level; and
(2) extents at the file data level.
References:
*   Btrfs: Working with multiple devices
    https://lwn.net/Articles/577961/
*   Btrfs wiki: Glossary
    https://btrfs.wiki.kernel.org/index.php/Glossary

This makes the question of how much disk space is being used in an
individual device a complicated question to answer.  Further, the
current btrfs tools don't provide the required information.

Btrfs filesystem show only provides space usage information at the chunk
level per device.  At the file extent level only a single figure for the
whole file system is provided.  It also reports size of the data and
metadata being stored, not the larger figure of the amount of space
taken after redundancy is applied.  So it is impossible to answer the
question of how much disk space is being used in an individual device.
Example output:

    Label: none  uuid: 36eb51a2-2927-4c92-820f-b2f0b5cdae50
            Total devices 2 FS bytes used 156.00KB
            devid    2 size 2.00GB used 512.00MB path /dev/sdb2
            devid    1 size 2.00GB used 240.75MB path /dev/sdb1

Fix by guesstimating the per device used figure as the fraction of the
file system wide extent usage based on chunk usage per device.
Calculation:
    ptn fs used = total fs used * devid used / sum devid used

Positives:
1) Per device used figure will correctly be between zero and allocated
   chunk size.

Known inaccuracies:
[for single and multi-device btrfs file systems]
1) Btrfs filesystem show reports file system wide file extent usage
   without considering redundancy applied to that data.  (By default
   btrfs stores two copies of metadata and one copy of data).
2) At minimum size when all data has been consolidated there will be a
   few partly filled chunks of 256 MiB or more for data and metadata of
   each storage profile (RAID level).
[for multi-device btrfs file systems only]
3) Data may be far from evenly distributed between the chunks on
   multiple devices.
4) Extents can be and are relocated to other devices within the file
   system when shrinking a device.

Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood a086e115e5 Display mount points for multi-device btrfs file systems (#723842)
Linux can only show a single device name in /proc/mounts and /etc/mtab
for each mounted btrfs, even if it is a multi-device file system.  So
GParted only shows a mount point for one of the devices in the btrfs, no
matter how many devices are part of the file system.

    # mkfs.btrfs /dev/sdb1 /dev/sdb2
    # btrfs filesystem show /dev/sdb1
    Label: none  uuid: 36eb51a2-2927-4c92-820f-b2f0b5cdae50
            Total devices 2 FS bytes used 156.00KB
            devid    2 size 2.00GB used 512.00MB path /dev/sdb2
            devid    1 size 2.00GB used 240.75MB path /dev/sdb1
    # mount /dev/sdb1 /mnt/1
    # grep btrfs /proc/mounts
    /dev/sdb1 /mnt/1 btrfs rw,seclabel,relatime,ssd,space_cache 0 0

GParted only shows the mount point for /dev/sdb1 as /mnt/1, but nothing
for /dev/sdb2.

Make GParted report the same mount point for all devices included in a
multi-device btrfs file system.

Add btrfs specific get_mount_device() method to report the mounting
device, if any, for the btrfs file system in the occupying the device in
question.  Uses the existing cache of btrfs file system device
membership.  Also extract common code from GParted_Core::
set_mountpoints() into set_mountpoints_helper().

Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood 76e64f2905 Detect busy status of multi-device btrfs file systems (#723842)
Busy detection of file systems works by checking if the device is
mounted (appears in the mount_info map).  For a multi-device btrfs file
system this will only report one of the devices as busy, not all of
them.

    # btrfs filesystem show /dev/sdb1
    Label: none  uuid: 36eb51a2-2927-4c92-820f-b2f0b5cdae50
            Total devices 2 FS bytes used 156.00KB
            devid    2 size 2.00GB used 512.00MB path /dev/sdb2
            devid    1 size 2.00GB used 240.75MB path /dev/sdb1
    # mount /dev/sdb1 /mnt/1
    # grep btrfs /proc/mounts
    /dev/sdb1 /mnt/1 btrfs rw,seclabel,relatime,ssd,space_cache 0 0

GParted will only report /dev/sdb1 as busy, but not /dev/sdb2.

Add btrfs specific is_busy() method which reports the device as busy if
any of the devices in the btrfs file system are mounted.  This uses a
cache which maps device membership in all btrfs file systems.  The cache
is cleared on GParted refresh and incrementally populated as each btrfs
partition is checked for busy status.

WARNING:
Removal of the mounting device from a btrfs file system makes it
impossible to determine whether the file system is mounted or not for
linux <= 3.4.  This is because /proc/mounts continues to show the old
device which is no longer a member of the file system.

    # btrfs device delete /dev/sdb1 /mnt/1
    # sync
    # grep btrfs /proc/mounts
    /dev/sdb1 /mnt/1 btrfs rw,seclabel,relatime,ssd,space_cache 0 0
    # btrfs filesystem show /dev/sdb1
    # btrfs filesystem show /dev/sdb2
    Label: none  uuid: 36eb51a2-2927-4c92-820f-b2f0b5cdae50
            Total devices 1 FS bytes used 28.00KB
            devid    2 size 2.00GB used 1.02GB path /dev/sdb2

Fixed in linux 3.5 by commit:
    Btrfs: implement ->show_devname
    https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9c5085c147989d48dfe74194b48affc23f376650

Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood a0c0533e3e Add is_dev_mounted() to expose core partition is mounted test (#723842)
Add static member function GParted_Core::is_dev_mounted() so that other
modules can determine if a particular partition contains a mounted file
system or not.

Make it a static member function so that it can be called without
needing the gparted_core object.  Extend to make the group of
manipulated variables (mount_info, fstab_info) and manipulating
functions (init_maps(), read_mountpoints_from_file(),
read_mountpoints_from_file_swaps(), get_all_mountpoints()) static too.

Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood 49a2e19462 Restore busy detection of unknown mounted file systems (#723842)
Previous commit:
    Make partition busy detection method selectable per file system
    (#723842)
causes GParted to no longer detect an unknown mounted file system as
busy.

This is needed because there are many less popular file systems which
Linux can mount but GParted doesn't recognise, such as: Acorn ADFS,
AFFS, BeFS, BFS, etc.  Encountering an unrecognised mounted device can
also occur with btrfs on Linux 3.4 and earlier when the mounting device
is deleted from a multi-device btrfs file system.  Happens because
/proc/mounts continues to show the original mounting device even after
that device was deleted from the file system.

    # mkfs.btrfs /dev/sdb1
    # mount /dev/sdb1 /mnt/1
    # btrfs device add /dev/sdb2 /mnt/1
    # btrfs device delete /dev/sdb1 /mnt/1
    # btrfs filesystem sync /mnt/1
    # grep btrfs /proc/mounts
    /dev/sdb1 /mnt/1 btrfs rw,seclabel,relatime,ssd,space_cache 0 0
    # blkid /dev/sdb1
    # btrfs filesystem show /dev/sdb1
    # blkid /dev/sdb2
    /dev/sdb2: UUID="9c75647c-217a-4718-bcc7-f3ccd8cc7dc6" UUID_SUB="b5d43630-80d4-42ac-b406-185e97cd5bbe" TYPE="btrfs"
    # btrfs filesystem show /dev/sdb2
    Label: none  uuid: 9c75647c-217a-4718-bcc7-f3ccd8cc7dc6
            Total devices 1 FS bytes used 28.00KB
            devid    2 size 2.00GB used 1.02GB path /dev/sdb2

Reinstate the search for mounted partitions for busy detection even for
unrecognised file system types.

Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood b1dc9e69e3 Make partition busy detection method selectable per file system (#723842)
GParted's primary inbuilt busy detection method is "is the partition
mounted?".  A custom method is used for LVM2 PV because its not a
mounted file system.

Make busy detection selectable per file system type.

    .fs.busy = FS::NONE  (default)
        No busy detection.

    .fs.busy = FS::GPARTED
        Use internal GParted method which checks if the partition is
        mounted.

    .fs.busy = FS:EXTERNAL
        Call the file system type's member function is_busy().

LVM2 PV busy detection changes from a special case to just electing to
call the lvm2_pv::is_busy() method.  Linux Software RAID remains a
special case because it's only recognised, but not otherwise supported.

Bug #723842 - GParted resizes the wrong filesystem (does not pass the
              devid to btrfs filesystem resize)
2014-07-28 10:03:16 -06:00
Mike Fleetwood b1c64fdf0d Make ./configure fail when C++ compiler is missing (#732803)
Currently ./configure passes successfully even if a C++ compiler is not
installed.  The first time building the code fails is when make tries
to compile the first C++ source file and the compiler executable is not
found.

Also because there is no C++ compiler the autoconf generated test for
Gtk::Window::set_default_icon_name() will always fail, leaving
HAVE_SET_DEFAULT_ICON_NAME unset.  Therefore as well as installing a
C++ compiler, ./configure must be run again to correctly test for
set_default_icon_name().

This is as a result of a little known consequence of having AC_PROG_CC
proceed AC_PROG_CXX in the autoconf file configure.ac.
    Subject: AC_PROG_CXX behaviour when no C++ compiler is found
    http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html

Reverse the order, placing AC_PROG_CXX before AC_PROG_CC, so that the
generated ./configure script fails with an error if there is no C++
compiler available.

Bug #732803 - ./configure is successful even when C++ compile is missing
2014-07-20 09:18:39 -06:00
Curtis Gedak 1e007757a9 Append -git to version for continuing development 2014-07-15 10:46:24 -06:00
Curtis Gedak 6edab65026 ========== gparted-0.19.1 ========== 2014-07-15 09:39:15 -06:00
Wolfgang Stöggl fd03e158e0 Updated German translation 2014-07-15 05:41:50 +00:00
Abderrahim Kitouni d14bef73e3 Updated Arabic translation 2014-07-14 19:15:23 +01:00
Rafael Ferreira c2bc32d099 Updated Brazilian Portuguese translation 2014-07-14 15:57:51 +00:00
Safa Alfulaij a8e98a44ea Updated Arabic translation 2014-07-13 19:37:44 +01:00
Daniel Șerbănescu 1675e97100 Updated Romanian Translation 2014-07-13 17:33:05 +02:00
Daniel Korostil 4b45451107 Updated Ukrainian translation 2014-07-11 00:59:29 +03:00
Milo Casagrande f30242a449 Updated Italian translation 2014-07-10 07:47:06 +00:00
Mike Fleetwood 0fcfd18061 Prevent cross thread write after free in _OnReadable() (#731752)
Fragment of debugging and valgrind output:
D: tid=2193 main()
...
D: tid=2202 GParted_Core::set_devices_thread()
...
D: tid=2202 Utils::execute_command(command="dumpe2fs -h /dev/sda1", output, error, use_C_locale=1)
D: tid=2202 this=0x13fef4a0 PipeCapture::PipeCapture()
D: tid=2202 this=0x13fef4f0 PipeCapture::PipeCapture()
D: tid=2202 this=0x13fef4a0 PipeCapture::connect_signal()
D:  sourceid=77
D: tid=2202 this=0x13fef4f0 PipeCapture::connect_signal()
D:  sourceid=78
D: tid=2193 data=0x13fef4a0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4a0 PipeCapture::OnReadable()
D:  signal_update.emit()
D:  return true
D: tid=2193 data=0x13fef4f0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4f0 PipeCapture::OnReadable()
D:  signal_update.emit()
D:  return true
D: tid=2193 data=0x13fef4a0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4a0 PipeCapture::OnReadable()
D:  signal_update.emit()
D:  return true
D: tid=2193 data=0x13fef4f0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4f0 PipeCapture::OnReadable()
D:  signal_eof.emit()
D:  return false
D:  (!rc)  &(pc->sourceid)=0x13fef518
D: tid=2193 data=0x13fef4a0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4a0 PipeCapture::OnReadable()
D:  signal_update.emit()
D:  return true
D: tid=2193 data=0x13fef4a0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4a0 PipeCapture::OnReadable()
D:  signal_update.emit()
D:  return true
D: tid=2193 data=0x13fef4a0 PipeCapture::_OnReadable()
D: tid=2193 this=0x13fef4a0 PipeCapture::OnReadable()
D:  signal_eof.emit()
D: tid=2202 this=0x13fef4f0 PipeCapture::~PipeCapture()
D:  sourceid=0
D: tid=2202 this=0x13fef4a0 PipeCapture::~PipeCapture()
D:  sourceid=77
D:  return false
D:  (!rc)  &(pc->sourceid)=0x13fef4c8
==2193== Thread 1:
==2193== Invalid write of size 4
==2193==    at 0x490580: GParted::PipeCapture::_OnReadable(_GIOChannel*, GIOCondition, void*) (PipeCapture.cc:56)
==2193==    by 0x38662492A5: g_main_context_dispatch (gmain.c:3066)
==2193==    by 0x3866249627: g_main_context_iterate.isra.24 (gmain.c:3713)
==2193==    by 0x3866249A39: g_main_loop_run (gmain.c:3907)
==2193==    by 0x3D7FD45C26: gtk_main (gtkmain.c:1257)
==2193==    by 0x469743: GParted::GParted_Core::set_devices(std::vector<GParted::Device, std::allocator<GParted::Device> >&) (GParted_Core.cc:155)
==2193==    by 0x4A78F1: GParted::Win_GParted::menu_gparted_refresh_devices() (Win_GParted.cc:1259)
==2193==    by 0x4A7886: GParted::Win_GParted::on_show() (Win_GParted.cc:1253)
==2193==    by 0x3D82B2009C: Gtk::Widget_Class::show_callback(_GtkWidget*) (widget.cc:3855)
==2193==    by 0x3867210297: g_closure_invoke (gclosure.c:777)
==2193==    by 0x3867221B86: signal_emit_unlocked_R (gsignal.c:3516)
==2193==    by 0x386722A0F1: g_signal_emit_valist (gsignal.c:3330)
==2193==  Address 0x13fef4c8 is not stack'd, malloc'd or (recently) free'd
==2193==

PipeCapture.cc (with debugging):
    46  gboolean PipeCapture::_OnReadable( GIOChannel *source,
    47                                     GIOCondition condition,
    48                                     gpointer data )
    49  {
    50          std::cout << "D: tid=" << (long int)syscall(SYS_gettid) << " data=" << data << " PipeCapture::_OnReadable()" << std::endl;
    51          PipeCapture *pc = static_cast<PipeCapture *>(data);
    52          gboolean rc = pc->OnReadable( Glib::IOCondition(condition) );
    53          if (!rc)
    54          {
    55                  std::cout << "D:  (!rc)  &(pc->sourceid)=" << &(pc->sourceid) << std::endl;
    56                  pc->sourceid = 0;
    57          }
    58          return rc;
    59  }

The use after free across threads only happens when an external program
is being executed from a thread other than the main() thread.  This is
because by default glib registered callbacks are run by the glib main
loop, which is only called from the main() thread with Gtk::Main::run().

Event sequence:
tid=2193                      tid=2202

main()
...
  GParted_Core::set_devices()
    Glib::Thread::create(... set_devices_thread ...)
    Gtk::Main::run()          GParted_Core::set_devices_thread()
                              ...
                                Utils::execute_command("dumpe2fs ... /dev/sda1" ...)
                                  Glib::spawn_async_with_pipes()
                                  PipeCapture outputcapture(out, output)
                                  outputcapture.connect_signal()
      //Glib main loop runs callback
      PipeCapture::_OnReadable()
        pc->OnReadable()
          //output read
          signal_update.emit()
          return true
      ...
      //Glib main loop runs callback
      PipeCapture::_OnReadable()
        pc->OnReadable()
          //eof reached
[1]       signal_eof.emit()
                                  return status.exit_status
[2]                               PipeCapture::~PipeCapture()
[3]       return false
[4]     pc->sourceid = 0

What is happening is that the PipeCapture destructor [2] is running in
the set_devices_thread() thread and freeing the object's memory as soon
as signal_eof.emit() [1] has been called.  Then signal_eof.emit()
returns back to OnReadable() which then returns false [3] back to the
_OnReadable() callback function which then assigns 0 to sourceid member
variable [4] in the already freed object, detected by valgrind as:
    Invalid write of size 4
       at ... GParted::PipeCapture::_OnReadable(...) (PipeCapture.cc:56)

This is happening because PipeCapture member variable sourceid is being
saved, in a different thread, just so the _OnReadable() callback can be
removed.  However a glib IOChannel callback, type GIOFunc(), returning
false will be automatically removed.

    GLib Reference Manual 2.26 / IO Channels
    https://developer.gnome.org/glib/2.26/glib-IO-Channels.html#GIOFunc

    GIOFunc()

    Returns : the function should return FALSE if the event source
              should be removed

Therefore fix by just not saving the event sourceid at all, and not
calling g_source_remove() to manually remove the callback, but instead
letting glib automatically remove the callback when it returns false.

Bug #731752 - Write after free cross thread race in
              PipeCapture::_OnReadable()
2014-07-06 10:22:40 -06:00
MarMav 079bbcb8da Updated Greek translation 2014-06-18 11:24:41 +00:00
Daniel Mustieles bfaa53e518 Updated Spanish translation 2014-06-12 18:03:22 +02:00
Curtis Gedak e339b38fdf Append -git to version for continuing development 2014-06-10 11:14:43 -06:00
Curtis Gedak 2e065810ce ========== gparted-0.19.0 ========== 2014-06-10 10:24:51 -06:00
Alexandre Franke 5cb1aebbbe Updated French translation 2014-06-09 08:16:21 +00:00
Andika Triwidada d81ed2791a Updated Indonesian translation 2014-06-04 04:03:29 +00:00
Muhammet Kara 0c0baced0c Updated Turkish translation 2014-06-03 21:27:55 +00:00
GunChleoc b4b390b12f Updated Scottish Gaelic translation 2014-05-19 08:59:35 +00:00
Phillip Susi 947cd02857 Change OperationDetail to not store complex objects in STL containers (#729139)
OperationDetail was storing its children in a std::vector.  This means they
can be moved around in memory arbitrarily, going through indeterminate
lifetimes.  This is generally a bad thing for any non trivial object and
in the case of OperationDetail, it created havoc with the way it maintains
pointers between parent/child objects for signal connections.  It will now
keep only pointers to children in a std::vector instead, so their lifetime
can be controlled, fixing various crashes.

Bug 729139 - Refactor OperationDetail to address random behavior
2014-05-18 10:07:45 -06:00
Phillip Susi 2e7b5d05a6 Prevent GSource double-destroy warning messages (#729800)
Returning false from the OnReadable callback causes the source to
be destroyed, but PipeCapture::~PipeCapture was destroying it a
second time.  Prevent this by zeroing out the sourceid.

Bug 729800 - Prevent GSource double-destroy warning messages
2014-05-18 09:53:31 -06:00
Seong-ho Cho f4e1c351f0 Updated Korean translation 2014-05-18 08:21:30 +09:00
Marek Černocký 3db7ec2449 Updated Czech translation 2014-05-14 10:32:42 +02:00
Piotr Drąg acbf08ce0c Updated Polish translation 2014-05-01 16:54:34 +02:00
Rafael Ferreira 41d5fa1aa8 Updated Brazilian Portuguese translation 2014-04-30 03:14:10 +00:00
Mike Fleetwood 960ce2df56 Make LVM members selectable together in delete non-empty PV dialog
Place the LVM2 member names in a single string, separated by new lines,
so that they can be selected all together by the user.  This was not
previously possible when each member name was placed in a separate
widget.
2014-04-28 08:42:40 +01:00
Curtis Gedak 72aa552469 Set top vertical alignment for multi-line field and value label pairs
A LVM volume group can contain more than one member and comprise a
multi-line entry.  As such set the "Members" field header and value
label pair to top vertical alignment.
2014-04-28 08:42:40 +01:00
Curtis Gedak 6efa623401 Add optional yalign argument to Utils::mk_label() method
As part of the work on bug 652044 - uses deprecated APIs, selectable
vertical alignment was defaulted to ALIGN_CENTER for all labels.  The
relevant commits can be viewed in comment 26 of said bug report.
https://bugzilla.gnome.org/show_bug.cgi?id=652044#c26

For multi-line labels a vertical ALIGN_CENTER value is not
consistently aesthetically pleasing.  This becomes obvious when a
single-line heading label is paired with a multi-line value label.
To improve the aesthetics, a vertical alignment of ALIGN_TOP is
preferred.

Hence re-add the ability to optionally specify a vertical alignment for
labels.  If a yalign value is not specified a default vertical alignment
of ALIGN_CENTER is used.
2014-04-28 08:42:40 +01:00
Curtis Gedak e075ab006e Remove unused text_color argument from Utils::mk_label() method
None of the current GParted code uses the text_color argument for
Utils::mk_label().  Remove unused argument to simplify code.
2014-04-28 08:42:40 +01:00
Curtis Gedak 09711ae22d Remove partition information vgname from status field (#690542)
With the volume group name displayed immediately below the status field,
the vgname is no longer needed in the status field.

Bug 690542 - Partition Information Dialog Warning not readable
2014-04-28 08:42:40 +01:00
Curtis Gedak c5f8220f60 Center the data below the partition information graphic (#690542)
When the partition information dialog is resized, the data below the
partition graphic would remain left aligned.  Improve the aesthetics by
horizontally centering the data in the window similar to the partition
graphic.

Bug 690542 - Partition Information Dialog Warning not readable
2014-04-28 08:42:40 +01:00
Curtis Gedak c0529abf36 Place partition information LVM2 member names in string list (#690542)
Placing the LVM2 member names in a string list enables the member names
to be selected all at once by a user.  This was not possible with
separate label widgets for each LVM2 member name.

Bug 690542 - Partition Information Dialog Warning not readable
2014-04-28 08:42:40 +01:00
Mike Fleetwood 960bb2c6cd Remove shadow border from partition information scrollable region (#690542)
Bug 690542 - Partition Information Dialog Warning not readable
2014-04-28 08:42:40 +01:00
Curtis Gedak ccaeb8dc51 Make the partition information dialog resizable (#690542)
Make the dialog resizable, add a vertical scrollbar to the information
and messages section, and set the initial height to ensure the dialog
fits entirely on an 800x600 screen.

A default height is required because some window managers, such as
fluxbox used in GParted Live, only permit resizing the height by using
the bottom corners of the dialog.  If the dialog is too large for the
screen then the user would not be able to resize it.

Note that two default initial heights are used in an effort to minimize
the amount of extra whitespace.

Bug 690542 - Partition Information Dialog Warning not readable
2014-04-28 08:42:40 +01:00
Curtis Gedak b271e367ea Place partition information percentages in their own column (#690542)
On some desktop environments, such as Unity on Ubuntu 13.04, the
partition information dialog can display the used/unused/unallocated
field values overlapping with the "(##%)" percentage value.  The problem
is pronounced for values with 4 digits to the left of the decimal (for
example a 1024 MiB partition ).  To address this problem, these
percentages are placed in their own column.

Bug 690542 - Partition Information Dialog Warning not readable
2014-04-28 08:42:40 +01:00
Curtis Gedak 898bc35198 Organize partition information into two field & value columns (#690542)
Organize the partition information field & value areas into two columns
to minimize the amount of vertical space required.

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
2014-04-28 08:42:40 +01:00
Curtis Gedak 92c771bc7c Add partition information section titles and indent fields (#690542)
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
2014-04-28 08:42:40 +01:00
Curtis Gedak 7fc8aa49fe Organize partition information fields into logical sections (#690542)
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
2014-04-28 08:42:40 +01:00
Mike Fleetwood 5f6656f267 Initialise file system objects only once
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.
2014-04-23 10:25:56 -06:00
Mike Fleetwood 131098a797 Remove set_proper_filesystem() method
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.
2014-04-23 10:25:27 -06:00
Mike Fleetwood 67115eeff2 Remove unused member variable GParted_Core::buf 2014-04-23 09:54:20 -06:00
Mike Fleetwood 438685577b Remove outdated comment about ped_partition_is_busy() for DMRaid devices
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)
2014-04-23 09:54:20 -06:00
Jan Simon 2c04654889 Updated German translation 2014-04-18 20:36:44 +02:00