[gedit] Bug fixes when gvfs_metadata is disabled



commit 2adf10af73a878faa23b50e46946b1f4a3ffee43
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date:   Sun Jan 23 17:41:35 2011 +0100

    Bug fixes when gvfs_metadata is disabled
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640329

 gedit/gedit-document-loader.c |    6 +-----
 gedit/gedit-document.c        |    2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gedit/gedit-document-loader.c b/gedit/gedit-document-loader.c
index b3b65e9..fb30151 100644
--- a/gedit/gedit-document-loader.c
+++ b/gedit/gedit-document-loader.c
@@ -405,12 +405,8 @@ get_metadata_encoding (GeditDocumentLoader *loader)
 
 #ifndef ENABLE_GVFS_METADATA
 	gchar *charset;
-	gchar *uri;
 
-	uri = g_file_get_uri (loader->priv->location);
-
-	charset = gedit_metadata_manager_get (uri, "encoding");
-	g_free (uri);
+	charset = gedit_metadata_manager_get (loader->priv->location, "encoding");
 
 	if (charset == NULL)
 		return NULL;
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 04b80b3..0f84a2f 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -2983,7 +2983,7 @@ gedit_document_set_metadata (GeditDocument *doc,
 
 		if (doc->priv->location != NULL)
 		{
-			gedit_metadata_manager_set (location, key, value);
+			gedit_metadata_manager_set (doc->priv->location, key, value);
 		}
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]