summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-06 17:02:09 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-06 17:02:09 (EST)
commitbe7be15b105f4b301c9d4e07e78be2447b48ef52 (patch)
tree48d36e63fa97eda9c3caafb2f237cb0c11901430 /src/config
parentf230b6d1b75d894c6a3fb110501237c3de3e135b (diff)
downloadmarquee-be7be15b105f4b301c9d4e07e78be2447b48ef52.zip
marquee-be7be15b105f4b301c9d4e07e78be2447b48ef52.tar.gz
marquee-be7be15b105f4b301c9d4e07e78be2447b48ef52.tar.bz2
mq_profiles_new(): Create profile configs
Diffstat (limited to 'src/config')
-rw-r--r--src/config/profiles.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/config/profiles.c b/src/config/profiles.c
index c458c97..f4b8797 100644
--- a/src/config/profiles.c
+++ b/src/config/profiles.c
@@ -29,6 +29,8 @@
#include <glib.h>
#include <glib/gstdio.h>
+#include "config.h"
+
struct _MqProfiles {
gchar *config_dir;
gchar *file_name;
@@ -53,14 +55,19 @@ create(MqProfiles *profiles)
default_profile = mq_profiles_insert(profiles, "Default", "#0000ff");
private_profile = mq_profiles_insert(profiles, "Private", "#6060a0");
+
if (default_profile) {
+ mq_config_new(default_profile, MQ_CONFIG_PROFILE_DEFAULT);
mq_profiles_set_default(profiles, default_profile);
+ g_free(default_profile);
}
- g_free(default_profile);
- g_free(private_profile);
- mq_profiles_save(profiles);
- /* TODO: Create configs. */
+ if (private_profile) {
+ mq_config_new(private_profile, MQ_CONFIG_PROFILE_PRIVATE);
+ g_free(private_profile);
+ }
+
+ mq_profiles_save(profiles);
return FALSE;
}