From 6bf7668f8e374592498059f2a7610ab48cf34437 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Thu, 31 Aug 2023 09:50:33 +0100 Subject: [PATCH] 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 --- configure.ac | 14 +------------- src/Utils.cc | 4 ---- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 038fab48..118d79d7 100644 --- a/configure.ac +++ b/configure.ac @@ -200,7 +200,7 @@ AC_SUBST([GTHREAD_LIBS]) AC_SUBST([GTHREAD_CFLAGS]) dnl GTKMM -PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0 >= 3.4.0]) +PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0 >= 3.18.0]) AC_SUBST([GTKMM_LIBS]) AC_SUBST([GTKMM_CFLAGS]) @@ -213,18 +213,6 @@ dnl Require C++11 compilation. AX_CXX_COMPILE_STDCXX_11() -dnl Check for gtkmm >= 3.16 to determine availability of Gtk::Label::set_xalign(). -AC_MSG_CHECKING([for Gtk::Label::set_xalign() method]) -PKG_CHECK_EXISTS( - [gtkmm-3.0 >= 3.16.0], - [AC_DEFINE([HAVE_LABEL_SET_XALIGN], 1, - [Define to 1 if gtkmm provides Gtk::Label::set_xalign() method.]) - AC_MSG_RESULT([yes]) - ], - [AC_MSG_RESULT([no])] -) - - dnl Check for gtkmm >= 3.22 to determine availability of Gtk::ScrolledWindow::set_propagate_natural_width(). AC_MSG_CHECKING([for Gtk::ScrolledWindow::set_propagate_natural_width() method]) PKG_CHECK_EXISTS( diff --git a/src/Utils.cc b/src/Utils.cc index 20922675..a8a8dab4 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -68,11 +68,7 @@ Gtk::Label * Utils::mk_label( const Glib::ustring & text { Gtk::Label *label = manage(new Gtk::Label(text)); -#if HAVE_LABEL_SET_XALIGN label->set_xalign(0.0); -#else - label->set_alignment(0.0, 0.5); -#endif label->set_valign(valign); label ->set_use_markup( use_markup ) ; if (wrap)