Re: Thumbnailing
- From: Michael Meeks <michael ximian com>
- To: Michael Rothwell <rothwell holly-springs nc us>
- Cc: Nautilus List <nautilus-list gnome org>
- Subject: Re: Thumbnailing
- Date: 11 Jul 2002 10:10:42 +0100
Hi Michael,
On Thu, 2002-07-11 at 01:55, Michael Rothwell wrote:
> Is it possible to extend the thumbnailing support in Nautilus? I want to
> write a font-viewer, and it seems like the easiest thing will be to add
> thumbnailing support for fonts, and a nautilus view that will showcase
> one font at a time.
Yes - it's relatively easy to do I think, some people will tell you to
try and solve this generically, my feeling is not to bother, but make a
patch non-generically and get someone more au fais with the internals to
make it beautiful later.
So; you need to hack your font mime-type special case thing into:
nautilus/libnautilus-private/nautilus-icon-factory.c
(nautilus_icon_factory_get_icon_for_file):
note the image & svg cases already there. The important bit is making
sure nautilus_get_thumbnail_uri is called for your file.
And then you want to hack:
nautilus/libnautilus-private/nautilus-thumbnails.c
(thumbnail_thread_make_thumbnail):
Notably, this is in a separate thread, thus you are not at great
liberty to call chunks of non-threadsafe code [ which is much of
nautilus ]. You just want a very small hook here to render your font [
however you see fit ] to a small GdkPixbuf.
Of course you'll need to use gnome-vfs to read the data [ it might be
on a remote site ] and gdk_pixbuf operations to render it.
HTH,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]