Re: themes + engines in /usr/local
- From: Magnus Bergman <magnusbe algonet se>
- To: gtk-devel-list gnome org
- Cc: suk <suk artax karlin mff cuni cz>
- Subject: Re: themes + engines in /usr/local
- Date: Mon, 16 Jun 2003 22:02:27 +0000
On Wed, 21 May 2003 01:15:17 +0200
suk <suk artax karlin mff cuni cz> wrote:
> Gtk has precompiled path somewhere inside and if gtk tries to find theme
> it uses this path. The problem is worse because themes are located
> separately from engines and engines location is coupled with locating
> all other dll modules!
I'm familiar with this problem since I always install every package with a different prefix. The problem (as I see it) can be generalised to:
A package witch searches for it's files in only one path can not use additional files from other packages installed in different paths.
In the GTK+-engine case I solved it by making symlinks from the engines into GTK's engine directory. But I'm not perfectly happy with this solution and I guess it's not even possible in some cases.
The right way to solve this is IMHO the way it's done in for example bonobo-activation: to have a config file in PREFIX/etc where additional paths can be added. Separate options engine paths and pixbuf-loader paths perhaps...
>
> _gtk_get_module_path("engines"); // get_module_path in gtkmain.c
>
> gtk_rc_get_default_files( );
>
> So two points how it behaves.
> 1) If I install theme into /usr/local/..
> theme is in /usr/local/share/themes/...
> engine is in /usr/local/lib/gtk-2.0/2.2.0/engines/...
> I will not see it in gnomecc and programs from distribution cannot
> use it.
>
> So lets assume all themes and engines are in /usr/share and /usr/lib
>
> 2) If I have installed gtk compiled by me ( it's installed in
> /usr/local, because I don't want to spoil debian dist with it)
> then my programs cannot use themes, because they are link against
> gtk in /usr/local/ and
>
> gtk_rc_get_theme_dir() returns /usr/local/share/themes
>
> gtk_rc_get_default_files( ) returns
> /usr/local/etc/gtk-2.0/gtkrc and
> ~/.gtkrc-2.0
>
> _gtk_get_module_path("engines"); returns 4 variants for each of
> ~/.gtk-2.0/.../engines and
> /usr/local/lib/gtk-2.0/.../engines
>
> The only one i can set in program is gtk_rc_set_default_files( ),
> which will of course not help, because gtk will find theme, but not engine.
>
>
> User can tweak it changind variables GTK_PATH or GTK_EXE_PREFIX.
> But those two are changing path not only to engines, but to all
> loadable modules and I believe this is wrong. Ironicly locate the engine
> is not that hard task. I think that requiring ordinary user to tweak
> some variables because of this is insolence.
>
>
> solution can be:
> if program can set its gtk_rc_set_default_files(...),
> why not give him possibility to change gtk_rc_set_engine_path(...)
>
> not gtk_module_path
> No, I don't want to change module_path !! Because it
> can break pixbuf-loaders etc.
> So I think, that engine path can be derived from
> 1) static gchar** get_module_path() as is currently
> 2) from gtkrc path . If we found gtkrc in /usr/loca/share/themes/ ,
> we will try if engine is in /usr/local/lib/....
> - what to do if gtkrc is found in users ~/gtkrc-..
> and in that gtkrc is still unknown engine ?
> 3) and maybe from some program settable point as i've said using eg.
> gtk_rc_set_engine_path()
>
> The order of evaluation should be 3),2),1) or 3),1),2)
> This means that at startup gtk_rc_engine_path will be "", so it will
> pass through it, and then most cases will be catched by 2) or 1).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]