#define PROXY_PORT (8080)
-gint mapper_gconf_get_bound_int(const gchar *path, gint def, gint min, gint max);
gint mapper_gconf_get_int(const gchar *path, gint def);
+gint mapper_gconf_get_bound_int(const gchar *path, gint def, gint min, gint max);
gfloat mapper_gconf_get_float(const gchar *path, gfloat def);
+gboolean mapper_gconf_get_boolean(const gchar *path, gboolean def);
void
config_update_proxy(void)
config_load_repo(void)
{
GSList *list, *curr;
-GConfValue *value;
guint curr_repo_index;
g_assert(gconf_client);
*list=gconf_client_get_list(gconf_client, gconf_key, GCONF_VALUE_STRING, NULL);
*model=gtk_list_store_new(1, G_TYPE_STRING);
-for (curr = list; curr != NULL; curr = curr->next) {
+for (curr = *list; curr != NULL; curr = curr->next) {
GtkTreeIter iter;
gtk_list_store_insert_with_values(*model, &iter, INT_MAX, 0, curr->data, -1);
}
return v;
}
+/**
+ *
+ */
+gboolean
+mapper_gconf_get_boolean(const gchar *path, gboolean def)
+{
+GConfValue *value;
+gboolean r;
+
+g_assert(gconf_client);
+value = gconf_client_get(gconf_client, path, NULL);
+if (value) {
+ r=gconf_value_get_bool(value);
+ gconf_value_free(value);
+} else {
+ r=def;
+}
+return r;
+}
+
/**
*
*/