GNOME Bugzilla – Bug 678315
Remove the bridge module for Gtk+ 3
Last modified: 2012-08-21 14:56:47 UTC
Gtk+ now complains when it finds the Atk Bridge amongst its modules, stating it's not being loaded and we should try not to load it. Thus it doesn't seem to be needed any more. (Right?)
Created attachment 216671 [details] [review] propsed patch Assuming this can really be removed..... (From testing it seems that it can, but I would not mind a sanity check.)
Comment on attachment 216671 [details] [review] propsed patch This looks okay to me. >From bd4d7d2422c2b2174aaf30a97506c5976ed83449 Mon Sep 17 00:00:00 2001 >From: Joanmarie Diggs <jdiggs@igalia.com> >Date: Mon, 18 Jun 2012 09:01:09 -0400 >Subject: [PATCH] Fix for Bug 678315 - Remove the bridge module for Gtk+ 3 > >--- > Makefile.am | 2 +- > atk-adaptor/Makefile.am | 2 +- > atk-adaptor/gtk-3.0/Makefile.am | 5 ---- > atk-adaptor/gtk-3.0/module.c | 45 --------------------------------- > configure.ac | 2 -- > schemas/Makefile.am | 12 --------- > schemas/org.a11y.atspi.gschema.xml.in | 10 -------- > 7 files changed, 2 insertions(+), 76 deletions(-) > delete mode 100644 atk-adaptor/gtk-3.0/Makefile.am > delete mode 100644 atk-adaptor/gtk-3.0/module.c > delete mode 100644 schemas/Makefile.am > delete mode 100644 schemas/org.a11y.atspi.gschema.xml.in > >diff --git a/Makefile.am b/Makefile.am >index 7cdbd54..f52bfeb 100644 >--- a/Makefile.am >+++ b/Makefile.am >@@ -1,4 +1,4 @@ >-SUBDIRS=dbind droute atk-adaptor po schemas >+SUBDIRS=dbind droute atk-adaptor po > > gtk_modulesdir = $(libdir)/gnome-settings-daemon-3.0/gtk-modules/ > gtk_modules_DATA = at-spi2-atk.desktop >diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am >index 48b243a..d51778d 100644 >--- a/atk-adaptor/Makefile.am >+++ b/atk-adaptor/Makefile.am >@@ -1,4 +1,4 @@ >-SUBDIRS= adaptors . gtk-2.0 gtk-3.0 >+SUBDIRS= adaptors . gtk-2.0 > > lib_LTLIBRARIES = libatk-bridge-2.0.la > >diff --git a/atk-adaptor/gtk-3.0/Makefile.am b/atk-adaptor/gtk-3.0/Makefile.am >deleted file mode 100644 >index a67823d..0000000 >--- a/atk-adaptor/gtk-3.0/Makefile.am >+++ /dev/null >@@ -1,5 +0,0 @@ >- gtkmoduledir = $(libdir)/gtk-3.0/modules >- >-include $(top_srcdir)/atk-adaptor/Makefile.include >- >-libatk_bridge_la_SOURCES = module.c >diff --git a/atk-adaptor/gtk-3.0/module.c b/atk-adaptor/gtk-3.0/module.c >deleted file mode 100644 >index 97929d9..0000000 >--- a/atk-adaptor/gtk-3.0/module.c >+++ /dev/null >@@ -1,45 +0,0 @@ >-/* >- * AT-SPI - Assistive Technology Service Provider Interface >- * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) >- * >- * Copyright 2008, 2009 Codethink Ltd. >- * Copyright 2001, 2002, 2003 Sun Microsystems Inc., >- * Copyright 2001, 2002, 2003 Ximian, Inc. >- * >- * This library is free software; you can redistribute it and/or >- * modify it under the terms of the GNU Library General Public >- * License as published by the Free Software Foundation; either >- * version 2 of the License, or (at your option) any later version. >- * >- * This library is distributed in the hope that it will be useful, >- * but WITHOUT ANY WARRANTY; without even the implied warranty of >- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- * Library General Public License for more details. >- * >- * You should have received a copy of the GNU Library General Public >- * License along with this library; if not, write to the >- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, >- * Boston, MA 02111-1307, USA. >- */ >- >-#define _GNU_SOURCE >-#include "config.h" >- >-#include <gmodule.h> >-#include <atk-bridge.h> >- >-/*---------------------------------------------------------------------------*/ >- >-int >-gtk_module_init (gint * argc, gchar ** argv[]) >-{ >- return atk_bridge_adaptor_init (argc, argv); >-} >- >-gchar* >-g_module_check_init (GModule *module) >-{ >- g_module_make_resident (module); >- >- return NULL; >-} >diff --git a/configure.ac b/configure.ac >index 4de0516..081aa23 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -111,9 +111,7 @@ AC_CONFIG_FILES([Makefile > atk-adaptor/Makefile > atk-adaptor/adaptors/Makefile > atk-adaptor/gtk-2.0/Makefile >- atk-adaptor/gtk-3.0/Makefile > po/Makefile.in >- schemas/Makefile > ]) > > AC_OUTPUT >diff --git a/schemas/Makefile.am b/schemas/Makefile.am >deleted file mode 100644 >index 116a81c..0000000 >--- a/schemas/Makefile.am >+++ /dev/null >@@ -1,12 +0,0 @@ >-gsettings_SCHEMAS = org.a11y.atspi.gschema.xml >- >-org.a11y.atspi.gschema.xml: org.a11y.atspi.gschema.xml.in Makefile >- $(AM_V_GEN) sed -e "s|@libdir[@]|$(libdir)|" $< > $@ >- >-CLEANFILES = org.a11y.atspi.gschema.xml >- >-@GSETTINGS_RULES@ >- >-EXTRA_DIST = \ >- $(gsettings_SCHEMAS) \ >- $(patsubst %,%.in,$(gsettings_SCHEMAS)) >diff --git a/schemas/org.a11y.atspi.gschema.xml.in b/schemas/org.a11y.atspi.gschema.xml.in >deleted file mode 100644 >index 765870b..0000000 >--- a/schemas/org.a11y.atspi.gschema.xml.in >+++ /dev/null >@@ -1,10 +0,0 @@ >-<?xml version="1.0"?> >-<schemalist> >- <schema id="org.a11y.atspi" path="/org/a11y/atspi/"> >- <key name="atk-bridge-location" type="ay"> >- <default>b'@libdir@/gtk-3.0/modules/libatk-bridge.so'</default> >- <summary>Atk-bridge location</summary> >- <description>The path to the atk-bridge module; useful for non-GTK applications/toolkits that want to load it.</description> >- </key> >- </schema> >-</schemalist> >-- >1.7.9.5 >
Comment on attachment 216671 [details] [review] propsed patch Undoing the a-c-n flag. I have had subsequent worries about this. And there have been related questions. We need to sort everything out before this gets committed.
Keeping discussions/conclusions in one place.... <@API> but about that gtk3 module bridge <@API> as I said, at this moment, with that module <@API> Unity would require to change a little their a11y initialization <@API> so, advantages of the module: <@API> * a little change <@API> * not required a new dependency <@API> advantages of remove the module, so use the library: <@API> * although the change is a little bigger, the final code of initializating a11y is smaller <@API> * is what any other toolkits and applications are doing <@API> TheMuso, as you are at the channel <mgorse> TheMuso was ready to send a patch to Unity anyhow, but I wasn't sure if the API was going to change, so I just temporarily added back the function that was taken out. But maybe the atk_bridge_adaptor_init function doesn't need to go away anyhow, so might make the most sense to just patch it to use it, for now anyway <@API> did you take a look to the mail that I sent, to the bug about not a mixed environment ? <@API> mgorse, as I was saying on the meeting <@API> I think that that method doesn't require to change <@API> if in the end the bridge is an object <@API> I guess that it will be a singleton <@API> so something like atk_bridge_get_instance <@API> or atk_bridge_get_bridge <@API> and maintain the _init like that <@API> would be enough <@API> you could still access to the bridge, and you would not need to change the API <@API> and btw <@API> TheMuso, how receptive do you think Unity developers will be to respect a new dependency? <@API> well, it seems that australia is really far far away <@API> so as at the meeting we wanted a conclusion, and as far as we know <@API> unity is the one that still don't know how to do the move <@API> what about "not commit that patch (so remove atk-spi2-atk gtk3 module) until unity resolve this issue" <@joanie> fine with me
I'll be sending a patch to the unity developers to get unity to stop using the GTK 3 module for atk, and will patch unity to use libatk-bridge directly. I'd rather not keep a delta around just to satisfy unity, as its more work in the longer term.
I should add that I will hold off sending any patch until I know you have finalized the bridge init API.
(In reply to comment #6) > I should add that I will hold off sending any patch until I know you have > finalized the bridge init API. One of the reasons to discuss if the API could change in the future, was the comment from Bastien suggesting that the initialization method could return a bridge object. But as I said on IRC: Jun 28 17:22:53 <API> mgorse, as I was saying on the meeting Jun 28 17:23:00 <API> I think that that method doesn't require to change Jun 28 17:23:09 <API> if in the end the bridge is an object Jun 28 17:23:25 <API> I guess that it will be a singleton Jun 28 17:23:43 <API> so something like atk_bridge_get_instance Jun 28 17:23:53 <API> or atk_bridge_get_bridge Jun 28 17:24:03 <API> and maintain the _init like that Jun 28 17:24:08 <API> would be enough Jun 28 17:24:28 <API> you could still access to the bridge, and you would not need to change the API So the init method can be as it is right now, and any other feature can be solved adding new API. I think that this is the safer solution, as gtk+ and gnome-shell is already using that API (so changing it would mean fixing then both), and would also allow to move forward Unity adaptation. (In reply to comment #5) > I'll be sending a patch to the unity developers to get unity to stop using the > GTK 3 module for atk, and will patch unity to use libatk-bridge directly. I'd > rather not keep a delta around just to satisfy unity, as its more work in the > longer term. Just in case it is useful, I have been toying with that, and I got Unity working with the atk-bridge library (so using atk_bridge_adaptor_init) instead of loading the at-spi2-atk gtk module (tested with Orca): https://code.launchpad.net/~apinheiro/unity/a11y-use-atk-bridge-library https://code.launchpad.net/~apinheiro/unity/a11y-a11y-always-on The first one still checks the value of 'toolkit-accessibility'. So it just replace the call to load the at-spi2-atk module with atk_bridge_adaptor_init. The second one doesn't check that gsetting value anymore (so it is more similar to what gnome-shell does these days). If we agree on the API, I can just send a merge proposal.
Thanks. I too have a branch that I have tested. I completely removed all gsettings code, aidn cl atk_bridge_adaptor_init, since I think its best we go the always on route similar to GTK and GNOME shell as you say. Feel free to send your proposal since your branch is already on launchpad, and there is no point in duplicating work unnecessarily.
On Tue, Jul 03, 2012 at 04:04:44AM EST, at-spi wrote: > https://code.launchpad.net/~apinheiro/unity/a11y-use-atk-bridge-library > https://code.launchpad.net/~apinheiro/unity/a11y-a11y-always-on I've just realised that we also need to make the same change in the panel service code as well, and we need to make note of the extra dependency in the HACKING file as well. In light of these extra bits that are needed, I'll take your always-on branch as a base, and make the extra changes required to the panel service and build/documentation where appropriate and file a merge proposal myself. Thanks for your help and work with this.
(In reply to comment #9) > I've just realised that we also need to make the same change in the panel > service code as well, and we need to make note of the extra dependency in the > HACKING file as well. Updated that branch. I have made the same changes to the panel service, and updated HACKING. I also readded that extra atk_get_root. It seems that sometimes it is true that it is required, probably due a race condition. Something to investigate. So now, it is only pending to know if we agreed on setting the current API (see comment 7), as definitive. Mike?
I think that we should commit this. API freeze goes into effect today anyhow, so atk_bridge_adaptor_init is staying in.
(In reply to comment #11) > I think that we should commit this. > API freeze goes into effect today anyhow, so atk_bridge_adaptor_init is staying > in. And after all, the main concerns were solved (specifically Unity, although the branch is not still committed). So just in case my vote is relevant on this decision, +1 for me.
The branch may not be committed for unity, but the unity package in quantal is not purely unity trunk so far as I know, so I should be able to get it patched in the package at least. I'll get the unity package maintainers onto it so go ahead and do this.
I've just committed the patch: 6b63c5.