From 424f8f6d1fd8e77e948edbe9fe9a712b75ec5385 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 15 May 2016 10:21:07 +0200 Subject: GTK3: Fix compile for GTK3 versions less than 3.16. (bzr r14887) --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main.cpp') 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 -- cgit v1.2.3