[Gpephone-devel] Pixmap location
YU Yijun RD-ILAB-PEK
yijun.yu at orange-ftgroup.com
Wed Aug 8 04:06:56 CEST 2007
Hi,
>
>Yes, one: Standards are there to be obeyed.
>
>This is, at least for me, a quite common problem.
>At some point you *have* to define some standards you want to conform to
>and you have to expect other to conform to them too.
>You simply cannot support all and every variant that someone might come
>up with. It is nice to try but at some point you have to stop trying to
>be nice and simply call things "broken" if they do not conform.
>
>Others do the very same thing and noone questions it. You just have to
>tell developers upfront what you expect from them.
>We have a very fine system for properly compiling apps for those
>different settings. And yes, I think we can safely assume that
>applications will be compiled for a specific path setup. If you need
>different setups you will need to have seperate binaries for this.
>Every system call takes literally ages to execute (at least one
>userspace-kernel-userspace roundtrip) so we have to get rid of them as
>much as possible. Ideally only one "open()" should be sufficient!
>If it means to break some setups then at least I would accept it.
>
>We have to document our path structure and make this mandatory.
>
>Buttomline:
>- Remove unnecessary alternate paths from default searches!
>- Use proper compile-time PREFIX paths
>- Document the resulting mandatory path setup.
Ok, let’s use PREFIX paths as the search path for applications installed files. If we really met some problems in the future, we then use global setting specified path as fallback.
I think the relative paths after PREFIX has no different opinions. Just one question, can we directly use
$PREFIX/share/themes/<theme name>/ instead of
$PREFIX/share/themes/<theme name>/<application name>/
Regards
YU Yijun
>
>> Regards
>> YU Yijun
>Cheers
> nils
>
>
>>> -----Original Message-----
>>> From: gpephone-devel-bounces at linuxtogo.org
>>> [mailto:gpephone-devel-bounces at linuxtogo.org] On Behalf Of Florian Boor
>>> Sent: 2007年8月6日 19:58
>>> To: WANG Gang RD-ILAB-PEK
>>> Cc: gpephone-devel at linuxtogo.org
>>> Subject: Re: [Gpephone-devel] Pixmap location
>>>
>>> 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
>>>
>>> _______________________________________________
>>> Gpephone-devel mailing list
>>> Gpephone-devel at linuxtogo.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/gpephone-devel
>
>--
>kernel concepts GbR Tel: +49-271-771091-12
>Sieghuetter Hauptweg 48 Fax: +49-271-771091-19
>D-57072 Siegen Mob: +49-176-21024535
>--
More information about the Gpephone-devel
mailing list