[Xfce4-commits] <garcon:nick/xfcerc> Remove _garcon_keyfile_load.
Nick Schermer
noreply at xfce.org
Sun Jun 26 23:10:05 CEST 2011
Updating branch refs/heads/nick/xfcerc
to 8fde40208288410f8d6705f4f59be8453e16bc1e (commit)
from 1930f222bd7210e0a48b94e5a2d63b7ec36d5c46 (commit)
commit 8fde40208288410f8d6705f4f59be8453e16bc1e
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 4882ab3..1d46fb3 100644
--- a/garcon/garcon-private.h
+++ b/garcon/garcon-private.h
@@ -41,9 +41,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