File gtk2-bnc457728-disable-gail-via-env-var.diff of Package gtk2

diff -urw gtk+-2.14.4/modules/other/gail/gail.c gtk+-2.14.4-fixed//modules/other/gail/gail.c
--- gtk+-2.14.4/modules/other/gail/gail.c	2008-10-17 00:06:24.000000000 -0400
+++ gtk+-2.14.4-fixed//modules/other/gail/gail.c	2008-12-19 11:37:50.000000000 -0500
@@ -27,6 +27,7 @@
 #include "gailfactory.h"
 
 #define GNOME_ACCESSIBILITY_ENV "GNOME_ACCESSIBILITY"
+#define NO_GAIL_ENV "NO_GAIL"
 
 static gboolean gail_focus_watcher      (GSignalInvocationHint *ihint,
                                          guint                  n_param_values,
@@ -976,6 +977,16 @@
 int
 gtk_module_init (gint *argc, char** argv[])
 {
+  const char* env_no_gail;
+  gboolean no_gail = FALSE;
+
+  env_no_gail = g_getenv (NO_GAIL_ENV);
+  if (env_no_gail)
+      no_gail = atoi (env_no_gail);
+
+  if (no_gail)
+      return 0;
+
   gail_accessibility_module_init ();
 
   return 0;