mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
file-info: Add a G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID attribute
This indicates whether the thumbnail (given by G_FILE_ATTRIBUTE_THUMBNAIL_PATH) is valid — i.e. to represent the file in its current state. If G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID is FALSE (for a normal _or_ failed thumbnail) it means the file has changed since the thumbnail was generated, and the thumbnail is out of date. Part of checking thumbnail validity (by the spec) involves parsing headers out of the thumbnail .png so we include some (small) code to do that in a separate file. We will likely want to copy this code to gvfs to do the same for GVfsFile. Heavily based on a patch from Philip Withnall <philip.withnall@collabora.co.uk> who suggested the feature and designed the API. https://bugzilla.gnome.org/show_bug.cgi?id=709898
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
#define G_FILE_ATTRIBUTE_ID_OWNER_GROUP (9437184 + 3)
|
||||
#define G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH (10485760 + 1)
|
||||
#define G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED (10485760 + 2)
|
||||
#define G_FILE_ATTRIBUTE_ID_THUMBNAIL_IS_VALID (10485760 + 3)
|
||||
#define G_FILE_ATTRIBUTE_ID_PREVIEW_ICON (11534336 + 1)
|
||||
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM_SIZE (12582912 + 1)
|
||||
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM_FREE (12582912 + 2)
|
||||
|
Reference in New Issue
Block a user