After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743917 - Gtk modules must be compatible with both gtk 2 and 3
Gtk modules must be compatible with both gtk 2 and 3
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-02-03 10:18 UTC by Lars Karlitski
Modified: 2015-02-04 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for loading gtk3-only modules (2.58 KB, patch)
2015-02-03 10:18 UTC, Lars Karlitski
committed Details | Review
Add support for loading gtk2-only modules (2.56 KB, patch)
2015-02-03 10:23 UTC, Lars Karlitski
committed Details | Review

Description Lars Karlitski 2015-02-03 10:18:40 UTC
Gtk prints a message on every start of applications when it cannot find a
module. Thus, the only sane way to create a module that only works on gtk 2 or
3 is to create a no-op module for the other one.

Fix that by introducing GTK3_MODULES and GTK2_MODULES which are read in
addition to GTK_MODULES.

I'm aware that we eventually want to move away from supporting modules at all.
However, this would help us transitioning away from one of our modules for
gtk 3, but keep it for 2 for the time being.
Comment 1 Lars Karlitski 2015-02-03 10:18:43 UTC
Created attachment 296004 [details] [review]
Add support for loading gtk3-only modules

Introduce GTK3_MODULES environment variable for modules that don't work
in gtk3. The list of modules is now $GTK3_MODULES:$GTK_MODULES.
Comment 2 Lars Karlitski 2015-02-03 10:23:26 UTC
Created attachment 296005 [details] [review]
Add support for loading gtk2-only modules

Same in green for gtk 2.
Comment 3 Matthias Clasen 2015-02-03 14:09:08 UTC
I can see how GTK2_MODULES can make sense for transitioning away, but why add GTK3_MODULES ?
Comment 4 Lars Karlitski 2015-02-03 14:27:38 UTC
(In reply to comment #3)
> I can see how GTK2_MODULES can make sense for transitioning away, but why add
> GTK3_MODULES ?

I agree and was unsure whether I should include the patch at all, but did so for symmetry.

Are you okay with the gtk2 one?
Comment 5 Matthias Clasen 2015-02-03 14:51:09 UTC
Actually, I think I agree with the symmetry argument.
Comment 6 Lars Karlitski 2015-02-04 12:46:21 UTC
Comment on attachment 296005 [details] [review]
Add support for loading gtk2-only modules

Attachment 296005 [details] pushed as 436fe38 - Add support for loading gtk2-only modules
Comment 7 Lars Karlitski 2015-02-04 12:52:44 UTC
Attachment 296004 [details] pushed as 3e81653 - Add support for loading gtk3-only modules