GNOME Bugzilla – Bug 557182
preview functionality
Last modified: 2009-01-10 03:41:17 UTC
See http://mail.gnome.org/archives/gvfs-list/2008-October/msg00042.html http://mail.gnome.org/archives/gvfs-list/2008-October/msg00055.html Will attach the patch here since it's easier to track stuff in bugzilla.
Created attachment 120985 [details] [review] patch
This depends on the GIcon serialization patch from bug 555740.
Created attachment 120986 [details] [review] gio patch Also needed: Tiny patch adding G_FILE_ATTRIBUTE_PREVIEW_ICON to gio - let me know if I need to file a separate bug.
Created attachment 120987 [details] simple test program Here's a test program for testing that this stuff works. Should probably be integrated into an automatic test suite.. but that seems a bit premature since one would need a specialized backend that sets preview::icon. For now, I'm attaching it here so it's not lost.
I commited this with some changes. First of all I updated it to match the changes to the icon serialization APIs. Secondly I simplified the type handling of GVfsIcon a bit. libgvfscommon is a normal library that is always persistent (linked to directly by the daemon or made persistant by the gvfs module). Thus GvfsIcon doesn't have to be a loadable type (same as other GTypes in common/). We also don't need to call g_vfs_get_default() in the daemon to initialize it, since its a normal type and we link to the lib its in. I can't really test this as I don't have the right hardware. Can you verify that it still works?
I'll assume this works, David ? Please reopen if not.