summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-28 13:27:38 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-05-28 13:27:38 -0400
commit48c4ad800443db5ccec8f51376c375e4715677c5 (patch)
tree235d055a4110a34a5a91fb8381ff750ca3c15afb
parent173b00777963376fd441256a4aadac9e6425af97 (diff)
only use and present the buggy gradient parameter if built with a suitably patched version of Cairo
-rw-r--r--gtk2_ardour/rc_option_editor.cc6
-rw-r--r--gtk2_ardour/ui_config.cc5
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 <cairo/cairo.h>
+
#include <boost/algorithm/string.hpp>
#include <gtkmm/liststore.h>
@@ -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 <cstdlib>
#include <cstdio> /* for snprintf, grrr */
+#include <cairo/cairo.h>
+
#include <glibmm/miscutils.h>
#include <glib/gstdio.h>
@@ -150,10 +152,11 @@ UIConfiguration::map_parameters (boost::function<void (std::string)>& 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;
}