1. 26 Mar, 2019 6 commits
    • Mike Fleetwood's avatar
      Recognise contribution by Antoine Viallon · 415f5020
      Mike Fleetwood authored
    • Mike Fleetwood's avatar
      Raise the maximum F2FS label size to 127 characters (!29) · c9f47403
      Mike Fleetwood authored
      Fix to make mkfs.f2fs properly handle labels longer than 16 characters
      was included in f2fs-tools 1.2.0 [1].  The oldest supported
      distributions now include this release:
        Distro             EOL        f2fs-tools
      - Debian 8           2020-Jun   1.4.0
      - RHEL / CentOS 7    2024-Jun   1.4.1
      - SLES 12            2027-Oct   Unknown
      - Ubuntu 14.04 LTS   2019-Apr   1.2.0
      Note that on Ubuntu 14.04 LTS blkid from util-linux 2.20.1 is too old to
      recognise F2FS file systems, as 2.23 is required for F2FS support [2].
      mkfs.f2fs claims the maximum label length is less than 512 characters,
      but actually accepts 512 characters.
          # label=`head -c 1024 < /dev/zero | tr '\0' 'A'`
          # mkfs.f2fs -l `echo -n "$label" | cut -c1-513` /dev/sdb10
                  F2FS-tools: mkfs.f2fs Ver: 1.4.0 (2014-09-18)
          Error: Volume Label should be less than      512 characters
          Usage: mkfs.f2fs [options] device [sectors]
            -a heap-based allocation [default:1]
            -d debug level [default:0]
            -e [extension list] e.g. "mp3,gif,mov"
            -l label
            -o overprovision ratio [default:5]
            -s # of segments per section [default:1]
            -z # of sections per zone [default:1]
            -t 0: nodiscard, 1: discard [default:1]
          sectors: number of sectors. [default: determined by device size]
          # echo $?
          # mkfs.f2fs -l `echo -n "$label" | cut -c1-512` /dev/sdb10
                  F2FS-tools: mkfs.f2fs Ver: 1.4.0 (2014-09-18)
          Info: Label = AAAAAAAAAAAA...[trimmed from 512 "A"s]...AAAAAAAAAAAA
          Info: sector size = 512
          Info: total sectors = 1048576 (in 512bytes)
          Info: zone aligned segment0 blkaddr: 256
          Info: Discarding device
          Info: This device doesn't support TRIM
          Info: format successful
          # echo $?
          # blkid -V
          blkid from util-linux 2.25.2  (libblkid 2.25.0, 24-Oct-2014)
          # blkid /dev/sdb
          /dev/sdb10: LABEL="AAAAAAAAAAAA...[only 127 "A"s]...AAAAAAAAAAAA"
          UUID="f47f3fdc-dd91-4616-bb6d-0d643a884265" TYPE="f2fs"
      As blkid only reports the first 127 characters and is the only command
      used for reading the label of an F2FS file system, use this as the new
      increased limit.
      [1] https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=9799d6364dc93e1fd259d812d4a50ed984a6456b
          mkfs: handle labels longer than 16 characters
      [2] https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes
          "add Flash-Friendly File System (f2fs) support  [Alejandro Martinez
      Closes !29 - Enhance F2FS support
    • Mike Fleetwood's avatar
      Drop fsck.f2fs -y option not available before f2fs-tools 1.10.0 (!29) · afbf56c1
      Mike Fleetwood authored
      On CentOS 7 with f2fs-tools 1.4.1, checking an F2FS file system fails
      like this:
          # fsck.f2fs -f -y -a /dev/sdb3
          Info: Force to fix corruption
          fsck.f2fs: invalid option -- 'y'
                  Error: Unknown option ?
          Usage: fsck.f2fs [options] device
            -a check/fix potential corruption, reported by f2fs
            -d debug level default:0]
            -f check/fix entire partition
            -t show directory tree [-d -1]
          # echo $?
      Turns out that the '-y' option was not available until f2fs-tools 1.10.0
      and is identical to the existing '-f' option anyway [1], which GParted
      already uses.  Just remove the '-y' option passed to fsck.f2fs.
      [1] https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=55ee9e7202f84168f868d863da8ed1c4995a0e6d
          fsck.f2fs: add -y for generic fsck
      Closes !29 - Enhance F2FS support
    • Mike Fleetwood's avatar
      Handle missing FS size information before f2fs-tools 1.5.0 (!29) · 66a20ae9
      Mike Fleetwood authored
      Before this commit [1] first included in f2fs-tools 1.5.0, dump.f2fs
      didn't report the total space used by the file system.  This causes F2FS
      file system usage not be reported on older distributions, including
      RHEL/CentOS 7 and Debian 8.
      On CentOS 7:
          # rpm -q f2fs-tools
          # dump.f2fs -d 1 /dev/sdb3 | egrep 'sector size =|total.*sectors ='
          Info: sector size = 512
          Info: total sectors = 2097152 (in 512 bytes)
      On Fedora 28:
          # rpm -q f2fs-tools
          # dump.f2fs -d 1 /dev/sdb2 | egrep -a 'sector size =|total.*sectors ='
          Info: sector size = 512
          Info: total sectors = 3145728 (1536 MB)
          Info: total FS sectors = 2621440 (1280 MB)
      "total sectors" reports the size of the partition.
      "total FS sectors" reports the size of the file system.
      Cope with the file system size being missing.  Pass -1 as the file
      system size to partition.set_sector_usage() in this case.  Note that
      this means GParted won't be able to detect and report unallocated space
      within the partition when using f2fs-tools < 1.5.0.
      [1] https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=fea6162a6db9af527648262d9fbb0335a0cc5460
          fsck.f2fs: show total sectors consumed by filesystem
      Closes !29 - Enhance F2FS support
    • Mike Fleetwood's avatar
      Make F2FS usage parsing handle NULs in dump.f2fs output (!29) · c74ad520
      Mike Fleetwood authored
      On Fedora 28 with f2fs-tools 1.10.0, dump.f2fs is producing NUL
      characters in it's output and this completely breaks the parsing code in
      f2fs::set_used_sectors().  Glib::Regex, as used by
      Utils::regexp_label(), just doesn't match any text after the first NUL
      character from the output.
          # dump.f2fs -d 1 /dev/sdb1
          Info: Debug level = 1
          Info: [/dev/sdb1] Disk Model: VBOX HARDDISK   1.0 ^@^@^@^@^@^@^@^...
          Info: Segments per section = 1
          Info: Sections per zone = 1
          Info: sector size = 512
          Info: total sectors = 2097152 (1024 MB)
      Grep thinks the output is binary too:
          # dump.f2fs -d 1 /dev/sdb1 | \
          > egrep 'valid_block_count|user_block_count|log_blocksize|sector size =|total FS sectors ='
          Binary file (standard input) matches
          # dump.f2fs -d 1 /dev/sdb1 | \
          > egrep --text 'valid_block_count|user_block_count|log_blocksize|sector size =|total FS sectors ='
          Info: sector size = 512
          log_blocksize                           [0x       c : 12]
          Info: total FS sectors = 2097152 (1024 MB)
          user_block_count                        [0x   36400 : 222208]
          valid_block_count                       [0x       2 : 2]
      Re-write set_used_sectors() using string find() and sscanf() to be
      similar to how a number of the other set_used_sectors() are written for
      other file systems.
      Closes !29 - Enhance F2FS support
    • Antoine Viallon's avatar
      Enhance F2FS support (!29) · e5505097
      Antoine Viallon authored
      - Adds reading of file system usage
      - Adds resize (grow) support
      - Adds verify support
      Closes !29 - Enhance F2FS support
  2. 23 Mar, 2019 2 commits
  3. 15 Mar, 2019 6 commits
  4. 14 Mar, 2019 1 commit
  5. 03 Mar, 2019 1 commit
  6. 01 Mar, 2019 11 commits
    • Mike Fleetwood's avatar
      Initialise local POD 'launched' variable in show_help() · 8effaf4f
      Mike Fleetwood authored
      'launched' local POD (Plain Old Data) variable was left uninitialised,
      but was set in both the try and catch clauses.  Best practice is to
      initialise when defined, so do that instead.  Cosmetic change.
    • Mike Fleetwood's avatar
      Rename Win_GParted method to show_help() · f5e870d6
      Mike Fleetwood authored
      It is not creating a dialog (a pop-up window managed by GParted code
      itself).  It is launching independent yelp program to display the help,
      so remove the "_dialog" from the name to avoid any possible confusion.
    • Mike Fleetwood's avatar
      Restore specific error message on failure to launch yelp · e3ae8a6f
      Mike Fleetwood authored
      Originally, if the yelp command was not installed, attempting to display
      help produced an error dialog with this message:
          Failed to execute child process "yelp" (No such file or directory)
      However since this commit during the Gtk 3 port [1] the error message
      became this less useful one:
          Operation not supported
      Two attempts are made to display the GParted Manual, first using
      gtk_show_uri() and second by executing the yelp command directly.  Prior
      to the aforementioned commit [1] both methods returned the failure
      reason using the same 'error' variable.  Hence reported the message
      "Failed to execute child process "yelp" ..." from the second attempt.
      However that commit had to re-code the second method as part of the Gtk
      3 port and use a different error returning mechanism, thus the use of
      different variable 'e'.  But the dialog was left reporting the message
      from the original 'error' variable, thus reporting "Operation not
      supported" message from the first attempt using gtk_show_uri().
      Fix by again displaying the message from the second failure into the
      error dialog.  Also make it very clear there are two error returning
      variables by naming them 'error1' and 'error2_msg'.
      [1] 2953778a
          port-to-gtk3: Use Gdk::AppLaunchContext to launch yelp (#7)
    • Mike Fleetwood's avatar
      Remove deprecated PKG_NAME from autogen.sh · 3ce3683d
      Mike Fleetwood authored
      Use of PKG_NAME is deprecated in GNOME 3 and produced this warning:
          $ ./autogen.sh
          ***Warning*** PKG_NAME is deprecated, you may remove it from autogen.sh
      Now that GParted is a GNOME 3 application with GNOME 3 yelp-tools
      managed documentation this is redundant and can be removed.  Previous
      further analysis:
          GNOME Bugzilla, Bug 743318, comment 18
          PKG_NAME is still used in GNOME 2.28's gnome-autogen.sh in error
          messages.  (GNOME 3's gnome-autogen.sh queries it from configure.ac
          instead of requiring it to be set).
      Also confirmed that it makes no difference by running ./autogen.sh with
      and without PKG_NAME being set.  The produced GParted build trees were
      the same.  Therefore the release and executable can't be affected.
    • Mike Fleetwood's avatar
      Drop now unnecessary editing of xmllint command line in CI tests (!24) · 83777932
      Mike Fleetwood authored
      GNOME 3's yelp doesn't use scrollkeeper or the OMF catalog, so the
      constructed Makefile doesn't use xmllint to validate the scrollkeeper
      DTD file.  Therefore remove attempted sed edit of that line which no
      longer exists in the Makefile.
      Note that help/Makefile.am's @YELP_HELP_RULES@ automake macro expansion
      comes from /usr/share/aclocal/yelp.m4 [1].
      Commit which previously needed to add the sed edit:
          Stop xmllint scrollkeeper-omf.dtd fetch failure breaking CI tests (#9)
      [1] Yelp > Yelp Tools > yelp.m4
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
    • Mike Fleetwood's avatar
      Launch help from GParted using the new GNOME 3 help: prefix (!24) · 5aca85e4
      Mike Fleetwood authored
      Update GParted to specify the GParted Manual using the new GNOME 3 way
      with the 'help:' prefix to avoid yelp reporting this error:
          Document Not Found
          The URI 'ghelp:gparted' does not point to a valid page.
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
    • Mike Fleetwood's avatar
      Allow GNOME 3 yelp to display the GParted Manual (!24) · 4ef3ef33
      Mike Fleetwood authored
      Now with GNOME 3 style help installed, running 'yelp help:gparted'
      results in this error being displayed in yelp:
          Page Not Found
          The requested page was not found in the document 'help:gparted'.
      Where as running 'yelp help:gparted/gparted' correctly displays the
      GParted Manual.
      Fix by renaming the article tag to the default 'index' that yelp is
      expecting when using the new GNOME 3 'help:' prefix.
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
    • Mike Fleetwood's avatar
      Add use of new GNOME 3 yelp-tools documentation infrastructure (!24) · a725921a
      Mike Fleetwood authored
      Second part is to use yelp-tools to build and install the documentation.
      Have to rename the help Manual from help/C/gparted.xml to
      help/C/index.docbook in accordance with this note from the GNOME Goal:
      Port to New Documentation Infrastructure [1]:
          IMPORTANT: If this is for a DocBook document, the top-level DocBook
          file MUST be renamed to index.docbook.  Do a "git mv" and include
          index.docbook in HELP_FILES.
      Commits from gucharmap [4] and totem [5], projects which have DocBook
      documentation, making this same change are also useful references.
      [1] GNOME Goal: Port To New Documentation Infrastructure
      [2] Yelp > Yelp Tools > yelp.m4
      [3] GNOME application developement overview / User help / Set up your
          build system
      [4] gucharmap commit "Port to new documentation infrastructure"
      [5] totem commit "Use new documentation infrastructure"
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
    • Mike Fleetwood's avatar
      Remove use of GNOME 2 gnome-doc-utils documentation infrastructure (!24) · e62b352e
      Mike Fleetwood authored
      Details of old GNOME 2 gnome-doc-utils:
          Migrating your documentation to gnome-doc-utils
      First part is to stop using gnome-doc-utils to build and install the
      documentation.  Also since updating the OMF catalog was only needed for
      GNOME 2 yelp, use of scrollkeeper is completely removed too.
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
    • Jeremy Bicha's avatar
      Fix FDL help link for gnome-desktop 3.5+ (!24) · 12adade3
      Jeremy Bicha authored
      I generated this by running:
          find ./ -type f -exec sed -i 's/ghelp:fdl/help:fdl/g' {} \;
      By updating the translations at the same time, it should be easier on
      the translators as there's no reason to invalidate these strings.
      [Mike Fleetwood: Explain the underlying cause and distro versions.]
      This gnome-desktop commit, first included in version 3.5.5, switched the
      package from using gnome-doc-utils to yelp-tools so changed the
      installed location of the GNU FDL license file from
      /usr/share/gnome/help/fdl/C/fdl.xml to
      /usr/share/help/C/fdl/index.docbook, thus changing the yelp URI from
      'ghelp:fdl' to 'help:fdl':
          Port to new documentation infrastructure
      The oldest supported distributions with Gtk/GNOME 3 all have at least
      3.10, therefore use this fix unconditionally.
          Distribution        EOL         Gtk/GNOME 3
          RHEL / CentOS 7     2024-Jun    3.22
          Ubuntu 14.04 LTS    2019-Apr    3.10
          Ubuntu 16.04 LTS    2021-Apr    3.18
          Debian 8            2023-Apr    3.14
          SLES 12             2027-Oct    3.10
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
    • Mike Fleetwood's avatar
      Remove redundant file help/C/Makefile.am (!24) · 8412dcfe
      Mike Fleetwood authored
      The file has been redundant since it was first added [1].  It was never
      listed in configure.ac (or configure.in) in AC_CONFIG_FILES.  Therefore
      autoconf has never produced help/C/Makefile.in and ./configure has never
      produced help/C/Makefile.  Therefore it isn't used during the build and
      install of GParted.  Remove it.
      [1] 46ca7c74
          Added code hooks to prepare for GParted Manual
      Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
  7. 28 Feb, 2019 1 commit
  8. 26 Feb, 2019 1 commit
  9. 20 Feb, 2019 3 commits
    • Mike Fleetwood's avatar
      Remove left behind configuration summary lines (!22) · 4fcd1829
      Mike Fleetwood authored
      These lines in the final configuration report from ./configure were left
      behind [1] when determination of the underlying definitions were remove.
      So they no longer report 'yes' or 'no' like the other lines in the file
      configuration report.
             Need partition table re-read workaround?  :
           Supports large sector sizes (> 512 bytes)?  :
      Remove them now.
      [1] 8df975c7
          Increase minimum required libparted to 2.2 (!22)
      Closes !22 - Increase minimums to libparted 2.2 and glibmm 2.32
    • Mike Fleetwood's avatar
      Remove left behind commented #includes from fat16.cc · d0281a32
      Mike Fleetwood authored
      According to the GIT history the lines were added by this commit:
          gparted-0.3.6 - code recreation from Source Forge
      Looking at the SVN history this commit actually fleshed out the
      implementations of fat16::get_label() and fat32::get_label() and added
      the commented #includes:
          Added read label support for fat16 and fat32 using mtools mlabel command
      Then this SVN commit moved the mtools temporary file handling code into
      Utils.cc, leaving behind the commented #includes:
          Added MTools temporary file handling functions
      Finally this commit removed fat32.cc by merging the code with fat16.cc:
          Combine duplicate code for fat16/32
      So remove the left behind commented #includes from fat16.cc.
    • Mike Fleetwood's avatar
      Enable online resizing of extended partitions (!23) · 24d9599f
      Mike Fleetwood authored
      A forum user had a case where they wanted to grow their in use root,
      ext4 file system.  GParted supports this, but the partition was a
      logical partition inside an extended partition and GParted doesn't
      support resizing an extended partition while any contained logical
      partitions are busy.
      Example layout:
          Partition              File System   Mount Point
          /dev/sdb1              ntfs
          /dev/sdb2     [busy]
              /dev/sdb5 [busy]   ext4          /
          unallocated            unallocated
      So just allow extended partitions to be resized online when online
      partition resizing is available via libparted.
      The block device that the Linux kernel provides for an extended
      partition just maps to the first 1 KiB of the extended partition where
      the Extended Boot Record is stored, and does not include any of the
      contained logical partitions.  Therefore no application can care that
      the extended partition is resized while a logical partition is in use
      because it can't use the extended partition block device to access any
      The on disk layout looks like this:
          # fdisk -l /dev/sdb
          Disk /dev/sdb: 8589 MB, 8589934592 bytes, 16777216 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk label type: dos
          Disk identifier: 0x0007650e
             Device Boot      Start         End      Blocks   Id  System
          /dev/sdb1            2048     1050623      524288    7  HPFS/NTFS/exFAT
          /dev/sdb2         1050624     2101247      525312    5  Extended
          /dev/sdb5         1052672     2101247      524288   83  Linux
          # parted /dev/sdb unit s print free
          Model: ATA VBOX HARDDISK (scsi)
          Disk /dev/sdb: 16777216s
          Sector size (logical/physical): 512B/512B
          Partition Table: msdos
          Disk Flags:
          Number  Start     End        Size       Type      File system  Flags
                  63s       2047s      1985s                Free Space
           1      2048s     1050623s   1048576s   primary   ntfs
           2      1050624s  2101247s   1050624s   extended
           5      1052672s  2101247s   1048576s   logical   ext4
                  2101248s  16777215s  14675968s            Free Space
      The kernel's partition sizes from /sys/block/sdb/sdb${N}/{start,size}
      shows extended partition 2 has a size of only 2 sectors:
          # for N in 1 2 5
          > do
          > echo -e "/dev/sdb${N}\tstart=`cat /sys/block/sdb/sdb${N}/start`\tsize=`cat /sys/block/sdb/sdb${N}/size`"
          > done
          /dev/sdb1       start=2048      size=1048576
          /dev/sdb2       start=1050624   size=2
          /dev/sdb5       start=1052672   size=1048576
      The EBR read from the whole of extended partition 2 block device:
          # hexdump -C /dev/sdb2
          00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
          000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 86  |................|
          000001c0  06 41 83 cb 09 82 00 08  00 00 00 00 10 00 00 00  |.A..............|
          000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
          000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
          00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
      Closes !23 - Enable online resizing of extended partitions
  10. 11 Feb, 2019 8 commits
    • Mike Fleetwood's avatar
      Recognise contribution by Luca Bacci · 1ed30495
      Mike Fleetwood authored
    • Luca Bacci's avatar
      Prevent the legend text making the features dialog too wide (#7) · c091c9f4
      Luca Bacci authored
      With the Gtk3 port the File System Support dialog has become too wide
      because the legend text is no longer wrapped.  Set the max-width-chars
      property to specify the natural size of the widget in terms of
      characters [1].  It is converted to pixels using the average character
      width in the current font.
      Also use PACK_EXPAND_WIDGET when adding the label to the box so that if
      the dialog is resized extra space is used to increase the size of this
      child widget [2].
      [1] GNOME HowDoI / Labels
      [2] Gtkmm 3.0 Enums and Flags, enum Gtk::PackOptions
          "PACK_EXPAND_WIDGET  Space is expanded, with extra space filled by
          increasing the child widget size."
      Closes #7 - Port to Gtk3
    • Luca Bacci's avatar
      Enable display of progress bar text when applying operations (#7) · bf39c221
      Luca Bacci authored
      In Gtk2 progress bars show optional text superimposed over the bar.  In
      Gtk3 the text is not displayed by default, so set the show-text property
      to re-enable this [1].
      Also note that since Gtk 3.14.0 the optional text is not superimposed
      over the progress bar, but instead displayed just above it [2][3][4].
      [1] Gtkmm 3.0 Gtk::ProgressBar Class Reference, set_show_text()
          "Sets whether the progressbar will show text superimposed over the
      [2] Commit - Update the design for progress bars
      [3] Bug 748784 - GtkProgressBar text cannot be superimposed on the
          progress bar
      [4] Gtkmm 3.18 Gtk:ProgressBar Class Reference, set_show_text()
          "Set whether the progress bar will show text next to the bar."
      Closes #7 - Port to Gtk3
    • Luca Bacci's avatar
      Ensure SpinButtons have space to display 7 digits (#7) · d626a636
      Luca Bacci authored
      In Gtk2 the up and down buttons in a SpinButton were smaller leaving
      space for 7 digits before scrolling the entry.  In Gtk3 the up and down
      buttons are much larger leaving only space for 4 digits.  This occurs in
      the SpinButtons in the Dialog_Base_Partition class as displayed in the
      New Partition, Paste and Resize/Move dialogs.
      Set width-chars property of all Gtk::SpinButtons to ensure 7 digits can
      be displayed before scrolling the entry.
      Closes #7 - Port to Gtk3
    • Luca Bacci's avatar
      Change Gtk::ProgressBar appearance by providing custom CSS (#7) · 6aba93d8
      Luca Bacci authored
      In Gtk3 the progress bar height is fixed and defined by the CSS theme in
      use.  Changing the widget allocation size does nothing, it is always
      rendered the same way.
      In many themes, including Adwaita, the progressbar is very, very thin.
      Provide custom CSS to specify a height of 8 pixels.
      The CSS source string has to be differentiated for Gtk pre and post
      3.20, because Gtk 3.20 introduced some breaking changes in the way CSS
      is handled.
      [1] Migrating from GTK+ 2.x to GTK+ 3 - Parsing of custom resources
      [2] Gtk3 Reference Documentation - Changes in GTK+ 3.20
      [3] Gnome/HowDoI - Custom Style
      Closes #7 - Port to Gtk3
    • Luca Bacci's avatar
      Change packing of pulsebar in statusbar (#7) · 6c47561b
      Luca Bacci authored
      The pulsebar looks very small and needs to be widened.  The pulsebar is
      packed inside the statusbar so that it displays activity text on the
      left side and the pulsebar on the right side.  Ideally we want the space
      to be evenly divided for the textual messages and for the pulsebar
      activity indicator.
      For this we just have to set the 'homogeneous' property to TRUE for the
      statusbar (note that GtkStatusBar inherits from GtkBox).
      Also vertically align the pulsebar to the center of the statusbar.  This
      is achieved setting the 'valign' property to Gtk::ALIGN_CENTER for the
      pulsebar widget.
      Closes #7 - Port to Gtk3
    • Luca Bacci's avatar
      Work around Gtk3 Gtk-CRITICAL messages when closing some dialogs (#7) · 892f5542
      Luca Bacci authored
      There is a bug affecting Gtk+ 3.22.8 to 3.22.30 in which destroying a
      GtkComboBox when it is not hidden results in this message:
          Gtk-CRITICAL **: gtk_widget_is_drawable: assertion 'GTK_IS_WIDGET (widget)' failed
      This happens in GParted when some dialogs are closed, for example the
      Create New Partition and Create Partition Table dialogs.  To work around
      the issue we call Gtk::Dialog::hide() in the destructors of our dialog
      The issue was fixed in Gtk 3.24.0.
       * Gtk 3.22.8 was released in February 2017.
       * Gtk 3.24.0 was released in September 2018.
      [1] Gtk Issue - GtkComboBox::private::popup_window can be NULL
      [2] Gtk commit - combobox: popdown() the menu during unmap()
      [3] Gtk commit - Check for NULL priv->popup_window in
      Closes #7 - Port to Gtk3
    • Luca Bacci's avatar
      Work around Gtkmm3 issue where menu accelerators are not shown (#7) · 392bbba5
      Luca Bacci authored
      There is a bug in Gtkmm3 when setting accelerator keys on a
      Gtk::MenuItem, the accelerator keys work but are not displayed when the
      menu is drawn.  This happens for Gtk::MenuItems, including derived
      objects, that are constructed with a non-default constructor.
      All non-default constructors of Gtk::MenuItem, and subclasses, work by
      creating themselves a Gtk::AccelLabel and packing it inside the menu
      item.  But in Gtk3 GtkMenuItem are created with a GtkAccelLabel already
      packed in as a child and that accel label should be used instead.
      To workaround the issue we only use the default constructor for
      Gtk::MenuItem and subclasses.  This is easy to do because we only have
      to change the wrappers in MenuHelpers.cc.
      This bug affects Gtkmm version 3.0.0 to 3.22.2 and was fixed in
      Gtkmm 3.22.3.
       * Gtkmm 3.0.0 was released in April 2011
       * Gtkmm 3.22.3 was released in November 2018
      [1] Bug Report on the Gtkmm mailing list
      [2] Commit - Gtk::MenuItem: Fix add_accel_label()
      Closes #7 - Port to Gtk3