mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-25 05:15:33 +00:00
Fixed compilation with gtkmm < 3.10 and gcc 4.7.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user