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
This commit is contained in:
Mike Fleetwood 2018-03-07 13:09:35 +00:00 committed by Curtis Gedak
parent 07f58ed82b
commit 0ab2adb67f
4 changed files with 3 additions and 53 deletions

View File

@ -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(

View File

@ -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

View File

@ -2,7 +2,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
$(GTHREAD_CFLAGS) \
$(GTKMM_CFLAGS) \
-DGNOME_ICONDIR=\""$(datadir)/pixmaps"\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\"
AM_CFLAGS = -Wall

View File

@ -85,11 +85,7 @@ Win_GParted::Win_GParted( const std::vector<Glib::ustring> & 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 )
{