Skip to content
  • Allison Karlitskaya's avatar
    file-info: Add a G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID attribute · fe706974
    Allison Karlitskaya authored
    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
    fe706974