summaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/config.c b/src/config.c
index 97f8429..cf2d154 100644
--- a/src/config.c
+++ b/src/config.c
@@ -82,19 +82,6 @@ set_type_or_run_callbacks(MqConfig *config, const gchar *name, gpointer value,
}
static void
-set_boolean(MqConfig *config, const gchar *name, gboolean value)
-{
- gchar *group;
- gchar *key;
-
- split_name(name, &group, &key);
-
- g_key_file_set_boolean(config->key_file, group, name, value);
-
- set_type_or_run_callbacks(config, name, &value, TYPE_BOOLEAN);
-}
-
-static void
set_defaults(MqConfig *config)
{
config->types_and_cbs_set = FALSE;
@@ -136,6 +123,19 @@ mq_config_save(MqConfig *config)
}
void
+mq_config_set_boolean(MqConfig *config, const gchar *name, gboolean value)
+{
+ gchar *group;
+ gchar *key;
+
+ split_name(name, &group, &key);
+
+ g_key_file_set_boolean(config->key_file, group, name, value);
+
+ set_type_or_run_callbacks(config, name, &value, TYPE_BOOLEAN);
+}
+
+void
mq_config_set(MqConfig *config, const gchar *name, const gchar *value)
{
struct item *item;
@@ -147,8 +147,8 @@ mq_config_set(MqConfig *config, const gchar *name, const gchar *value)
case TYPE_BOOLEAN:
/* value is "on" or "off" (as implemented in
* mq_html_input_checkbox()). */
- set_boolean(config, name, value[1] == 'n' ? TRUE :
- FALSE);
+ mq_config_set_boolean(config, name,
+ value[1] == 'n' ? TRUE : FALSE);
break;
}
}