summaryrefslogtreecommitdiff
path: root/crashrep/source/unx/main.cxx
diff options
context:
space:
mode:
authorHennes Rohling <hro@openoffice.org>2003-06-10 12:40:41 +0000
committerHennes Rohling <hro@openoffice.org>2003-06-10 12:40:41 +0000
commit58f319d4c472c24cbf1a08bcbad2f9b3729ae7a4 (patch)
tree06cd4bc2f5b2631554a83e01407ed2debb5a7074 /crashrep/source/unx/main.cxx
parent9694a798cd745ba08e92c76fe45dfa07eccb4a6b (diff)
#110104# Don't start if gnome accessibility is enabled
Diffstat (limited to 'crashrep/source/unx/main.cxx')
-rwxr-xr-xcrashrep/source/unx/main.cxx27
1 files changed, 24 insertions, 3 deletions
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index 31e31efa1684..c32d0ccf7499 100755
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: main.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hro $ $Date: 2003-06-10 13:09:27 $
+ * last change: $Author: hro $ $Date: 2003-06-10 13:40:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1061,11 +1061,32 @@ static bool setup_version()
return 0 != g_strReportServer.length();
}
+// Use gconftool-2 to determine if gnome accessiblity is enabled
+
+static bool get_accessibility_state()
+{
+ bool bAccessible = false;
+ FILE *fin = popen( "gconftool-2 -g /desktop/gnome/interface/accessibility", "r");
+
+ if ( fin )
+ {
+ char buffer[sizeof("true")];
+
+ bAccessible = fgets( buffer, sizeof(buffer), fin ) && 0 == strcmp( buffer, "true" );
+
+ fclose( fin );
+ }
+
+ return bAccessible;
+}
+
int main( int argc, char** argv )
{
freopen( "/dev/null", "w", stderr );
- if ( setup_version() )
+ // Don't start if accessiblity is enabled or report server is not given
+
+ if ( setup_version() && !get_accessibility_state() )
{
gtk_set_locale ();
gtk_init (&argc, &argv);