diff -Naur glib2.0-2.16.6/glib/gkeyfile.c glib2.0-2.16.6-ban/glib/gkeyfile.c
--- glib2.0-2.16.6/glib/gkeyfile.c	2008-09-12 19:55:51.000000000 +0200
+++ glib2.0-2.16.6-ban/glib/gkeyfile.c	2009-01-01 21:50:31.000000000 +0100
@@ -1069,6 +1069,40 @@
 }
 
 /**
+ * g_key_file_to_file:
+ * @key_file: a #GKeyFile
+ * @file: the path of a filename to load, in the GLib filename encoding
+ * @error: return location for a #GError, or %NULL
+ *
+ * Writes a key file into a file by replacing its content. If the file doesn't
+ * exist, it will be created.
+ * If the file could not be written or created then %error is set to 
+ * a #GFileError.
+ *
+ * Return value: %TRUE if the key file was successfully written, %FALSE
+ * otherwise
+ *
+ * Since: 2.19
+ **/
+gboolean
+g_key_file_to_file (GKeyFile    *key_file,
+		    const gchar *file,
+		    GError     **error)
+{
+  gchar* data;
+  gsize len;
+  gboolean ret_val;
+  
+  g_return_val_if_fail (key_file != NULL, FALSE);
+  
+  data = g_key_file_to_data (key_file, &len, NULL);
+  ret_val = g_file_set_contents (file, data, len, error);
+  g_free (data);
+  
+  return ret_val;
+}
+
+/**
  * g_key_file_get_keys:
  * @key_file: a #GKeyFile
  * @group_name: a group name
diff -Naur glib2.0-2.16.6/glib/gkeyfile.h glib2.0-2.16.6-ban/glib/gkeyfile.h
--- glib2.0-2.16.6/glib/gkeyfile.h	2008-09-12 19:55:51.000000000 +0200
+++ glib2.0-2.16.6-ban/glib/gkeyfile.h	2009-01-01 19:43:30.000000000 +0100
@@ -77,6 +77,9 @@
 gchar    *g_key_file_to_data                (GKeyFile             *key_file,
 					     gsize                *length,
 					     GError              **error) G_GNUC_MALLOC;
+gboolean  g_key_file_to_file                (GKeyFile             *key_file,
+					     const gchar          *file,
+					     GError              **error);
 gchar    *g_key_file_get_start_group        (GKeyFile             *key_file) G_GNUC_MALLOC;
 gchar   **g_key_file_get_groups             (GKeyFile             *key_file,
 					     gsize                *length) G_GNUC_MALLOC;
