[Xfce4-commits] <garcon:master> Remove _garcon_keyfile_load.

Nick Schermer noreply at xfce.org
Tue Jun 28 23:46:04 CEST 2011


Updating branch refs/heads/master
         to 02f2f540a2dec91d4e1c845e3e03b1bf73b92fc2 (commit)
       from 160e15a643b57f9f857cda144c89b12f3ae43a84 (commit)

commit 02f2f540a2dec91d4e1c845e3e03b1bf73b92fc2
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Jun 26 23:07:39 2011 +0200

    Remove _garcon_keyfile_load.

 garcon/garcon-private.c |   46 ----------------------------------------------
 garcon/garcon-private.h |    3 ---
 2 files changed, 0 insertions(+), 49 deletions(-)

diff --git a/garcon/garcon-private.c b/garcon/garcon-private.c
index b8108e8..bca7eba 100644
--- a/garcon/garcon-private.c
+++ b/garcon/garcon-private.c
@@ -107,49 +107,3 @@ _garcon_file_get_uri_relative_to_file (const gchar *path,
 
   return uri;
 }
-
-
-
-
-GKeyFile *
-_garcon_keyfile_load (GFile   *file,
-                      GError **error)
-{
-  GKeyFile *rc;
-  gchar    *path;
-  gchar    *contents;
-  gsize     length = 0;
-  gboolean  result = FALSE;
-
-  /* Open the keyfile */
-  rc = g_key_file_new ();
-
-  /* Load the contents of the file */
-  if (G_LIKELY (g_file_is_native (file)))
-    {
-      path = g_file_get_path (file);
-      result = g_key_file_load_from_file (rc, path, G_KEY_FILE_NONE, error);
-      g_free (path);
-    }
-  else if (g_file_load_contents (file, NULL, &contents, &length, NULL, error))
-    {
-      /* Leave when the file is empty */
-      if (G_UNLIKELY (length == 0))
-        {
-          g_set_error_literal (error, 0, 0, "The desktop file is empty.");
-          g_key_file_free (rc);
-          return NULL;
-        }
-
-      result = g_key_file_load_from_data (rc, contents, length, G_KEY_FILE_NONE, error);
-      g_free (contents);
-    }
-
-  if (!result)
-    {
-      g_key_file_free (rc);
-      return NULL;
-    }
-
-  return rc;
-}
diff --git a/garcon/garcon-private.h b/garcon/garcon-private.h
index 15e1d87..8495646 100644
--- a/garcon/garcon-private.h
+++ b/garcon/garcon-private.h
@@ -56,9 +56,6 @@ GFile    *_garcon_file_new_relative_to_file     (const gchar *path,
 gchar    *_garcon_file_get_uri_relative_to_file (const gchar *path,
                                                  GFile       *file);
 
-GKeyFile *_garcon_keyfile_load                   (GFile      *file,
-                                                  GError    **error);
-
 G_END_DECLS
 
 #endif /* !__GARCON_PRIVATE_H__ */



More information about the Xfce4-commits mailing list