From 622754df021c48b03a95d3f8ac7fef9481ca4ca4 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 04 Nov 2017 18:31:10 -0400 Subject: mq_profiles_remove(): New function --- (limited to 'src') 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 -- cgit v0.9.1