AtspiUiaSource.AutomationSource.IsAccessibilityEnabledGConf C# (CSharp) Method

IsAccessibilityEnabledGConf() private method

private IsAccessibilityEnabledGConf ( ) : bool
return bool
		private bool IsAccessibilityEnabledGConf ()
		{
			// FIXME: This is a temporary hack, we will replace it, proposed solutions:
			// - Use GConf API (we will need to fix threading issues).
			// - <Insert your fantastic idea here>
			string output = bool.FalseString;
			bool enabled = false;
				
			ProcessStartInfo
				processInfo = new ProcessStartInfo ("gconftool-2",
					                            "-g /desktop/gnome/interface/accessibility");
			processInfo.UseShellExecute = false;
			processInfo.ErrorDialog = false;
			processInfo.CreateNoWindow = true;
			processInfo.RedirectStandardOutput = true;

			try {
				Process gconftool2 = Process.Start (processInfo);
				output = gconftool2.StandardOutput.ReadToEnd () ?? bool.FalseString;
				gconftool2.WaitForExit ();
				gconftool2.Close ();
			} catch (System.IO.FileNotFoundException) {}

			try {
				enabled = bool.Parse (output);
			} catch (FormatException) {}
				
			return enabled;
		}