[gedit] Use proper function to remove (unset) metadata attributes
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Use proper function to remove (unset) metadata attributes
- Date: Wed, 8 Jan 2014 18:15:40 +0000 (UTC)
commit 69704a5b18994dee0882189b9fcdd8cd77d574dd
Author: Sebastien Lafargue <slaf66 gmail com>
Date: Wed Jan 8 16:57:06 2014 +0100
Use proper function to remove (unset) metadata attributes
Some code use null instead of a string so Gio complain :
GLib-GIO-CRITICAL **:
_g_file_attribute_value_get_string: assertion
'attr->type == G_FILE_ATTRIBUTE_TYPE_STRING' failed
https://bugzilla.gnome.org/show_bug.cgi?id=721798
gedit/gedit-document.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 33b4bd5..6a4090b 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -2995,9 +2995,7 @@ gedit_document_set_metadata (GeditDocument *doc,
else
{
/* Unset the key */
- g_file_info_set_attribute (info, key,
- G_FILE_ATTRIBUTE_TYPE_INVALID,
- NULL);
+ g_file_info_remove_attribute (info, key);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]