Re: GTK+ modules loading changes



On Tue, 2010-10-26 at 17:52 +0200, Piñeiro wrote:
> From: Bastien Nocera <hadess hadess net>
> 
> Hi, thanks for the announce. But I have some doubts.
> 
> > This will affect you if you install a GTK+ module.
> > 
> > The latest version of gnome-settings-daemon[1] will load GTK+ modules
> > using .desktop files in the
> > $(libdir)/gnome-settings-daemon-3.0/gtk-modules/ directory.
> > 
> > The desktop files are fairly simple:
> > [GTK Module]
> > Name=My module
> > Description=My super GTK module
> > X-GTK-Module-Name=supermodule
> 
> Ok, so explaining that in a rough way, this is equivalent to set the
> env var GTK_MODULES to the modules you want.

The changes I documented are unrelated to the env var.

> > This will make the libsupermodule.so GTK+ module be loaded by GTK+.
> > 
> > If you need the module to be conditionally loaded, you'd add those 2
> > lines to your .desktop file:
> > X-GTK-Module-Enabled-Schema=org.gnome.desktop.interface
> > X-GTK-Module-Enabled-Key=accessibility
> 
> And going on with the rough way, this is equivalent to fill
> GTK_MODULES in a conditional way.

This is equivalent to using the GConf stuff we had before, not the
GTK_MODULES env var.

> > With your own schema and key there, as you would expect. Note that the
> > schema and key *must* be defined by gnome-settings-daemon or one of its
> > dependencies (such as gsettings-desktop-schemas), or shipped with your
> > module.
> > 
> > Finally, if you require 2 modules to be loaded in a certain order,
> > you'll need to define the X-GTK-Module-Name as "module1:module2". This
> > is the case for the a11y modules.
> 
> Fine.
> 
> And now the question (related with the order). In some cases a
> specific application would require to load his own accessibility
> module add-on. Right now Firefox is the poster boy (so instead of
> gail:atk-bridge, firefox uses gail:<firefox-thing>:atk-bridge).
> 
> In order to support this, it is used the envvars NO_GAIL and
> NO_AT_BRIDGE. In order to support this atk-bridge and gail has code in
> his module_init code preventing this.
> 
> As far as I see this should be still working. But to be sure... could
> you confirm it? Any advice to the current procedure ? (the current
> procedure is a hack). This question arised after read this "Adds the
> disabled-gtk-modules..." [7]
> 
> More info about the Firefox loading modules mess here [5]

Those will still work as well, or as badly, as before.

The only thing we changed is where the GTK modules list, which is
exported through XSettings, is loaded from. I haven't changed anything
in GTK+ itself.

> PS: I have a provisional patch implementing the accessibility loading
> modules on gnome shell using a similar approach, including checking a
> gconf property [6], I guess this should be totally moved to gsettings.
> 
> > I already added patches for at-spi[2], at-spi2-atk[3], and filed a bug
> > for gnome-packagekit[4]. If somebody wants to do that for libcanberra,
> > go for it.
> 
> I think that at-spi2-atk bugs are still on freedesktop [8], I will ask
> Mike Gorse about it.

OK.

The only big change is that enabling a11y in GSettings will now change
the GTK+ modules list on the fly. I'd expect quite a few bits of code
breaking if they monitor the list of GTK+ modules at run-time.



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