summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-04 18:31:10 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-11-04 18:31:10 (EDT)
commit622754df021c48b03a95d3f8ac7fef9481ca4ca4 (patch)
treea1e7641d9c428aae19a74c0d2c980d9b26f53e8f /src
parent82da6aed345ae499e20f0ea18be0c8e135f4dda4 (diff)
downloadmarquee-622754df021c48b03a95d3f8ac7fef9481ca4ca4.zip
marquee-622754df021c48b03a95d3f8ac7fef9481ca4ca4.tar.gz
marquee-622754df021c48b03a95d3f8ac7fef9481ca4ca4.tar.bz2
mq_profiles_remove(): New function
Diffstat (limited to 'src')
-rw-r--r--src/config/profiles.c6
-rw-r--r--src/config/profiles.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/config/profiles.c b/src/config/profiles.c
index df27983..36d3293 100644
--- a/src/config/profiles.c
+++ b/src/config/profiles.c
@@ -141,6 +141,12 @@ mq_profiles_set_default(MqProfiles *profiles, const gchar *profile)
}
gboolean
+mq_profiles_remove(MqProfiles *profiles, const gchar *profile)
+{
+ return g_key_file_remove_group(profiles->key_file, profile, NULL);
+}
+
+gboolean
mq_profiles_save(MqProfiles *profiles)
{
/* TODO: Handle GFileError? */
diff --git a/src/config/profiles.h b/src/config/profiles.h
index 0159461..6783b10 100644
--- a/src/config/profiles.h
+++ b/src/config/profiles.h
@@ -55,6 +55,9 @@ void
mq_profiles_set_default(MqProfiles *profiles, const gchar *profile);
gboolean
+mq_profiles_remove(MqProfiles *profiles, const gchar *profile);
+
+gboolean
mq_profiles_save(MqProfiles *profiles);
G_END_DECLS