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-directory-async.c | |
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-directory-async.c')
-rw-r--r-- | src/nautilus-directory-async.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nautilus-directory-async.c b/src/nautilus-directory-async.c index 1b930f6a4..fc22bd042 100644 --- a/src/nautilus-directory-async.c +++ b/src/nautilus-directory-async.c @@ -4010,10 +4010,10 @@ got_filesystem_info (FilesystemInfoState *state, g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY); filesystem_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE); file->details->filesystem_remote = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE); - if (g_strcmp0 (eel_ref_str_peek (file->details->filesystem_type), filesystem_type) != 0) + if (g_strcmp0 (file->details->filesystem_type, filesystem_type) != 0) { - eel_ref_str_unref (file->details->filesystem_type); - file->details->filesystem_type = eel_ref_str_get_unique (filesystem_type); + g_clear_pointer (&file->details->filesystem_type, g_ref_string_release); + file->details->filesystem_type = g_ref_string_new_intern (filesystem_type); } } |