This patch is related to bug #24106, except it allows the atk portion of the AT-SPI/D-Bus implementation to co-exist on the file system with the AT-SPI/CORBA files. A summary of the changes is as follows: * Wherever we use the string 'spi', a '2' is appended. For example, -gtkmodule_LTLIBRARIES = libspiatk.la +gtkmodule_LTLIBRARIES = libspi2atk.la * The pyatspi implementation is installed under a 'pyatspi2/pyatspi' directory and a pyatspi.pth file is installed. This pyatspi.pth file performs the following trickery to pre-pend sys.path with the pyatspi2 directory if the "/desktop/gnome/interface/accessibility2" gconf setting is set: import commands, sys; a = commands.getoutput('gconftool-2 --get /desktop/gnome/ interface/accessibility2'); (a == 'true') and sys.path.insert(0, '@prefix@/lib/p ython@PYTHON_VERSION@/site-packages/pyatspi2') The general notion is to unset /desktop/gnome/interface/accessibility to turn off the CORBA implementation and set /desktop/gnome/interface/accessibility2 to turn on the new implementation. gconftool-2 --set /desktop/gnome/interface/accessibility --type bool false gconftool-2 --set /desktop/gnome/interface/accessibility2 --type bool true Note also that creating/setting a new gnome_settings_daemon property can be useful. This tells it to load gail:spi2atk as GTK_MODULES if the /desktop/gnome/interface/accessibility2 setting is set: gconftool-2 --set /apps/gnome_settings_daemon/gtk-modules/gail:spi2atk --type string /desktop/gnome/interface/accessibility2 When we ultimately decide to completely drop CORBA for GNOME 3.0, we'll need to make the following changes: * Drop the '2' suffix. The occurrences of this can be found by running the following command on a freshly cloned space: find . -type f | xargs egrep -i spi2 * No longer put pyatspi under a pyatspi2/pyatspi directory. * Consider renaming spi2atk to atk-bridge so as to allow Firefox and other toolkits that hardcode atk-bridge into their a11y implementation to work without needing to be modified.
Created attachment 29802 [details] [review] Patch
Hi. I dont really understand the first item in this change: -gtkmodule_LTLIBRARIES = libspiatk.la +gtkmodule_LTLIBRARIES = libspi2atk.la libspiatk (at-spi2) doesn't conflict with libatk-bridge (at-spi). Can you explain why the added 2 is necessary in this case?
(In reply to comment #2) > Hi. I dont really understand the first item in this change: > -gtkmodule_LTLIBRARIES = libspiatk.la > +gtkmodule_LTLIBRARIES = libspi2atk.la > > libspiatk (at-spi2) doesn't conflict with libatk-bridge (at-spi). > Can you explain why the added 2 is necessary in this case? It was mainly for consistency. I believe this ended up being the sole spot where we saw spi without the "2".
Created attachment 29984 [details] [review] Patch to rename bridge back to atk-bridge and allow relocation of pyatspi and GTK module This patch: 1) Renames the bridge back to atk-bridge so that applications that hard code the bridge module name (e.g., Firefox, OOo, and gdm all hardcode 'atk-bridge') can use it. 2) Sets up an autostart *.desktop file that connects to gnome-session at initialization time, telling it to set GTK_PATH so as to pick up the atk-bridge module if it has been relocated. This *.desktop file is only run if the /desktop/gnome/interface/atspi-dbus gconf key is set. 3) Allows the pyatspi installation to be relocated via a PYATSPI_SUBDIR environment variable that is picked up during the autogen/configure phase. 4) If (and only if) pyatspi is relocated via the PYATSPI_SUBDIR environment variable, a pyatspi-dbus.pth file is installed in the system's python directory and it modifies sys.path to put the D-Bus-based pyatspi ahead of the CORBA-based pyatspi in sys.path, but only if the /desktop/gnome/interface/atspi-dbus gconf key is set. Note that the existing /desktop/gnome/interface/accessibility value is still used to determine if the GTK+ a11y modules (e.g., gail:atk-bridge) should be loaded or not. NOTE - after applying the patch, if you want to build/install at-spi2-atk in a way that allows it to co-exist with the CORBA/Bonobo-based at-spi, you can do this: PYATSPI_SUBDIR=pyatspi-dbus ./autogen.sh --prefix=/opt/atspi-dbus --includedir=/opt/atspi-dbus/include --libdir=/opt/atspi-dbus/lib --exec-prefix=/usr --datarootdir=/usr/share This puts *only* the *.desktop and pyatspi-dbus.pth files under /usr. The rest of the files end up under /opt/atspi-dbus. Then, when you set /desktop/gnome/interface/atspi-dbus to True, the *.desktop file will set GTK_PATH in gnome-session, causing every app to find the D-Bus atk-bridge before the CORBA atk-bridge. The /desktop/gnome/interface/atspi-dbus key also has the impact of making the pyatspi-dbus.pth file tell python to find the D-Bus pyatspi before the CORBA pyatspi. A nice effect of this patch and the one for bug #24106 is that it keeps they GNOME-specific stuff isolated to atk-bridge.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.