From 48c4ad800443db5ccec8f51376c375e4715677c5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 28 May 2015 13:27:38 -0400 Subject: only use and present the buggy gradient parameter if built with a suitably patched version of Cairo --- gtk2_ardour/rc_option_editor.cc | 6 +++++- gtk2_ardour/ui_config.cc | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 9efd73ed28..a12fa90f4c 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -21,6 +21,8 @@ #include "gtk2ardour-config.h" #endif +#include + #include #include @@ -2644,6 +2646,7 @@ RCOptionEditor::RCOptionEditor () /* INTERFACE */ +#ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE BoolOption* bgo = new BoolOption ( "buggy-gradients", _("Possibly improve slow graphical performance"), @@ -2653,7 +2656,8 @@ RCOptionEditor::RCOptionEditor () Gtkmm2ext::UI::instance()->set_tip (bgo->tip_widget(), string_compose (_("This requires restarting %1 before having an effect"), PROGRAM_NAME)); add_option (S_("Preferences|GUI"), bgo); - +#endif + add_option (S_("Preferences|GUI"), new BoolOption ( "widget-prelight", diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index f34a5a48b6..1fe2d4135f 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -23,6 +23,8 @@ #include #include /* for snprintf, grrr */ +#include + #include #include @@ -150,10 +152,11 @@ UIConfiguration::map_parameters (boost::function& functor) int UIConfiguration::pre_gui_init () { +#ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE if (get_buggy_gradients()) { g_setenv ("FORCE_BUGGY_GRADIENTS", "1", 1); } - +#endif return 0; } -- cgit v1.2.3