1. 27 Apr, 2019 15 commits
  2. 22 Apr, 2019 4 commits
    • Mike Fleetwood's avatar
      Update includes in DialogFeatures.h and .cc · 2c19a620
      Mike Fleetwood authored
      Mostly add, but also remove, #includes so both DialogFeatures.h and .cc
      include exactly the header files each needs to get the definitions they
      use.
      
      Header file #include guards are there to specifically enable this.
      2c19a620
    • Mike Fleetwood's avatar
      Rename method to DialogFeatures::load_one_filesystem() · 57e8ac50
      Mike Fleetwood authored
      To better reflect that it is loading the supported actions for one file
      system into the treeview, just like it's parent load_filesystems() is
      initiating the loading for all the file systems.
      57e8ac50
    • Mike Fleetwood's avatar
      Fix available Partition menu options not being updated on rescan (!38) · 4939b941
      Mike Fleetwood authored
      Select a partition and look at the available actions in the Partition
      menu.  Then add or remove some commands which that particular file
      system uses and rescan to detect those changes.  Open the Partition menu
      again.  It doesn't reflect the changes of supported actions seen in the
      File System Support dialog.  Select a different partition and then
      select the original partition again.  Now the available actions in the
      Partition menu reflect the changes of supported actions.
      
      Have been testing by adding and removing /sbin/e2label to add and
      remove EXT2/3/4 file system labelling support just because that feature
      has existed for a very long time and EXT2/3/4 are displayed near the top
      of the File System Support dialog.  Tested this minor issue existed as
      far back as GParted 0.3.7.
      
      Fix by simply also refreshing the valid operations to update the
      Partition menu after updating the found file system specific commands.
      
      Closes !38 - Fixes for minor issues with File System Support rescanning
      4939b941
    • Mike Fleetwood's avatar
      Fix File System Support dialog not showing changes after rescan (!38) · 7ea91bca
      Mike Fleetwood authored
      Open the File System Support dialog, either add or remove some file
      system specific commands used by GParted and press the
      [Rescan For Supported Actions] button.  The supported actions don't
      change.  However after just closing and reopening the dialog, the
      supported actions do reflect the added or removed file system specific
      commands.
      
      Bisected to this commit:
          4d6d4646
          Display "other" in the File System Support dialog (!13)
      
      The problem is that commit made a subset copy of the
      GParted_Core::FILESYSTEMS vector, obtained from get_filesystems(), so
      when the rescan ran and the FILESYSTEMS vector was updated with new
      supported actions, the dialog still displayed the original subset copy,
      so didn't reflect the changed supported actions.
      
      Fix by passing a reference to the GParted_Core::FILESYSTEMS vector,
      obtained from get_filesystems(), and perform the necessary filtering
      inside the dialog, like before the above faulty commit.  Additionally
      finding and adding "other" file system to the end of the list.
      
      Closes !38 - Fixes for minor issues with File System Support rescanning
      7ea91bca
  3. 17 Apr, 2019 5 commits
    • Mike Fleetwood's avatar
      Stop checking for 'ntfslabel --new-serial' support · 1b172646
      Mike Fleetwood authored
      The oldest supported distributions have these versions of ntfs-3g /
      ntfsprogs.
      
        Distro             EOL        ntfs-3g / ntfsprogs
      - Debian 8           2020-Jun   2014.2.16AR.2
      - RHEL / CentOS 7    2024-Jun   2017.3.23
      - Ubuntu 14.04 LTS   2019-Apr   2013.1.13AR.1
      
      The oldest version of ntfs-3g / ntfsprogs on Ubuntu 14.04 LTS includes
      support for the --new-serial option.
      
          $ ntfslabel -V
      
          ntfslabel v2013.1.13AR.1 (libntfs-3g) - Display, or set, the label for an NTFS Volume.
      
          $ ntfslabel --help | grep -- --new-serial
                  --new-serial   Set a new serial number
      
      Therefore it is no longer necessary to check for this option as it is
      always available.  The worst case scenario is that some how an old
      version of ntfslabel is used which doesn't support this option.  In such
      a case GParted goes from not supporting changing the UUID to claiming
      support, but presumably it would fail with an error reporting unknown
      option when applied.  Arguably better from an end user support point of
      view.
      1b172646
    • Mike Fleetwood's avatar
    • Mike Fleetwood's avatar
      Switch to faster ntfsinfo to read NTFS usage (#47) · ef4d4cb1
      Mike Fleetwood authored
      A user reported GParted was slow to refresh and timing ntfsresize to
      query his file systems found that it was taking 4.7 seconds and 9.2
      seconds for sizes 31.7 GiB and 49 GiB NTFS file systems respectively.
      Almost 14 seconds just to read the usage.
      
      Created a 4 GiB NTFS and filled it with as many 4 KiB files as possible,
      just over 800,000 files.
      
          # df -k /mnt/2
          Filesystem     1K-blocks    Used Available Use% Mounted on
          /dev/sdb2        4194300 4193860       440 100% /mnt/2
          # df -i /mnt/2
          Filesystem     Inodes  IUsed IFree IUse% Mounted on
          /dev/sdb2      819640 808591 11049   99% /mnt/2
      
      Testing perform of ntfsresize:
      
          # time ntfsresize --info --force --no-progress-bar /dev/sdb2 | \
          > egrep 'Current volume size|resize at|Cluster size'
          Cluster size       : 4096 bytes
          Current volume size: 4294963712 bytes (4295 MB)
          You might resize at 4294516736 bytes (freeing 450560 bytes).
      
          real    0m5.231s
          user    0m2.072s
          sys     0m3.014s
      
      Computation of figures:
          Clusters per volume = 4294963712 / 4096 = 1048575.125
          Free clusters = (4294963712 - 4294516736) / 4096 = 109.125
      
      Testing performance of ntfscluster, as used before this commit [1] from
      GParted 0.3 in 2006:
      
          # time ntfscluster --force /dev/sdb2 | \
          > egrep 'bytes per cluster|bytes per volume|clusters per volume|clusters of free space'
          ...
          bytes per cluster       : 4096
          bytes per volume        : 4294963200
          clusters per volume     : 131071
          clusters of free space  : 110
      
          real    0m4.243s
          user    0m1.629s
          sys     0m2.587s
      
      Note that the clusters per volume figure reported by ntfscluster is
      wrong.  4294963200 / 4096 = 1048575, not 131071.
      
      Testing performance using ntfsinfo:
      
          # time ntfsinfo --mft /dev/sdb2 | \
          egrep 'Cluster Size|Volume Size in Clusters|Free Clusters'
                  Cluster Size: 4096
                  Volume Size in Clusters: 1048575
                  Free Clusters: 110 (0.0%)
      
          real    0m0.022s
          user    0m0.012s
          sys     0m0.018s
      
      Repeating the above tests while also using 'btrace /dev/sdb2' and Ctrl-C
      around each test via a separate terminal, reports these numbers of I/Os
      being performed:
        Command      Read requests   Read bytes
      - ntfsresize           2,695     1116 MiB
      - ntfscluster          2,685     1116 MiB
      - ntfsinfo                13     2208 KiB
      No wonder that ntfsresize and ntfscluster take a long time, they read
      just over 1 GiB of data from the 4 GiB file system, where as ntfsinfo
      only reads just over 2 MiB.
      
      Switch to using ntfsinfo to report file system usage.
      
      [1] 9d956594
          replaced ntfscluster with ntfsresize (see #350789)
      
      Closes #47 - GParted is slow refreshing NTFS file systems
      ef4d4cb1
    • Daniel Mustieles García's avatar
      Updated Spanish translation · 8a7d7fbc
      Daniel Mustieles García authored
      8a7d7fbc
    • Daniel Mustieles García's avatar
      Update Spanish translation · e2d8272f
      Daniel Mustieles García authored
      e2d8272f
  4. 15 Apr, 2019 5 commits
    • Mike Fleetwood's avatar
    • Mike Fleetwood's avatar
      Stop trying unneeded alternative libparted linux-swap names · ab1381b1
      Mike Fleetwood authored
      With that same commit in parted 1.9 [1], libparted only recognised these
      linux-swap names via deprecated aliases:
          linux-swap(old)
          linux-swap(new)
      but does accept this name as a current alias:
          linux-swap
      for:
          linux-swap(v1)
      
      Demonstration:
          # parted -v
          parted (GNU parted) 2.1
          ...
      
          # parted /dev/sdc mkfs yes 1 "linux-swap(new)" unit s print
          ...
          [0] filesys.c:148 (ped_file_system_type_get(): File system alias linux-swap(new) is deprecated
          ...
          Number  Start  End       Size      Type     File system     Flags
           1      2048s  2099199s  2097152s  primary  linux-swap(v1)
      
          # parted /dev/sdc mkfs yes 1 "linux-swap" unit s print
          ...
          Number  Start  End       Size      Type     File system     Flags
           1      2048s  2099199s  2097152s  primary  linux-swap(v1)
      
      Again as GParted now requires libparted 2.2 or later:
      1) Stop using alternative "linux-swap(new)" name as that is deprecated
         by libparted.
      2) Also stop using alternative "linux-swap(v1)" name as that code is
         never used because libparted recognised the GParted "linux-swap"
         name as a current alias.
      
      [1] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=cfafa4394998a11f871a0f8d172b13314f9062c2
          Rationalise linux-swap fs names, and add a "linux-swap" alias
      ab1381b1
    • Mike Fleetwood's avatar
      Stop recognising retired libparted linux-swap names · 40ec0deb
      Mike Fleetwood authored
      With this commit in parted 1.8.3 [1], libparted changed from reporting
      the name of Linux swap as:
          linux-swap
      to reporting either:
          linux-swap(old)
          linux-swap(new)
      Later with this commit in parted 1.9 [2], libparted stopped reporting
      those names and reported these instead:
          linux-swap(v0)
          linux-swap(v1)
      
      Demonstration:
          # mkswap /dev/sdc1
          Setting up swapspace version 1, size = 1048572 KiB
          no label, UUID=a2010834-003d-4bf2-9e94-58383fe20a26
          # blkid /dev/sdc1
          /dev/sdc1: UUID="a2010834-003d-4bf2-9e94-58383fe20a26" TYPE="swap"
          # parted -v
          parted (GNU parted) 2.1
          ...
          # parted /dev/sdc unit s print
          ...
          Number  Start  End       Size      Type     File system     Flags
           1      2048s  2099199s  2097152s  primary  linux-swap(v1)
      
      As GParted now requires libparted 2.2 or later [3], remove recognition
      for those no longer libparted reported linux-swap names.  Note that the
      "swap" name is reported by blkid.
      
      [1] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=98a53fd115ca012edf226525b8d4be628454f99e
          Enable support for swsusp partitions, and the ability to
          differentiate between old and new versions of linux-swap partitions.
          Changed the swap_init signature and removed extra ped_geometry_read
          from _swap*_open.
      
      [2] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=cfafa4394998a11f871a0f8d172b13314f9062c2
          Rationalise linux-swap fs names, and add a "linux-swap" alias
      
      [3] 8df975c7
          Increase minimum required libparted to 2.2 (!22)
      40ec0deb
    • Mike Fleetwood's avatar
      Set partition type when formatting to cleared (!36) · 4d9dc14b
      Mike Fleetwood authored
      Formatting a partition to cleared over the top of LVM2 PV leaves the
      "lvm" flag set on the partition; where as formatting with an actual file
      system over the top of an LVM2 PV clears the "lvm" flag.  This is true
      for both MSDOS and GPT partitioned drives.
      
      Fix by setting the partition type when formatting to cleared too.
      
      Closes !36 - Set partition type when clearing partition contents
      4d9dc14b
    • Stas Solovey's avatar
      Update Russian translation · 5d2dc721
      Stas Solovey authored
      5d2dc721
  5. 14 Apr, 2019 1 commit
  6. 11 Apr, 2019 7 commits
  7. 06 Apr, 2019 1 commit
    • Luca Bacci's avatar
      Ensure icon sizes (#39) · f252e677
      Luca Bacci authored
      Some icon themes only provide large icons for stock items.  This can
      cause problems like overly large icons appearing in the GParted UI.
      Found on Kubuntu 16.04 LTS with default breeze icon theme.
      
      Be compatible with these icon themes by forcing scaling of stock icons
      to the requested size.
      
      Icons are used either by Gtk::Image widgets, or Gtk::CellRendererPixbuf
      objects for comboboxes/treeviews.  For Gtk::Image widgets we add
      Utils::mk_image() that constructs Gtk::Image widgets and then sets the
      pixel-size property.  For Gtk::CellRendererPixbuf we add
      Utils::mk_pixbuf() that first loads a Gdk::Pixbuf and then scales if
      needed.
      
      Closes #39 - After GTK3 port icons are too big on KDE
      f252e677
  8. 03 Apr, 2019 2 commits
    • Mike Fleetwood's avatar
      Update distro specific package installation instructions · 23f956bb
      Mike Fleetwood authored
      - Back in Fedora 22 the distribution switched from using yum to dnf for
        package installation, while CentOS / RHEL continues to use yum.
        Separate out package instructions.
      
      - Update package dependencies for what is required on current versions
        of the documented distributions.
      23f956bb
    • Mike Fleetwood's avatar
      Also write "Root privileges are required ..." message to stderr (!34) · 56596d68
      Mike Fleetwood authored
      To further help in diagnosing root authorisation issues by reporting the
      error message to the terminal too.  Also set a failure exit status when
      terminating with this error.
      
      Example:
          $ ./gpartedbin
          GParted 0.33.0-git
          configuration --enable-online-resize
          libparted 3.2
          Root privileges are required for running GParted
          $ echo $?
          1
      
      Closes !34 - Display more version and configuration information
      56596d68