fileinfo: Define G_FILE_ATTRIBUTE_STANDARD_FILE

Define the standard::file attribute for attaching the
GFile that is being queried to a GFileInfo.

This is useful to avoid having to carry around the
(file, info) pair. In particular, it allows to store
just a self-contained GFileInfo in a list model. This
is going to be used in the GTK file chooser.
This commit is contained in:
Matthias Clasen
2020-07-03 22:46:38 -04:00
parent b101dbda13
commit 4f833cc3fe

View File

@@ -54,6 +54,18 @@ typedef struct _GFileInfoClass GFileInfoClass;
**/
#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type" /* uint32 (GFileType) */
/**
* G_FILE_ATTRIBUTE_STANDARD_FILE:
*
* A key in the "standard" namespace for storing the object that
* the GFileInfo corresponds to.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
* The value for this key should contain a #GFile.
*
* Since: 2.66
**/
#define G_FILE_ATTRIBUTE_STANDARD_FILE "standard::file" /* object */
/**
* G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
*