[at-spi] Bug 565451. Fix compile error in libspi/listener.c.



commit e778f16f8ea821cbea7822f90401bfea0d68605c
Author: Li Yuan <li yuan sun com>
Date:   Thu Nov 26 18:04:00 2009 +0800

    Bug 565451. Fix compile error in libspi/listener.c.

 libspi/listener.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/libspi/listener.c b/libspi/listener.c
index c969483..f7df3dd 100644
--- a/libspi/listener.c
+++ b/libspi/listener.c
@@ -29,6 +29,7 @@
 
 #include <config.h>
 #include <libspi/listener.h>
+#include "spi-private.h"
 
 /* Our parent Gtk object type */
 #define PARENT_TYPE BONOBO_TYPE_OBJECT
@@ -36,6 +37,8 @@
 /* A pointer to our parent object class */
 static GObjectClass *spi_listener_parent_class;
 
+int _dbg = 0;
+
 /*
  * Implemented GObject::finalize
  */
@@ -64,7 +67,7 @@ impl_notify_event (PortableServer_Servant     servant,
   fprintf (stderr, "source name: '%s'\n",
            Accessibility_Accessible__get_name(e->source, ev));
   if (ev->_major != CORBA_NO_EXCEPTION) {
-           DBG (2, g_warning ("Accessibility app error: exception during event notification: %s\n"),
+           DBG (2, g_warning ("Accessibility app error: exception during event notification: %s\n",
 		CORBA_exception_id(ev)));
   }
   /*
@@ -94,8 +97,16 @@ spi_listener_class_init (SpiListenerClass *klass)
 }
 
 static void
+spi_listener_set_debug (const char *debug_flag_string)
+{
+  if (debug_flag_string)
+    _dbg = (int) g_ascii_strtod (debug_flag_string, NULL);
+}
+
+static void
 spi_listener_init (SpiListener *listener)
 {
+  spi_listener_set_debug (g_getenv ("AT_SPI_DEBUG"));
 }
 
 BONOBO_TYPE_FUNC_FULL (SpiListener,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]