summaryrefslogtreecommitdiff
path: root/src/nautilus-directory-async.c
diff options
context:
space:
mode:
authorJordan Petridis <jpetridis@gnome.org>2018-12-10 19:55:38 +0200
committerCarlos Soriano <csoriano1618+gnome@gmail.com>2019-02-22 11:29:57 +0000
commitb4d200fed3610f52620c69f1cd271a0e5aa34462 (patch)
treec507ecd73fbbaa22db180054efc8187bf1343194 /src/nautilus-directory-async.c
parentde17081ff2d966fcde3d0069bb82c6f2441270a9 (diff)
downloadnautilus-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.c6
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);
}
}