return TRUE;
}
+RepoData *
+config_parse_repo(gchar * str)
+{
+ /* Parse each part of a repo, delimited by newline characters:
+ * 1. name
+ * 2. url
+ * 3. cache_dir
+ * 4. dl_zoom_steps
+ * 5. view_zoom_steps
+ */
+gchar *token, *error_check;
+
+RepoData *rd = g_new0(RepoData, 1);
+
+/* Parse name. */
+token = strsep(&str, "\n\t");
+if (token)
+ rd->name = g_strdup(token);
+
+/* Parse URL format. */
+token = strsep(&str, "\n\t");
+if (token)
+ rd->url = g_strdup(token);
+
+/* Parse cache dir. */
+token = strsep(&str, "\n\t");
+if (token)
+ rd->cache_dir = gnome_vfs_expand_initial_tilde(token);
+
+/* Parse download zoom steps. */
+token = strsep(&str, "\n\t");
+if (!token || !*token || !(rd->dl_zoom_steps = atoi(token)))
+ rd->dl_zoom_steps = 2;
+
+/* Parse view zoom steps. */
+token = strsep(&str, "\n\t");
+if (!token || !*token || !(rd->view_zoom_steps = atoi(token)))
+ rd->view_zoom_steps = 1;
+
+/* Parse double-size. */
+token = strsep(&str, "\n\t");
+if (token)
+ rd->double_size = atoi(token); /* Default is zero (FALSE) */
+
+/* Parse next-able. */
+token = strsep(&str, "\n\t");
+if (!token || !*token
+ || (rd->nextable = strtol(token, &error_check, 10), token == str))
+ rd->nextable = TRUE;
+
+set_repo_type(rd);
+return rd;
+}
+
static void
config_default_repo(void)
{
#include <gconf/gconf-client.h>
#include "filter.h"
+#include "mapper-types.h"
GConfClient *gconf_client;
void config_init(void);
gboolean config_save_repo(void);
gboolean config_load_repo(void);
+RepoData *config_parse_repo(gchar *str);
gboolean config_save_home(void);
gboolean config_save(void);
void config_update_proxy(void);
repo->type = REPOTYPE_NONE;
}
-RepoData *
-config_parse_repo(gchar * str)
-{
- /* Parse each part of a repo, delimited by newline characters:
- * 1. name
- * 2. url
- * 3. cache_dir
- * 4. dl_zoom_steps
- * 5. view_zoom_steps
- */
-gchar *token, *error_check;
-
-RepoData *rd = g_new0(RepoData, 1);
-
-/* Parse name. */
-token = strsep(&str, "\n\t");
-if (token)
- rd->name = g_strdup(token);
-
-/* Parse URL format. */
-token = strsep(&str, "\n\t");
-if (token)
- rd->url = g_strdup(token);
-
-/* Parse cache dir. */
-token = strsep(&str, "\n\t");
-if (token)
- rd->cache_dir = gnome_vfs_expand_initial_tilde(token);
-
-/* Parse download zoom steps. */
-token = strsep(&str, "\n\t");
-if (!token || !*token || !(rd->dl_zoom_steps = atoi(token)))
- rd->dl_zoom_steps = 2;
-
-/* Parse view zoom steps. */
-token = strsep(&str, "\n\t");
-if (!token || !*token || !(rd->view_zoom_steps = atoi(token)))
- rd->view_zoom_steps = 1;
-
-/* Parse double-size. */
-token = strsep(&str, "\n\t");
-if (token)
- rd->double_size = atoi(token); /* Default is zero (FALSE) */
-
-/* Parse next-able. */
-token = strsep(&str, "\n\t");
-if (!token || !*token
- || (rd->nextable = strtol(token, &error_check, 10), token == str))
- rd->nextable = TRUE;
-
-set_repo_type(rd);
-return rd;
-}
-
gboolean
repo_make_cache_dir(gchar * name, const gchar * cache_dir, GtkWidget * parent)
{