diff options
author | Jordan Petridis <jpetridis@gnome.org> | 2018-12-10 19:55:38 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano1618+gnome@gmail.com> | 2019-02-22 11:29:57 +0000 |
commit | b4d200fed3610f52620c69f1cd271a0e5aa34462 (patch) | |
tree | c507ecd73fbbaa22db180054efc8187bf1343194 /src/nautilus-file-private.h | |
parent | de17081ff2d966fcde3d0069bb82c6f2441270a9 (diff) | |
download | nautilus-b4d200fed3610f52620c69f1cd271a0e5aa34462.tar.gz |
file: replace eel_ref_str with GRefString
glib now offers a reference counted api.
This allows us to replace a lot of legacy code and get rid of
eel_ref_str. GRefString [1] is almost a drop-in replacement.
nautilus-file-operations.c was indirectly depending upon
eel/eel-string.h from nautilus-file-private.h and thus
a new include was added.
This bumps the minimum version of glib to 2.58
Close #781
https://gitlab.gnome.org/GNOME/nautilus/issues/781
[1] https://developer.gnome.org/glib/stable/glib-Reference-counted-strings.html
Diffstat (limited to 'src/nautilus-file-private.h')
-rw-r--r-- | src/nautilus-file-private.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h index 3ed301a75..ed9725b23 100644 --- a/src/nautilus-file-private.h +++ b/src/nautilus-file-private.h @@ -26,7 +26,6 @@ #include "nautilus-monitor.h" #include "nautilus-file-undo-operations.h" #include <eel/eel-glib-extensions.h> -#include <eel/eel-string.h> #define NAUTILUS_FILE_DEFAULT_ATTRIBUTES \ "standard::*,access::*,mountable::*,time::*,unix::*,owner::*,selinux::*,thumbnail::*,id::filesystem,trash::orig-path,trash::deletion-date,metadata::*,recent::*" @@ -44,15 +43,15 @@ struct NautilusFileDetails { NautilusDirectory *directory; - eel_ref_str name; + GRefString *name; /* File info: */ GFileType type; - eel_ref_str display_name; + GRefString *display_name; char *display_name_collation_key; char *directory_name_collation_key; - eel_ref_str edit_name; + GRefString *edit_name; goffset size; /* -1 is unknown */ @@ -62,16 +61,16 @@ struct NautilusFileDetails int uid; /* -1 is none */ int gid; /* -1 is none */ - eel_ref_str owner; - eel_ref_str owner_real; - eel_ref_str group; + GRefString *owner; + GRefString *owner_real; + GRefString *group; time_t atime; /* 0 is unknown */ time_t mtime; /* 0 is unknown */ char *symlink_name; - eel_ref_str mime_type; + GRefString *mime_type; char *selinux_context; char *description; @@ -103,7 +102,7 @@ struct NautilusFileDetails /* used during DND, for checking whether source and destination are on * the same file system. */ - eel_ref_str filesystem_id; + GRefString *filesystem_id; char *trash_orig_path; @@ -195,7 +194,7 @@ struct NautilusFileDetails eel_boolean_bit filesystem_use_preview : 2; /* GFilesystemPreviewType */ eel_boolean_bit filesystem_info_is_up_to_date : 1; eel_boolean_bit filesystem_remote : 1; - eel_ref_str filesystem_type; + GRefString *filesystem_type; time_t trash_time; /* 0 is unknown */ time_t recency; /* 0 is unknown */ |