Re: File Extension Preview

Am Sonntag, den 30.09.2007, 13:23 +0200 schrieb Jens Frederich:
> I've a little question.
> We would register own file extensions in nautilus. For example we have
> the extension *.vgi or *.vgl and would provide a own preview image.
> We can we do that, please? With a nautilus extension?

You'll have to

a) define a MIME type for your extension [by installing an XML file for

b) code a thumbnail preview application, that accepts at least one
input-related and output-related positional specifier of the following:

%u - input URI
%i - input file name (may not be specified for remote URIs)
%o - output file name (i.e. ~/.thumbnails/...)
%s - size of file to thumbnail

For an example, see totem-video-thumbnailer [1]

c) add a GConf key that links the MIME type with the thumbnailer.

For an example, see the totem-video-thumbnailer MIME type generation
script [2].


Christian Neumair <cneumair gnome org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]