[Gpephone-devel] Pixmap location
Florian Boor
florian.boor at kernelconcepts.de
Mon Aug 6 13:57:36 CEST 2007
Hi,
WANG Gang RD-ILAB-PEK schrieb:
> applications: provide pixmap files, define the directory
> structure of to-be-install files.
>
> gpe-applauncher: find the pixmap files in resource directories.
> Rules of pixmap locations: for themable pixmap files (eg. icons,
> background images), they should be stored in <resource
> prefix>/share/themes/<current theme>/ or <resource
> prefix>/share/themes/default/. For non-themable pixmap files, they
> should be placed in <resource prefix>/share/pixmaps.
could you explain the concept of this resource prefix? Usually you have three
locations for these files:
$PREFIX/share/pixmaps: For thing of general interest such a default application
icon.
$PREFIX/share/themes/default/<application name>/ For the defaults of all
themeable pixmaps and other theme components which come with the application.
$PREFIX/share/themes/<theme name>/<application name>/ For alternate resources
provided by themes.
This should cover all of our requirements:
- Its easy to understand because its a simple concept and quite common among
UNIX applications.
- It makes sure that the application always finds its defaults if they are
installed correctly.
- It reduces the amount of slow filesystem operations to search for files.
In addition to this gpe-applauncher and gpe-phonepanel are able accept custom
files for every themeable pixmap using libsettings. That's way more complex that
it should be - we need to make these things fast and easy to understand.
> For gpe-applauncher, the search for a pixmap file goes through the
> following process:
>
> 1. find it in <resource prefix>/share/themes/<current theme>/
>
> 2. find it in <resource prefix>/share/themes/default/
>
> 3. find it in <resource prefix>/share/pixmaps/
>
> 4. find it in PREFIX/share/pixmaps/
And in addition we have the individual settings... that means five locations to
search for a single pixmap and a much more complex process replacing an
established one working pretty well for many applications.
On most devices most people will use the default theme anyway - so that means
three to four searches before using the default. Your position 2. could be the
default one and if you replace that resource prefix with the datadir build time
setting (which defaults to $prefix/share) you have full control over the
location where to search for your defaults and you save bloat and slowdown at
runtime.
Greetings
Florian
--
The dream of yesterday Florian Boor
is the hope of today Tel: +49 271-771091-15
and the reality of tomorrow. Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904] florian.boor at kernelconcepts.de
1D78 2D4D 6C53 1CA4 5588 D07B A8E7 940C 25B7 9A76
More information about the Gpephone-devel
mailing list