GNOME Bugzilla – Bug 121667
Add sysconfdir in gtk+-2.0.pc.in
Last modified: 2011-02-04 16:16:03 UTC
Standalone inputmethod needs to detect where the gtk.immodules in the system is. In Red Hat Linux, it is /etc/gtk-2.0/gtk.immodules but it is configuarable at build and different among distros or flavors. So gtk+ needs to provide the way to know the sysconfdir. --- gtk+-2.0.pc.in.orig 2003-09-07 20:08:17.000000000 +0900 +++ gtk+-2.0.pc.in 2003-09-07 20:09:42.000000000 +0900 @@ -3,6 +3,7 @@ libdir=@libdir@ includedir=@includedir@ target=@gdktarget@ +sysconfdir=@sysconfdir@/gtk-2.0 gtk_binary_version=@GTK_BINARY_VERSION@ gtk_host=@host@
Oops, sysconfdir should be @sysconfdir@, exactly. --- gtk+-2.0.pc.in.orig 2003-09-07 20:08:17.000000000 +0900 +++ gtk+-2.0.pc.in 2003-09-07 20:09:42.000000000 +0900 @@ -3,6 +3,7 @@ libdir=@libdir@ includedir=@includedir@ target=@gdktarget@ +sysconfdir=@sysconfdir@ gtk_binary_version=@GTK_BINARY_VERSION@ gtk_host=@host@
BTW, wouldn't it be a good idea if GTK, in addition to the $(sysconfdir)/gtk-2.0/gtk.immodules file, would read any files there might be in a $(sysconfdir)/gtk-2.0/gtk.immodules.d directory? That way, when installing standalone input modules you wouldn't need to run gtk-query-immodules-2.0. Ditto for gdk-pixbuf.loaders and pango.modules, of course.
That'll be a good idea, but it will ignore loading order of some conflictable immodule. The last field of the immodule entry is the locale which the immodule is used as default. But you can set multiple immodule as the default. For example: "/usr/lib/gtk-2.0/2.2.0/immodules/im-ja.so" "im-ja" "Japanese" "im-ja" "/usr/share/locale" "ja" "/usr/lib/gtk-2.0/2.2.0/immodules/im-xim.so" "xim" "X Input Method" "gtk+" "/usr/share/locale" "ko:zh" "/home/nakai/GNOME-CVS/im-canna/im-canna.la" "Canna" "Canna" "gtk+" "" "ja" With the current single file, gtk+ will select the first entry im-ja and users can change the order easily. But with the gtk.immodule.d style, gtk+ will always select the first one in the alphabetical order. gdk-pixbuf.loaders and pango.modules might not have this problem, though.
Also see bug 126328, which discusses the same problem for gdk-pixbuf.
I think we should just fix the problem once as described in bug 126328 *** This bug has been marked as a duplicate of 126328 ***