2002-03-13 Michael Meeks <michael@ximian.com>
authormichael <michael@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 13 Mar 2002 16:05:22 +0000 (16:05 +0000)
committermichael <michael@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 13 Mar 2002 16:05:22 +0000 (16:05 +0000)
* atk-bridge/bridge.c (atk_bridge_init): don't register
if we're in a bonobo-component, rather than a bonobo app.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@251 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
atk-bridge/bridge.c

index 57a7491..70aa68c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-03-13  Michael Meeks  <michael@ximian.com>
 
+       * atk-bridge/bridge.c (atk_bridge_init): don't register
+       if we're in a bonobo-component, rather than a bonobo app.
+
+2002-03-13  Michael Meeks  <michael@ximian.com>
+
        * atk-bridge/bridge.c (gtk_module_init): split
        out body to (atk_bridge_init): here, since otherwise
        we get symbol conflicts and oddness when invoked
index d9b2e71..a3e5653 100644 (file)
@@ -32,6 +32,8 @@
 #include "accessible.h"
 #include "application.h"
 
+#include <bonobo-activation/bonobo-activation-register.h>
+
 #undef SPI_BRIDGE_DEBUG
 
 static CORBA_Environment ev;
@@ -86,6 +88,15 @@ atk_bridge_init (gint *argc, gchar **argv[])
       g_error ("Could not initialize Bonobo");
     }
 
+  /*
+   *   We only want to enable the bridge for top level
+   * applications, we detect bonobo components by seeing
+   * if they were activated with the intention of extracting
+   * an impl. by IID - very solid.
+   */
+  if (bonobo_activation_iid_get ())
+         return 0;
+
   CORBA_exception_init(&ev);
 
   registry = bonobo_activation_activate_from_id (