[Gpephone-devel] Pixmap location (continued)

WANG Gang RD-ILAB-PEK gang.wang at orange-ftgroup.com
Mon Aug 13 03:44:01 CEST 2007


Hi, All


Here are the proposals to define the way of storing applications'
resource files (pixmaps, configuration files) which will ease the task
of searching for them as well as accommodating themes.

A. Each application needs to place its pixmaps in <install
prefix>/share/themes/default/<app name>/ while its conf files in
<install prefix>/share/etc/<app name>/. The .desktop file of an app
should be installed in <install prefix>/share/applications/. In .desktop
file, an entry MUST exist which provides the verbatim <app name> string.

<install prefix> is determined by the user at the installation of the
application, the default value is '/usr', but can also be something like
'/mnt/mmc' when the application is installed in the SD card. A global
setting is used to store the values of different <install prefix>es when
we have more than one place to install applications. We use the similar
denotation of environment variables in UNIX to store the paths in a
string: /usr:/usr/local:/mnt/mmc 

B. The first step to display the installed applications' icons in the
mainmenu of gpe-applauncher is to search for the installed application's
.desktop files. In doing so, a limited search area should be defined:

  PREFIX/share/applications 
  <install prefix>/share/applications

PREFIX is the configuration variable of gpe-applauncher which is defined
when running configure script.

C. The next action to take is to locate the icon images described in the
.desktop files. 
gpe-applauncher will go through a list of searching places to find the
desired the image file in such an order (the traverse will stop and
return if the image file is found):
1. PREFIX/share/themes/<current theme>/<app name>
2. <install prefix>/share/themes/<current theme>/<app name>
3. PREFIX/share/themes/default/<app name>
4. <install prefix>/share/themes/default/<app name>

PREFIX has the same meaning as the previous one.
<install prefix> will be expanded if it contains more than one path.
<app name> is retrieved from .desktop file.

If the image file is not found, gpe-applauncher uses a default image to
take the place of the desired one.




 <<Picture (Metafile)>> 

Gang WANG
ft/nsm/rd/ilab/pek/ost
engineer
tel. +86 10 62 57 11 88
mob. +86 139 10 12 93 05
gang.wang at orange-ftgroup.com
 <<Picture (Metafile)>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linuxtogo.org/pipermail/gpephone-devel/attachments/20070813/b9e0ac9a/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/bmp
Size: 2502 bytes
Desc: Picture (Metafile)
Url : http://lists.linuxtogo.org/pipermail/gpephone-devel/attachments/20070813/b9e0ac9a/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/bmp
Size: 1178 bytes
Desc: Picture (Metafile)
Url : http://lists.linuxtogo.org/pipermail/gpephone-devel/attachments/20070813/b9e0ac9a/attachment-0001.bin 


More information about the Gpephone-devel mailing list