From 0ab2adb67fd3ef8e75698c596245b81762b8c7c2 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Wed, 7 Mar 2018 13:09:35 +0000 Subject: [PATCH] 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) a04210788399736ff7f097cb75650ebcbd0a4950 Only use Gtk::Window::set_default_icon_name method when available (#695279) 2) b09d6035cdca90debb145628b0c62a0213ee1225 Add fallback method for specifying GParted icon (#695279) 3) d6baac254677b7863af413a38f382e9a2e0252bd 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 --- configure.ac | 24 +----------------------- data/icons/Makefile.am | 27 ++------------------------- src/Makefile.am | 1 - src/Win_GParted.cc | 4 ---- 4 files changed, 3 insertions(+), 53 deletions(-) diff --git a/configure.ac b/configure.ac index fe4d4e43..740476ee 100644 --- a/configure.ac +++ b/configure.ac @@ -219,7 +219,7 @@ AC_SUBST([GTHREAD_LIBS]) AC_SUBST([GTHREAD_CFLAGS]) dnl GTKMM -PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 > 2.8]) +PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 >= 2.11.1]) AC_SUBST([GTKMM_LIBS]) AC_SUBST([GTKMM_CFLAGS]) @@ -228,28 +228,6 @@ dnl Check for glibmm minimum required version. PKG_CHECK_MODULES([GLIBMM], [glibmm-2.4 >= 2.14.0]) -dnl Check for gtkmm >= 2.11.1 to determine availability of Gtk::Window::set_default_icon_name() -dnl NOTE: -dnl The documentation says that set_default_icon_name() is available in gtkmm >= 2.6, -dnl however the code reveals that it is only available in gtkmm >= 2.11.1. -dnl * gtkmm GTK::Window Class Reference -dnl https://developer.gnome.org/gtkmm/3.6/classGtk_1_1Window.html#a533d03e9b92d8ccd142ab3a44005cae4 -dnl * gtkmm NEWS file -dnl https://git.gnome.org/browse/gtkmm/tree/NEWS?h=gtkmm-2.14.0#n565 -AC_MSG_CHECKING([for Gtk::Window::set_default_icon_name() method]) -PKG_CHECK_EXISTS( - [gtkmm-2.4 >= 2.11.1], - [AC_DEFINE([HAVE_SET_DEFAULT_ICON_NAME], 1, - [Define to 1 if gtkmm-2.4 provides Gtk::Window::set_default_icon_name() method.]) - AM_CONDITIONAL([INSTALL_PIXMAPS_DIR], false) - AC_MSG_RESULT([yes]) - ], - [AM_CONDITIONAL([INSTALL_PIXMAPS_DIR], true) - AC_MSG_RESULT([no]) - ] -) - - dnl GTKMM 2.16 needed for gtk_show_uri() AC_MSG_CHECKING([for gtk_show_uri function]) PKG_CHECK_EXISTS( diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 9572d171..d98bd105 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -16,16 +16,6 @@ public_icons = \ private_icons = \ $(NULL) -# Name of the fallback icon to install in /usr/share/pixmaps [1] -# -- -# The GNOME 2 desktop wants a 16x16 "Menu" type icon [2] for the title -# bar and the open window list, and a 32x32 icon for the Alt-Tab task -# switcher. GParted only specifies a single icon file in the fallback -# case so just use the 16x16 one and let it be scaled as required. -# [1] https://developer.gnome.org/icon-theme-spec/ -# [2] https://developer.gnome.org/hig-book/2.32/hig-book.html#icons -pixmap = hicolor_apps_16x16_gparted.png - noinst_DATA = \ $(NULL) @@ -36,12 +26,6 @@ EXTRA_DIST = \ $(noinst_DATA) \ $(NULL) -# Only install fallback icon to /usr/share/pixmaps if required -if INSTALL_PIXMAPS_DIR -INSTALL_PIXMAP = install-pixmap -UNINSTALL_PIXMAP = uninstall-pixmap -endif - ############################################################################### gtk_update_icon_cache = gtk-update-icon-cache -f -t @@ -93,13 +77,6 @@ uninstall-icons: rm -f $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ done -install-pixmap: - mkdir -p $(DESTDIR)$(datadir)/pixmaps; \ - $(INSTALL_DATA) $(srcdir)/$(pixmap) $(DESTDIR)$(datadir)/pixmaps/gparted.png +install-data-local: install-icons update-icon-cache -uninstall-pixmap: - rm -f $(DESTDIR)$(datadir)/pixmaps/gparted.png - -install-data-local: install-icons $(INSTALL_PIXMAP) update-icon-cache - -uninstall-local: uninstall-icons $(UNINSTALL_PIXMAP) update-icon-cache +uninstall-local: uninstall-icons update-icon-cache diff --git a/src/Makefile.am b/src/Makefile.am index 2e8a03f8..4314657c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ $(GTHREAD_CFLAGS) \ $(GTKMM_CFLAGS) \ - -DGNOME_ICONDIR=\""$(datadir)/pixmaps"\" \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" AM_CFLAGS = -Wall diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index edb81a30..e3ecd693 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -85,11 +85,7 @@ Win_GParted::Win_GParted( const std::vector & user_devices ) try { -#ifdef HAVE_SET_DEFAULT_ICON_NAME this ->set_default_icon_name( "gparted" ) ; -#else - this ->set_icon_from_file( GNOME_ICONDIR "/gparted.png" ) ; -#endif } catch ( Glib::Exception & e ) {