mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
fileinfo: Add G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE attribute
Add filesystem attribute to detect remote filesystems in order to replace hardcoded filesystem types in GtkFileSystem. Set this attribute also for GLocalFile appropriately. Bump version to 2.49.3, so that early adopters of new API have a version number to target.
This commit is contained in:
parent
f4b5dc30a7
commit
e57355b055
@ -31,7 +31,7 @@ m4_define(glib_configure_ac)
|
|||||||
|
|
||||||
m4_define([glib_major_version], [2])
|
m4_define([glib_major_version], [2])
|
||||||
m4_define([glib_minor_version], [49])
|
m4_define([glib_minor_version], [49])
|
||||||
m4_define([glib_micro_version], [2])
|
m4_define([glib_micro_version], [3])
|
||||||
m4_define([glib_interface_age], [0])
|
m4_define([glib_interface_age], [0])
|
||||||
m4_define([glib_binary_age],
|
m4_define([glib_binary_age],
|
||||||
[m4_eval(100 * glib_minor_version + glib_micro_version)])
|
[m4_eval(100 * glib_minor_version + glib_micro_version)])
|
||||||
|
@ -326,6 +326,7 @@ G_FILE_ATTRIBUTE_FILESYSTEM_FREE
|
|||||||
G_FILE_ATTRIBUTE_FILESYSTEM_USED
|
G_FILE_ATTRIBUTE_FILESYSTEM_USED
|
||||||
G_FILE_ATTRIBUTE_FILESYSTEM_TYPE
|
G_FILE_ATTRIBUTE_FILESYSTEM_TYPE
|
||||||
G_FILE_ATTRIBUTE_FILESYSTEM_READONLY
|
G_FILE_ATTRIBUTE_FILESYSTEM_READONLY
|
||||||
|
G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE
|
||||||
G_FILE_ATTRIBUTE_GVFS_BACKEND
|
G_FILE_ATTRIBUTE_GVFS_BACKEND
|
||||||
G_FILE_ATTRIBUTE_SELINUX_CONTEXT
|
G_FILE_ATTRIBUTE_SELINUX_CONTEXT
|
||||||
G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
|
G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
|
||||||
|
@ -804,6 +804,15 @@ typedef struct _GFileInfoClass GFileInfoClass;
|
|||||||
**/
|
**/
|
||||||
#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview" /* uint32 (GFilesystemPreviewType) */
|
#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview" /* uint32 (GFilesystemPreviewType) */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE:
|
||||||
|
*
|
||||||
|
* A key in the "filesystem" namespace for checking if the file system
|
||||||
|
* is remote. Is set to %TRUE if the file system is remote.
|
||||||
|
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
|
||||||
|
**/
|
||||||
|
#define G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE "filesystem::remote" /* boolean */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G_FILE_ATTRIBUTE_GVFS_BACKEND:
|
* G_FILE_ATTRIBUTE_GVFS_BACKEND:
|
||||||
*
|
*
|
||||||
|
@ -1113,6 +1113,11 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
#endif /* G_OS_WIN32 */
|
#endif /* G_OS_WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_file_attribute_matcher_matches (attribute_matcher,
|
||||||
|
G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE))
|
||||||
|
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE,
|
||||||
|
g_local_file_is_remote (local->filename));
|
||||||
|
|
||||||
g_file_attribute_matcher_unref (attribute_matcher);
|
g_file_attribute_matcher_unref (attribute_matcher);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
Loading…
Reference in New Issue
Block a user