On 26/07/06, Bill Haneman <[EMAIL PROTECTED]> wrote:
> On Tue, 2006-07-25 at 19:20, James Henstridge wrote:
>
> >
> > Havoc's summary at the bottom of his email says why the current
> > gnome_program_init() code is a hack:
> >
> > > > In summary:
> > > >   - if every libgtk app should do something, get that code in gtk
> (in the olden days this was not acceptable to the gtk+ team, but I agree
> that it makes sense to put it there now)
> > > >   - if every libgnome-using app should do something, get that code in
> > > >     libgnome
> this is what the gnome_program_init code does now (and it was indeed in
> libgnome)
> > > >   - if only a particular app should do something, get that code in that
> > > >     app
> yes, that is what happens now for such apps.
> > Assuming that we want accessibility turned on for all GTK programs,
> > then performing that initialisation in a libgnome routine is
> > suboptimal since not every app links to libgnome (e.g. metacity).  The
> > fact that the current initialisation code is in gnome_program_init()
> > means that cut-n-paste is necessary.
>
> NO: comments like this are why the misunderstanding flared up.  The
> libgnome code is NOT a hack (or at least it clearly was not a hack when
> it was written!) for several reasons including the one you give below.
> gnome_program_init() look to be exactly the right place for this code
> according to Havoc's "second category" above.

Putting the initialisation in gnome_program_init() may have been the
best solution at the time it was added, but it was still sub-optimal
because it only fixed the problem for a subset of the applications.

I think you'll agree that we want a11y enabled for all GTK
applications, and the best way to do this is to make the
initialisation happen in gtk_init().  The gtk-modules XSETTING makes
this possible.  The proposed method of getting things loaded is:

1. gnome-settings-daemon is modified to set the gtk-modules XSETTING,
based on the existing gconf key.  If accessibility is enabled, it sets
it to "libgail:libatk-bridge".

2. in gtk_init(), GTK sees that the gtk-modules XSETTING is enabled,
and loads the listed modules.

3. in the libgnomeui specific gnome_program_init() code, check to see
if the accessibility gconf key is set and load libgail-gnome.

This setup should make sure that all GTK applications load the GTK
accessibility modules, and all libgnomeui applications load the
libgnomeui-specific accessibility modules.


> Cutting and pasting the libgnome a11y code into other modules is that
> part that's broken.

Yes.  And the cut-n-paste is necessary because of where the code is.


> > If the initialisation code is put in the right place, it only needs to
> > be done once (the suggested solution being to make
> > gnome-settings-daemon set the gtk-modules XSETTING that libgtk now
> > watches).
>
> The initialization code needs access to the xsetting; in the
> pre-XSETTING days, this meant GTK_MODULES for pure-gtk+ and gconf for
> 'gnome' progs.
>
> It makes sense for gtk+ apps to do this via the xsetting now, instead of
> the env variable, that would improve the situation.  However this will
> not work for programs in the second category ("libgnome using apps").
> That's why the gnome_program_init code in libgnome has a11y loading
> logic...

libgnome/libgnomeui using programs _are_ GTK programs.  The XSETTING
should be sufficient to load the basic GTK accessibility modules.  The
idea is to only do the libgnomeui-specific module loading in
gnome_program_init().  Why don't you think this would work?

James.
_______________________________________________
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to