Commit Graph

125 Commits

Author SHA1 Message Date
Curtis Gedak b63bcd17b5 Append -git to version for continuing development 2024-02-26 09:34:30 -07:00
Curtis Gedak ce61e1ee5a ========== gparted-1.6.0 ========== 2024-02-26 09:18:39 -07:00
Mike Fleetwood 6bf7668f8e Increase minimum required gtkmm to 3.18.0 (!117)
As discussed in the previous commit the oldest supported distributions
now provide gtkmm versions higher that 3.18.0 (which requires C++11
compilation).  Therefore increase the minimum required version to gtkmm
3.18.0.  This allows removal of HAVE_LABEL_SET_XALIGN autoconf
definition and associated fallback code.

Closes !117 - Require C++11 compilation
2023-09-23 15:30:15 +00:00
Mike Fleetwood 9f473b70cb Always require C++11 compilation (!117)
All the oldest supported distributions now have versions of GTK C++
libraries which require C++11 compilation, therefore forcing GParted to
require C++11 compilation [1][2][3].  Fragment of existing ./configure
output which lists the library versions requiring C++11 compilation:

    $ ./configure
    ...
    checking for glibmm >= 2.45.40 which requires C++11 compilation... yes
    checking for libsigc++ >= 2.5.1 which requires C++11 compilation... yes
    checking for gtkmm >= 3.18.0 which requires C++11 compilation... yes
    checking whether g++ supports C++11 features with -std=gnu++11... yes

The oldest supported distributions and their versions of GTK C++
libraries and GCC compiler:

    Distribution        gtkmm    glibmm   libsigc++   gcc

    Debian 10           3.24.0   2.58.0   2.10.1      4.8.3
    RHEL / CentOS 7.9   3.22.2   2.56.0   2.10.0      4.8.5
    SLES 12 SP5         3.20.1   2.48.1   2.8.0       4.8
    Ubuntu 20.04 LTS    3.24.2   2.64.2   2.10.2      9.3.0

Technically GCC didn't have full C++11 support until GCC 4.8.1 [6] and
SLES 12 SP5 only has GCC 4.8 (as well as many later versions of GCC).
However which ever version of the GCC compiler is being used to compile
the GTK C++ libraries it must have all the features needed to compile
those libraries.

Simplify the configure script and just always require a C++11 capable
compiler.  This also allows the use of C++11 features in the GParted
code.

[1] commit cc0740148e
    port-to-gtk3: Switch to Gtkmm3 (#7)
[2] commit 707bae6fed
    Enable C++11 compilation when using libsigc++ 2.5.1 and later (#758545)
[3] commit d6d7cb2bbf
    Enable C++11 compilation when using glibmm 2.45.40 and later (#756035)
[4] SUSE Product Support Lifecycle, SUSE Linux Enterprise Server 12
    https://www.suse.com/lifecycle/#suse-linux-enterprise-server-12
[5] SUSE package search
    https://scc.suse.com/packages?name=SUSE%20Linux%20Enterprise%20Server&version=12.5&arch=x86_64&query=&module=
[6] C++ Standards Support in GCC, C++11 Support in GCC
    https://gcc.gnu.org/projects/cxx-status.html#cxx11

Closes !117 - Require C++11 compilation
2023-09-23 15:30:15 +00:00
Curtis Gedak 32b0d32474 Append -git to version for continuing development 2023-02-21 10:40:48 -07:00
Curtis Gedak 489b428dfe ========== gparted-1.5.0 ========== 2023-02-21 10:14:32 -07:00
Mike Fleetwood a141c048af Revert workaround for .intltool-merge-cache.lock file being left behind (!107)
Now that intltool is no longer used, the workaround for it leaving file
.intltool-merge-cache.lock behind is no longer needed.  Therefore revert
merge !103 "Fix make distcheck failure found in GitLab CI job
unbuntu_test".  This commit reverts both of these earlier commits in one
go:

    053691378c
    Resolve messages from configure in VPATH build (!103)

    0bd636a34b
    Fix up intltool leaving .intltool-merge-cache.lock file behind (!103)

Closes !107 - Migrate from intltool to gettext translation
2022-11-12 16:44:55 +00:00
Mike Fleetwood ddd32e838c Migrate build from intltool to gettext translation (!107)
[0] GNOME Goal: Gettext Migration
    https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration

This goal from 2016 is to migrate away from using intltool to help
translate especially GNOME application related files, and instead use
gettext directly now that gettext can handle a lot more file formats
[1][2][3].

The GNOME Goal: Gettext Migration [0] says:
    "With gettext 0.19.8, there is really no need anymore to use
    intltool or GLib's dated gettext glue (AM_GLIB_GNU_GETTEXT and
    glib-gettextize)."

This version or later of gettext is available in the oldest supported
distributions except for SLES 12:
    Distribution       EOL        gettext -V
    Debian 10          2022-Aug   0.19.8.1
    RHEL / CentOS 7    2024-Jun   0.19.8.1
    Ubuntu 18.04 LTS   2023-Apr   0.19.8.1
    SLES 12 SP5        2024-Oct   0.19.2 [4][5]
As SLES 12 SP5 doesn't contain GParted and SLES 15 contains GParted
0.31.0 [6] loosing the ability to compile future GParted 1.5 release on
SLES 12 SP5 is acceptable.

Additionally the use of intltool and the associated GLib provided macro
AM_GLIB_GNU_GETTEXT was the source of the remaining warnings from
autoconf 2.71 seen in Fedora 36 and Ubuntu 22.04 LTS about the use of
obsolete macros:
    $ ./autogen.sh
    ...
    autoreconf: running: /usr/bin/autoconf --force
    configure.ac:59: warning: The macro `GLIB_GNU_GETTEXT' is obsolete.
    configure.ac:59: You should run autoupdate.
    aclocal.m4:426: GLIB_GNU_GETTEXT is expanded from...
>>  aclocal.m4:526: AM_GLIB_GNU_GETTEXT is expanded from...
>>  configure.ac:59: the top level
    configure.ac:59: warning: The macro `AC_TRY_LINK' is obsolete.
    configure.ac:59: You should run autoupdate.
    ./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
    lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
    lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
    ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
    ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
    aclocal.m4:111: GLIB_LC_MESSAGES is expanded from...
    aclocal.m4:426: GLIB_GNU_GETTEXT is expanded from...
>>  aclocal.m4:526: AM_GLIB_GNU_GETTEXT is expanded from...
>>  configure.ac:59: the top level
    configure.ac:59: warning: The macro `AC_TRY_LINK' is obsolete.
    configure.ac:59: You should run autoupdate.
    ...

Note that use of AM_GLIB_GNU_GETTEXT was deprecated in GLib 2.47.5
released 2016-01-18 [7].  Newer versions of GLib are included in the
oldest supported distributions:

    Distro             Package containing   Version
                       glib-gettext.m4
    Debian 10          libglib2.0-dev-bin   2.58.3
    RHEL / CentOS 7    glib2-devel          2.56.1
    Ubuntu 18.04 LTS   libglib2.0-dev-bin   2.56.4
    SLES 12 SP5        glib2-devel          2.48.2

Therefore perform the migration described in the GNOME wiki documents
[0][1].  This involves:
1. Replacing the macros used in configure.ac;
2. Copying Makevars.template to po/Makevars and setting
   PO_DEPENDS_ON_POT and DIST_DEPENDS_ON_UPDATE_PO to "no";
3. Replace @INTLTOOL_*@ macros in Makefile.am with rules to use gettext
   to directly translate the relevent GNOME application files;
4. Removing (_) underscore marking translation prefixes from XML tags in
   GNOME application files as gettext understands which tags of which
   files need translating.
For reference are these commits in projects GNOME-System-Monitor [8],
Reversi [9] and Evince [10] making the same transition.

At this point "./autogen.sh && make" succeeds, at least on Ubuntu which
provides the instructions gettext needs to correctly translate .policy
files by default.  These:
    /usr/share/gettext/its/polkit.its
    /usr/share/gettext/its/polkit.loc
are included in the base policykit-1 package.

[1]  Migrating from Intltool to Gettext
     https://wiki.gnome.org/MigratingFromIntltoolToGettext
[2]  Using Modern Gettext
     https://blogs.gnome.org/mclasen/2016/07/21/using-modern-gettext/
[3]  On the killing of intltool
     https://blogs.gnome.org/mcatanzaro/2016/07/27/on-the-killing-of-intltool/
[4]  SUSE package search, SLES 12 SP5, gettext
     https://scc.suse.com/packages?name=SUSE%20Linux%20Enterprise%20Server&version=12.5&arch=x86_64&query=gettext&module=
[5]  SUSE Long Term Service Pack Support
     https://links.imagerelay.com/cdn/3404/ql/f3a083e9bcd34c76addd096d7f60ec00/long_term_service_pack_support_flyer.pdf
[6]  SUSE package search, SLES 15, gparted
     https://scc.suse.com/packages?name=SUSE%20Linux%20Enterprise%20Server&version=15&arch=x86_64&query=gparted&module=
[7]  Deprecate GLIB_GNU_GETTEXT macro, use upstream gettext instead
     6b577196ee
[8]  [GNOME-System-Monitor] Migrate from intltool
     9185b9c713
[9]  [Reversi] Gettext migration (bgo#793040)
     d22f560ac8
[10] [Evince] build: Migrate from Intltool to Gettext
     4fd6821324

Closes !107 - Migrate from intltool to gettext translation
2022-11-12 16:44:55 +00:00
Mike Fleetwood 5e2927f1ef Update AC_PROG_LIBTOOL to LT_INIT in configure.ac (!106)
Autoconf 2.71 on Fedora 36 and Ubuntu 22.04 LTS has started reporting
a number of warnings about configure.ac containing obsolete macros.  One
of them is this:
    $ ./autogen.sh
    ...
    Processing ./configure.ac
    configure.ac:17: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
    configure.ac:17: You should run autoupdate.
    m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
    configure.ac:17: the top level
    ...

AC_PROG_LIBTOOL is deprecated and the replacement is LT_INIT [1].
LT_INIT is available in all supported distributions, for example RHEL /
CentOS 7 has libtool 2.4.2 with LT_INIT defined in
/usr/share/aclocal/libtool.m4 serial 57.  The last known distribution
without LT_INIT was RHEL / CentOS 5 [2].

Update accordingly.

[1] Libtool Manual, 5.4.1 The LT_INIT macro
    https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
    "Macro: LT_INIT(options)
    ...  AC_PROG_LIBTOOL and AM_PROG_LIBTOOL are deprecated names for
    older versions of this macro; autoupdate will upgrade your
    configure.ac files."
[2] 654cdc7335
    Update AM_PROG_LIBTOOL to AC_PROG_LIBTOOL in configure.ac (#734718)

Closes !106 - Update AC_PROG_LIBTOOL to LT_INIT in configure.ac
2022-09-13 16:01:25 +00:00
Mike Fleetwood 053691378c Resolve messages from configure in VPATH build (!103)
Even though this is fixed the execution of configure as part of make
distcheck outputs this:
    checking whether po/Makefile.in.in deletes intltool cache lock file... /usr/bin/grep: po/Makefile.in.in: No such file or directory
    /usr/bin/sed: can't read po/Makefile.in.in: No such file or directory
    /usr/bin/grep: po/Makefile.in.in: No such file or directory
    no

make distcheck [1] performs a VPATH build with a read-only srcdir and
a separate writable build directory with files split between the two.
The relevant layout looks like:
    ./gparted-1.4.0-git/configure
    ./gparted-1.4.0-git/po/Makefile.in.in
    ./gparted-1.4.0-git/_build/sub/

And make distcheck runs configure like this:
    cd ./gparted-1.4.0-git/_build/sub
    ../../configure --srcdir=../..

The file is ../../po/Makefile.in.in in this case, so not found by the
existing check.  A simple investigation technique is to run make
distcheck, kill it shortly after configure completes and examine the
build tree.  Definitely before make distcheck completes successfully and
deletes everything.

Fix by using $srcdir prefix to access the file.  Also handle the case of
po/Makefile.in.in not existing, although this doesn't now occur in the
scenario fixed by this commit.  And only patch the file if it's
writable, another case that doesn't occur in this scenario.

Relevant output line from configure run by make distcheck now looks
like:
    checking whether po/Makefile.in.in deletes intltool cache lock file... yes

[1] GNU Automake, 14.4 Checking the Distribution
    https://www.gnu.org/software/automake/manual/html_node/Checking-the-Distribution.html

Closes !103 - Fix make distcheck failure found in GitLab CI job
              unbuntu_test
2022-06-07 16:38:20 +00:00
Mike Fleetwood 0bd636a34b Fix up intltool leaving .intltool-merge-cache.lock file behind (!103)
On Ubuntu 22.04 LTS make distcheck fails like this:
    $ make distcheck
    ...
    ERROR: files left in build directory after distclean:
    ./po/.intltool-merge-cache.lock
    make[1]: *** [Makefile:920: distcleancheck] Error 1
    make[1]: Leaving directory '/builds/GNOME/gparted/gparted-1.4.0-git/_build/sub'
    make: *** [Makefile:849: distcheck] Error 1

This was picked up by the GitLab ubuntu_test CI job after the Ubuntu
22.04 LTS release and the official Ubuntu docker image labelled latest
was updated to match, circa April 2022.  This is a known issue with
intltool >= 0.51.0-5.1 [1][2][3], first included in Ubuntu 22.04 LTS.

The pending proposed fix is to also delete the left behind
.intltool-merge-cache.lock along with the associated cache file itself
in the intltool provided Makefile.in.in [4].

Applying a fix to the GitLab ubuntu_test CI job does nothing for fixing
it for us maintainers on our distributions.  po/Makefile.in.in is not
part of the GParted git repository, instead it is copied from
/usr/share/intltool/Makefile.in.in by ./autogen.sh -> gnome-autogen.sh
-> intltoolize --force --copy --automake.  Add a configure check which
patches po/Makefile.in.in as needed.  This will fix it for those
building from git, and be a harmless check for those building from a tar
release.  Configure output line looks like:
    checking whether po/Makefile.in.in deletes intltool cache lock file... fixed

[1] Ubuntu bug 1712194 - Error when running make distcheck
    https://bugs.launchpad.net/intltool/+bug/1712194
[2] Debian bug #991623 - intltool: make distcheck broken
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991623
[3] Arch Linux bug FS#67098 - [intltool] latest patch for race condition
    breaks some builds
    https://bugs.archlinux.org/task/67098
[4] Remove cache lock file in mostlyclean
    https://code.launchpad.net/~danbnicholson/intltool/intltool/+merge/406321

Closes !103 - Fix make distcheck failure found in GitLab CI job
              unbuntu_test
2022-06-07 16:38:20 +00:00
Curtis Gedak 8929448e1e Append -git to version for continuing development 2022-03-28 09:44:21 -06:00
Curtis Gedak bc4b1088fb ========== gparted-1.4.0 ========== 2022-03-28 09:24:33 -06:00
Curtis Gedak 74bd376a50 Append -git to version for continuing development 2021-07-19 11:00:28 -06:00
Curtis Gedak ecdf4d42a8 ========== gparted-1.3.1 ========== 2021-07-19 10:40:49 -06:00
Curtis Gedak 26f4dc504a Replace deprecated gtk_show_uri() method for help window (!82)
The gtk_show_uri() [1] method was deprecated as of gtk3 version 3.22 and
has been replaced with gtk_show_uri_on_window [2].

[1] https://developer.gnome.org/gtk3/stable/gtk3-Filesystem-utilities.html#gtk-show-uri
[2] https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3.7

Note that AppInfo::launch_uris() has been removed because with
glib/glibmm >= 2.58 AppInfo::launch_uris() always reports success even
when yelp is not launched and in such cases prevents the dialog
reporting the error from being displayed.

Closes !82 - Replace deprecated gtk_show_uri() method for help window
2021-05-17 20:24:54 +00:00
Curtis Gedak 1bd0fa656e Append -git to version for continuing development 2021-05-03 09:18:26 -06:00
Curtis Gedak 9523b54cd9 ========== gparted-1.3.0 ========== 2021-05-03 09:02:58 -06:00
Curtis Gedak 4665e3a125 Append -git to version for continuing development 2021-01-25 10:32:31 -07:00
Curtis Gedak 23b27dfc35 ========== gparted-1.2.0 ========== 2021-01-25 10:14:25 -07:00
Curtis Gedak d653fe6173 Append -git to version for continuing development
Also fix minor whitespace mistake in NEWS
2020-01-20 10:33:47 -07:00
Curtis Gedak 8a15021168 ========== gparted-1.1.0 ========== 2020-01-20 10:15:32 -07:00
Curtis Gedak e04b928423 Append -git to version for continuing development 2019-05-29 10:21:07 -06:00
Curtis Gedak b5f1d5d5fe ========== gparted-1.0.0 ========== 2019-05-29 09:54:20 -06:00
Luca Bacci 12f08d38b8 Set the xalign property for Gtk::Labels (!40)
With the same case as from the previous commit, the very long "Mounted
on ..." text is now wrapped, but the text may not be left justified.
Slowly adjust the dialog width and see how the text wrapping is updated
to fit the size adjustment but the text is centred rather than left
justified.

This is because setting the halign property to Gtk::ALIGN_START does not
guarantee left alignment of text for wrapped or ellipsized Gtk::Labels.

Use the xalign property instead.

To set the xalign property there is a method in the GtkMisc (Gtk::Misc)
base class:

  gtk_misc_set_alignment (Gtk::Misc::set_alignment)

However, GtkMisc (Gtk::Misc) was deprecated in Gtk 3.14 (Gtkmm 3.14)
and in Gtk 3.16 (gtkmm 3.16) set_alignment() was replaced with the
introduction of two new methods:

  gtk_label_set_xalign (Gtk::Label::set_xalign)
  gtk_label_set_yalign (Gtk::Label::set_yalign)

Add a check for Gtkmm method Gtk::Label::set_xalign() in configure.ac
and use it when available.

References:

[1] Gtk3 Reference Documentation - gtk_misc_set_alignment()
    https://developer.gnome.org/gtk3/stable/GtkMisc.html#gtk-misc-set-alignment
    "gtk_misc_set_alignment has been deprecated since version 3.14 and
    should not be used in newly-written code. Use GtkWidget's alignment
    ("halign" and "valign") and margin properties or GtkLabel's
    "xalign" and "yalign" properties."

[2] Gtkmm 3.16 Gtk::Misc Class Reference, set_alignment() method
    https://developer.gnome.org/gtkmm/3.16/classGtk_1_1Misc.html#a52b2675874cf46a3097938756b9fe9e8

[3] GNOME BugZilla - EmptyBoxes: instructions_label's alignment is off
    https://bugzilla.gnome.org/show_bug.cgi?id=735841

[4] Gtk commit from 2014-09-16:
    GtkLabel: add x/yalign properties
    https://gitlab.gnome.org/GNOME/gtk/commit/d39424fc

[5] Gtk3 Reference Documentation - gtk_label_set_xalign()
    https://developer.gnome.org/gtk3/stable/GtkLabel.html#gtk-label-set-xalign

[6] Gtkmm 3.16 Gtk::Label Class Reference, set_xalign() method
    https://developer.gnome.org/gtkmm/3.16/classGtk_1_1Label.html#acee7d4e87d7cc14080a7b8ded5f84e5e

Closes !40 - Limit wrapping labels
2019-05-15 16:11:21 +01:00
Luca Bacci eeffd50531 Request natural width in Gtk::ScrolledWindows for Gtk >= 3.22 (!39)
Before Gtk 3.22 GtkScrolledWindow propagated natural size to its
Children and so on to descendants.  In Gtk 3.22 this was changed to
always request the minimum size.  This was done because it is believed
to be a safer default (gives a better behaviour) in case of dynamic
content inside the scrolled window, that is, content that may change
allocated size. [1][2][3]

When the scrolled window content is not dynamic the natural size is
preferable because it gives a better looking layout and without any
downside.

In the case of GParted content which is not dynamic, so request the
scrolled windows to allocate children at natural sizes for Gtk >= 3.22.

The benefits of natural size allocation are evident in presence of
wrapping labels (for example inside the "Partition Info" dialog), that
with the minimum size request likely end up taking a very small width.

References:

[1] Gtk commit from 2016-08-31:
    GtkScrolledWindow: Make propagation of natural child sizes optional
    0984d1622d
    "Making propagation of child natural sizes mandatory (or default,
    even) was evidently a mistake as this causes dynamic content in a
    scrolled window to resize it's parent when the scrolled window is
    competing for space with an adjacent widget."

[2] Gtk 3.22 Reference Documentation -
    gtk_scrolled_window_set_propagate_natural_width
    https://developer.gnome.org/gtk3/3.22/GtkScrolledWindow.html#gtk-scrolled-window-set-propagate-natural-width

[3] Gtkmm 3.24 Gtk::ScrolledWindow Class Reference,
    set_propagate_natural_width() method
    https://developer.gnome.org/gtkmm/3.24/classGtk_1_1ScrolledWindow.html#a2d4cb945688ecb8739efd70b18742779

[4] Gtkmm 3.21.6 NEWS
    https://gitlab.gnome.org/GNOME/gtkmm/blob/3.21.6/NEWS
    "ScrolledWindow: Added get/set_propagate_natural_height/width() and
    the properties."

Closes !39 - Always request natural size inside Gtk::ScrolledWindow
2019-05-13 20:12:12 +00:00
Mike Fleetwood d1441ce6a9 Drop compose subdir (#46)
It's no longer used so drop it.

Closes #46 - Drop compose subdir
2019-03-27 16:45:22 +00:00
Mike Fleetwood a725921a22 Add use of new GNOME 3 yelp-tools documentation infrastructure (!24)
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
    https://wiki.gnome.org/Initiatives/GnomeGoals/NewDocumentationInfrastructure

[2] Yelp > Yelp Tools > yelp.m4
    http://yelp.io/tools/yelp.m4.html

[3] GNOME application developement overview / User help / Set up your
    build system
    https://developer.gnome.org/platform-overview/stable/dev-help-build.html.en

[4] gucharmap commit "Port to new documentation infrastructure"
    3e1526c056

[5] totem commit "Use new documentation infrastructure"
    59a6bd6064

Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
2019-03-01 16:46:56 +00:00
Mike Fleetwood e62b352eed Remove use of GNOME 2 gnome-doc-utils documentation infrastructure (!24)
Details of old GNOME 2 gnome-doc-utils:
    Migrating your documentation to gnome-doc-utils
    https://wiki.gnome.org/Projects/GnomeDocUtils/MigrationHowTo

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
2019-03-01 16:46:56 +00:00
Mike Fleetwood 4fcd182992 Remove left behind configuration summary lines (!22)
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] 8df975c7d1
    Increase minimum required libparted to 2.2 (!22)

Closes !22 - Increase minimums to libparted 2.2 and glibmm 2.32
2019-02-20 16:15:17 +00:00
Luca Bacci 2953778a4c port-to-gtk3: Use Gdk::AppLaunchContext to launch yelp (#7)
gdk_spawn_command_line_on_screen() is not present in Gtk3.  The
documentation from Gtkmm 2.24 states [1]:

    gdk_spawn_command_line_on_screen has been deprecated since version
    2.24 and should not be used in newly-written code.  This function is
    being removed in 3.0.  Use either g_spawn_command_line_sync(),
    g_spawn_command_line_async() or GdkAppLaunchContext instead.

g_spawn_command_line_sync() and g_spawn_command_line_async() are screen
/ display agnostic, as such we would loose functionality.  There is a
workaround, which involves setting the DISPLAY environment variable [2],
but it's a weak solution (and I don't know if it works on backends
other than X11).

GdkAppLaunchContext is an implementation of GIO's GAppLaunchContext that
handles launching an application in a graphical context [3].  Therefore
use GdkAppLaunchContext and GIO's GAppInfo.

GdkAppLaunchContext was introduced in Gtk2 version 2.14.  The C++
wrapper Gdk::AppLaunchContext was introduced only in Gtkmm3 version 3.4
[4].  Bump the minimum required version of Gtkmm to 3.4.0 for this
requirement.

GAppInfo was introduced in GLib version 2.16.  The C++ wrapper
Gio::AppInfo was introduced in Giomm version 2.16.  Note that the
minimum required version for glibmm is already 2.32.

[1] GDK 2 Reference Manual, GdkScreen, gdk_spawn_on_screen()
    https://developer.gnome.org/gdk2/2.24/GdkScreen.html#gdk-spawn-on-screen

[2] Migrating from GTK+ 2.x to GTK+ 3 - "Use GIO for launching applications"
    https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3.7

[3] GDK 3 Reference Manual - "Application launching"
    https://developer.gnome.org/gdk3/stable/gdk3-Application-launching.html

[4] Gtkmm 3.4 Gdk::AppLaunchContext Class Reference, Detailed Description
    https://developer.gnome.org/gtkmm/3.4/classGdk_1_1AppLaunchContext.html#details

Closes #7 - Port to Gtk3
2019-02-11 08:57:18 +00:00
Luca Bacci cc0740148e port-to-gtk3: Switch to Gtkmm3 (#7)
Switch to Gtkmm3 in configure.ac.  Require version 3.0.0.

Also update the build instructions in README and the package list in
.gitlab-ci.yml.

Starting from version 3.18.0 Gtkmm requires C++11 compilation [1][2][3].
Add a check for Gtkmm >= 3.18.0 in configure.ac and enable C++11
compilation accordingly.

References:

[1] Gtkmm 3.18.1 NEWS
    "Changes in 3.18 ... Use, and require C++11, ..."
    https://gitlab.gnome.org/GNOME/gtkmm/blob/3.18.1/NEWS#L35

[2] Murray's Blog - "gtkmm now uses C++11"
    https://www.murrayc.com/permalink/2015/07/31/gtkmm-now-uses-c11

[3] Murray's Blog - "gtkmm 3.18 and glibmm 2.46"
    https://www.murrayc.com/permalink/2015/09/25/gtkmm-3-18-and-glibmm-2-46

Closes #7 - Port to Gtk3
2019-02-11 08:57:18 +00:00
Mike Fleetwood 80d6394684 Remove deprecated Glib::thread_init() (!22)
Use of Glib::thread_init() was deprecated in glibmm 2.32 [1].  The
oldest supported distributions have these versions:
    Debian 8           glibmm 2.42.0
    RHEL / CentOS 7    glibmm 2.56.0
    SLES 12            glibmm 2.38.1
    Ubuntu 14.04 LTS   glibmm 2.39.93

Checking further the glibmm 2.32 reference manual says this about
Glib::thread_init() [2]:
    Initializes the GLib thread system.

    Deprecated:
    Calling thread_init() is no longer necessary and no longer has any
    effect.

However only some of the glibmm example programs had Glib::thread_init()
removed, others had it replaced by Glib::init() [3].  Again the glibmm
2.32 reference manual says this about Glib::init() [4]:
    Initialize glibmm.

    You may call this more than once.  You do not need to call this if
    you are using Glib::MainLoop or Gtk::Main, because they call it for
    you.

GParted does call Gtk::Main and test_PipeCapture does call
Glib::MainLoop.  Therefore just raise the minimum version to glibmm 2.32
and remove both calls to Glib::thread_init().

[1] Glibmm 2.32 NEWS file
    https://gitlab.gnome.org/GNOME/glibmm/blob/2.32.0/NEWS#L207

[2] glibmm 2.32, glibmm: Glib Namespace Reference, Glib::thread_init()
    https://developer.gnome.org/glibmm/2.32/namespaceGlib.html#ab26d01c776801f1fff00753e97af4fc7

[3] glibmm commit "Avoid use of deprecates API in tests and examples."
    3e0fbb22c0

[4] glibmm 2.32, glibmm: Glib Namespace Reference, Glib::init()
    https://developer.gnome.org/glibmm/2.32/namespaceGlib.html#ac90aee10d0b90e3d8a96a86b5394f87b

Closes !22 - Increase minimums to libparted 2.2 and glibmm 2.32
2019-01-21 16:41:31 +00:00
Mike Fleetwood 8df975c7d1 Increase minimum required libparted to 2.2 (!22)
Raise the minimum required version of GNU Parted from 1.7.1 to 2.2,
released 2010-02-16 [1][2].  The oldest supported distributions, also
with gtkmm >= 2.24, since commit [3], are:
    Debian 8           parted 3.2
    RHEL / CentOS 7    parted 3.1
    SLES 12            parted 3.1
    Ubuntu 14.04 LTS   parted 2.3

Raising the minimum required version allows removal of optional code
associated with these definitions:
*   USE_LIBPARTED_LARGE_SECTOR_SUPPORT
    Fallback code reporting ignored device with logical sector size
    other than 512 bytes.
*   ENABLE_PT_REREAD_WORKAROUND
    Fallback code re-attempting to inform the kernel of partition
    changes.

[1] GNU Parted 2.2 release announcement
    http://lists.gnu.org/archive/html/info-gnu/2010-02/msg00016.html

[2] NEWS file from GNU Parted 2.2
    http://git.savannah.gnu.org/cgit/parted.git/tree/NEWS?h=v2.2

[3] 8b42bab1ee
    modern-gtk2: Require Gtkmm version 2.24 (!17)

Closes !22 - Increase minimums to libparted 2.2 and glibmm 2.32
2019-01-21 16:41:31 +00:00
Curtis Gedak 636694b22e Append -git to version for continuing development 2018-12-13 10:32:46 -07:00
Curtis Gedak 60aa51119f ========== gparted-0.33.0 ========== 2018-12-13 10:16:44 -07:00
Luca Bacci c0aa3dbfdf modern-gtk2: Always use Gtk::MessageDialog::get_message_area() (!17)
Remove check for Gtk::Messagedialog::get_message_area() and associated
fallback code as it is always available from gtkmm 2.22.

Reference:
https://gitlab.gnome.org/GNOME/gtkmm/blob/2.22.0/NEWS#L25

Closes !17 - Gtk2 modernisation
2018-11-12 21:50:42 +00:00
Luca Bacci 8b42bab1ee modern-gtk2: Require Gtkmm version 2.24 (!17)
Require the latest minor version of gtkmm2, released back in 2011 [1].
This is the first step in porting to Gtk3 [2].  This drops GParted
support for very old but still supported distributions:
    Distribution      EOL        Gtkmm
    RHEL / CentOS 6   2020-Nov   2.18.2
    SLES 11           2022-Mar   2.14.1

References:
[1] ANNOUNCE: gtkmm 2.24.0
    https://mail.gnome.org/archives/gtkmm-list/2011-February/msg00038.html
[2] Migrating from GTK+ 2.x to GTK+ 3 / Preparation in GTK+ 2.x
    https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3

Closes !17 - Gtk2 modernisation
2018-11-12 21:50:42 +00:00
Curtis Gedak 8bc599d054 Update bug links from Bugzilla to GitLab issues (!11)
- Bugzilla has disabled reporting of new bugs.
- Existing Bugzilla bug reports permit new comments only.
- New bugs are to be created on GitLab issues.

Reference:
[GitLab] IMPORTANT: Mass migration plan
https://mail.gnome.org/archives/desktop-devel-list/2018-March/msg00023.html

Closes !11 - Update bugzilla references
2018-08-24 09:54:12 +01:00
Curtis Gedak 9abc477cad Append -git to version for continuing development 2018-08-22 10:09:08 -06:00
Curtis Gedak 6bece0b3d7 ========== gparted-0.32.0 ========== 2018-08-22 09:46:04 -06:00
Mike Fleetwood fc215d0c2e Increase minimum required gtkmm to 2.16.0 (#794253)
Increase the minimum required version of gtkmm to 2.16.0, thus allowing
removal of HAVE_GTK_SHOW_URI autoconf definition and associated fallback
code.

Bug 794253 - Desupport RHEL / CentOS 5 and raise minimum required
             versions to glibmm 2.14.0 and gtkmm 2.16.0
2018-03-26 10:16:45 -06:00
Mike Fleetwood 0ab2adb67f Increase minimum required gtkmm to 2.11.1 (#794253)
Increase the minimum required version of gtkmm to 2.11.1, thus allowing
removal of:
 *  HAVE_SET_DEFAULT_ICON_NAME autoconf definition and associated
    optional code.
 *  INSTALL_PIXMAPS_DIR automake conditional and associated make
    instructions.

This is reversing these 3 commits, except for the higher minimum gtkmm
version:
 1) a042107883
    Only use Gtk::Window::set_default_icon_name method when available (#695279)
 2) b09d6035cd
    Add fallback method for specifying GParted icon (#695279)
 3) d6baac2546
    Only install fallback icon when required (#695279)

Bug 794253 - Desupport RHEL / CentOS 5 and raise minimum required
             versions to glibmm 2.14.0 and gtkmm 2.16.0
2018-03-26 10:16:45 -06:00
Mike Fleetwood 07f58ed82b Raise minimum required glibmm version to 2.14.0 (#794253)
Increase the minimum required version of glibmm to 2.14.0, thus allowing
removal of the HAVE_GLIB_REGEX autoconf definition and associated
conditional code.  This is reversing commit, except for the new glibmm
minimum check:

    456932846b
    Implement fallback if Glib::Regex class is missing (#695279)

Bug 794253 - Desupport RHEL / CentOS 5 and raise minimum required
             versions to glibmm 2.14.0 and gtkmm 2.16.0
2018-03-26 10:16:45 -06:00
Curtis Gedak 295c649ace Append -git to version for continuing development 2018-03-19 10:29:11 -06:00
Curtis Gedak 62cd4a5d92 ========== gparted-0.31.0 ========== 2018-03-19 10:08:53 -06:00
Curtis Gedak 0eb9f1fcfb Reduce dependency on scrollkeeper (#743318)
Scrollkeeper and the associated OMF catalog files are used by the
GNOME 2 version of yelp to display the GParted help manual.  To see how
this works try the following command:

  yelp ghelp:gparted

GNOME version 3 and higher yelp do not require scrollkeeper or the OMF
catalog files to properly display the GParted help manual.  And in fact
GNOME 3 deprecated the GNOME 2 method of building and installing GNOME
help documents altogether; including use of GNOME_DOC_INIT autoconf
macro, the gnome-doc-utils package and use of scrollkeeper.

  [GNOME 3] GNOME Goal: Port To New Documentation Infrastructure
  https://wiki.gnome.org/Initiatives/GnomeGoals/NewDocumentationInfrastructure

Further, the next release of Debian, Debian 10 (Buster), will be
removing the scrollkeeper / rarian package.

  rarian: Don't release with Buster
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885657

GParted is still a GNOME 2 app using GNOME 2 documentation build system
using autoconf GNOME_DOC_INIT macro.

  [GNOME 2] Migrating your documentation to gnome-doc-utils
  https://wiki.gnome.org/Projects/GnomeDocUtils/MigrationHowTo

This is needed to build GParted documentation on still supported GNOME 2
distributions RHEL / CentOS 6.  So avoid requiring deprecated
scrollkeeper on GNOME 3 by automatically disabling scrollkeeper database
updates when the scrollkeeper-update command is not available.

  Executable          | Configure option used  | Use scrollkeeper
  scrollkeeper-update | on command line        | when building help
  exists?             |                        | for GParted?
  --------------------+------------------------+-------------------
  Yes                 | <none>                 | Yes
  Yes                 | --enable-scrollkeeper  | Yes
  Yes                 | --disable-scrollkeeper | No
                      |                        |
  No                  | <any>                  | No

Note that because GParted is still using the GNOME 2 documentation build
system it still builds and installs OMF files.  It is just that they are
not required with GNOME 3 yelp and this commit automatically disables
updating the scrollkeeper database when the scrollkeeper-update command
is not available.

Bug 743318 - configure script missing check for scrollkeeper dependency
2018-02-08 21:58:51 +00:00
Curtis Gedak 6045e5a147 Append -git to version for continuing development 2017-10-10 10:43:13 -06:00
Curtis Gedak 1db4c5ae83 ========== gparted-0.30.0 ========== 2017-10-10 10:20:25 -06:00
Mike Fleetwood f38ccd0284 Only when configured, grant root access to the X11 display (#776437)
GParted fails to display when run under Wayland [1][2][3].  This is
because by intentional design Wayland doesn't allow applications with
root privileges access to the display [4].

As an interim workaround make the gparted shell wrapper use xhost to
grant root access to the X11 server if root doesn't already have access,
but only when configured.  Granting root access must be explicitly
enabled when building GParted like this:
    ./configure --enable-xhost-root
It defaults to disabled.  When gpartedbin binary ends the shell wrapper
revokes root access only if it granted such access.

[1] GNOME Bug 776437 - GParted fails to run as root under Wayland
    https://bugzilla.gnome.org/show_bug.cgi?id=776437

[2] Ubuntu Bug 1652282 - GParted does not work in GNOME on Wayland
    https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/1652282

[3] Fedora Bug 1397103 - gparted not working under Wayland
    https://bugzilla.redhat.com/show_bug.cgi?id=1397103

[4] Common Fedora 25 bugs
    Running graphical apps with root privileges (e.g. gparted) does not
    work on Wayland
    https://fedoraproject.org/wiki/Common_F25_bugs#wayland-root-apps

Bug 776437 - GParted fails to run as root under Wayland
2017-09-01 10:14:20 -06:00