[glib/gio-file-info: 1/2] fileinfo: Define G_FILE_ATTRIBUTE_STANDARD_FILE
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/gio-file-info: 1/2] fileinfo: Define G_FILE_ATTRIBUTE_STANDARD_FILE
- Date: Sat, 4 Jul 2020 02:53:52 +0000 (UTC)
commit 4f833cc3fef200515865333b79b593589e3bf9b3
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 3 22:46:38 2020 -0400
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.
gio/gfileinfo.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h
index e642d31a0..fd4dde5b6 100644
--- a/gio/gfileinfo.h
+++ b/gio/gfileinfo.h
@@ -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:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]