Fixed compilation with gtkmm < 3.10 and gcc 4.7.

This commit is contained in:
Alexander Shaduri
2017-11-11 11:32:19 +00:00
parent 83baafa615
commit 5e8fef98ec
2 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ APP_DETECT_OS_KERNEL([build], [CONFIG_HOST_KERNEL_])
APP_COMPILER_OPTIONS([])
# Enable C++11 support. This is implied by gtkmm3, but CentOS7 fails to add it
# to gtkmm flags, so we have to enable it manually.
AX_CXX_COMPILE_STDCXX([11])
# to gtkmm flags, so we have to enable it manually. Make it optional for Debian 7 (gcc 4.7).
AX_CXX_COMPILE_STDCXX([11], [], [optional])
# Thread support for known configurations.
# Sun compiler (at least on linux) has some runtime issues with stringstream
+6 -4
View File
@@ -91,14 +91,15 @@ class GscMainWindowIconView : public Gtk::IconView {
const int icon_size = 64;
// Try XDG version first
#if APP_GTKMM_CHECK_VERSION(3, 10, 0)
try {
hd_icon = default_icon_theme->load_icon("drive-harddisk", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
#endif
if (!hd_icon) {
// Before gtk 3.10 it was called gtk-harddisk.
try {
hd_icon = default_icon_theme->load_icon("gtk-harddisk", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
hd_icon = default_icon_theme->load_icon("gtk-harddisk", icon_size, Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
}
if (!hd_icon) {
@@ -112,14 +113,15 @@ class GscMainWindowIconView : public Gtk::IconView {
}
// Try XDG version first
#if APP_GTKMM_CHECK_VERSION(3, 10, 0)
try {
cddvd_icon = default_icon_theme->load_icon("media-optical", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
#endif
if (!cddvd_icon) {
// Before gtk 3.10 it was called gtk-cdrom.
try {
cddvd_icon = default_icon_theme->load_icon("gtk-cdrom", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
cddvd_icon = default_icon_theme->load_icon("gtk-cdrom", icon_size, Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
}
if (!cddvd_icon) {