summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-05-15 08:21:07 +0000
committertavmjong-free <tavmjong@free.fr>2016-05-15 08:21:07 +0000
commit424f8f6d1fd8e77e948edbe9fe9a712b75ec5385 (patch)
tree919b55a2e5adeda33285b53df45ea29b3e0ef77d /src/main.cpp
parentFixing build.xml file after Python update in the devlibs. (diff)
downloadinkscape-424f8f6d1fd8e77e948edbe9fe9a712b75ec5385.tar.gz
inkscape-424f8f6d1fd8e77e948edbe9fe9a712b75ec5385.zip
GTK3: Fix compile for GTK3 versions less than 3.16.
(bzr r14887)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 99e3ccfe6..4ce8ff145 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1068,10 +1068,12 @@ sp_main_gui(int argc, char const **argv)
try {
provider->load_from_path (inkscape_style);
}
+#if GTK_CHECK_VERSION(3,16,0)
catch (const Gtk::CssProviderError& ex)
{
std::cerr << "CSSProviderError::load_from_path(): failed to load: " << inkscape_style << "\n (" << ex.what() << ")" << std::endl;
}
+#endif
Gtk::StyleContext::add_provider_for_screen (screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
Glib::ustring user_style = Inkscape::Application::profile_path("ui/style.css");
@@ -1080,8 +1082,10 @@ sp_main_gui(int argc, char const **argv)
try {
provider2->load_from_path (user_style);
}
+#if GTK_CHECK_VERSION(3,16,0)
catch (const Gtk::CssProviderError& ex)
{}
+#endif
Gtk::StyleContext::add_provider_for_screen (screen, provider2, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
#endif