Desktop File Standard
|
Parameter | Description | Required |
---|---|---|
Name[] | The user-visible name that will appear in the launcher folder. This is equivalent to the QContent::name() property. | Yes |
Type | The type of the application or document the .desktop file links to. For applications this should always be Application, for documents it is the MIME type of the document and is equivalent to the QContent::type() property. | Yes |
Role | Categories entries according to their intended usage, possible values include Application, Document, and Data. This equivalent to the QContent::role() property(). | No |
Exec | Specifies the executable name of applications. | Applications |
File | Specifies the file name of documents and data. This is equivalent to the QContent::fileName() property. | Documents, Data |
Icon | Specifies the icon to be found in /opt/Qtopia/pics. Endings are auto-detected. This is equivalent to the QContent::iconName() property. | No |
Comment[] | Specifies a comment describing the launcher entry. | No |
MimeType | Specifies a comma separated list of MIME types an application can open. This is equivalent to the QContent::mimeTypes() property. See Main Document Widget for more information on associating MIME types with an application. | No |
MimeTypeIcons | Specifies a comma separated list of icons for documents of the types in the MimeType list. There should be an icon in this list for each type in the MimeType list. This is equivalent to the QContent::mimeTypeIcons() property. | No |
Categories | Specifies categories to add the launcher entry to in addition to the one specified in the installation path. Categories should be listed as a comma separated list of category IDs. | No |
CanFastLoad | Indicates whether the application can be fast loaded. | No |
Builtin | Indicates the application is a built-in application. | No |
Note: Lists may by semi-colon separated instead of comma separated, however semi-colon separated lists must be enclosed in double quotes otherwise the first semi-colon will be interpreted as a comment character and everything following it will be discarded.
The [Translation] group identifies where translation data for the .desktop file can be loaded from.
Parameter | Description |
---|---|
File | The name of the translation file to load. |
Context | The translation context within the file. |
See also Desktop & Configuration File Internationalization.
The [DRM] group contains additional information required for DRM enabled applications.
Parameter | Description |
---|---|
MimeTypePermissions | Contains a comma separated list of permissions that must be verified before asking the application to open a document. There should be one permission for each MIME type in the MimeType parameter. |
See also Document System: DRM Integration
If other groups are included in the .desktop their contents will be pulled into the documents database and stored as properties of the QContent created from the .desktop. These properties can be accessed using QContent::property( const QString &key, const QString &group ) where key is the parameter name and group is the settings group.
For applications that are simply executables, the format is as follows (lines beginning with a ';' are ignored as comments):
[Desktop Entry] ; the line above is mandatory at the beginning of the file ; ; Exec specifies the name of the executable that should be in /opt/Qtopia/bin ; Command-line arguments to the executable are not supported and should not be used. Exec=executablename ; ; This should always be Application for links to applications. Type=Application ; ; Specifies the icon to be found in /opt/Qtopia/pics. Endings are auto-detected. ; The icons should be at least 32x32 and should smooth-scale well ; from 14x14 to at least 48x48 Icon=Iconfile ; ; The mimetype entry specifies a comma separated list of mimetypes this application can handle. MimeType="audio/mp3" ; ; the next lines specify the name of the application as it should appear in the launcher ; and start menu ; Name[]="My fancy application"
For applications that are realized by a service request, the format is similar, except the Type is a service (must take one QString parameter), File is an arbitrary parameter, and Role must be "Application":
[Desktop Entry] Type=Service/MyService::myMessage(QString) File=MyParameter Role=Application Icon=Iconfile Name[]="My fancy application"
By using Services to realize applications, a single application can present an interface depending on information loaded from the parameter. For example, a Java engine could load a .jar file or a weblet could load a webpage.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com