+/**
+ * Loads the content of the static and dynamic data files.
+ * Possibly puts up a warning if we can't load the static file.
+ */
+static void
+load_config (void)
+{
+ static_content = g_key_file_new ();
+
+ if (!g_key_file_load_from_file (static_content,
+ "/usr/share/belltower/static.ini",
+ G_KEY_FILE_NONE,
+ NULL))
+ {
+ show_message ("Could not load static content. Attempting to continue.");
+ }
+
+ config = g_key_file_new ();
+ /* it doesn't matter if this fails */
+ g_key_file_load_from_file (config,
+ CONFIG_FILENAME,
+ G_KEY_FILE_KEEP_COMMENTS,
+ NULL);
+}
+
+/**
+ * Saves the dynamic data file to disk.
+ * Puts up a message if there was any error.
+ */
+static void
+save_config (void)
+{
+ gchar *data;
+
+ g_mkdir_with_parents (CONFIG_DIRECTORY, 0700);
+
+ data = g_key_file_to_data (config, NULL, NULL);
+
+ if (!g_file_set_contents (CONFIG_FILENAME,
+ data,
+ -1,
+ NULL))
+ {
+ show_message ("Could not write config file.");
+ }
+
+ g_free (data);
+}
+