summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-06 16:59:38 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-06 17:00:29 (EST)
commitf230b6d1b75d894c6a3fb110501237c3de3e135b (patch)
tree2a8bef64be941bef30dfce20e6108339d3845fcf
parent5b69434a840829fea718c7248977b22be907412d (diff)
downloadmarquee-f230b6d1b75d894c6a3fb110501237c3de3e135b.zip
marquee-f230b6d1b75d894c6a3fb110501237c3de3e135b.tar.gz
marquee-f230b6d1b75d894c6a3fb110501237c3de3e135b.tar.bz2
mq_application_new(): Get current profile ID from MqProfiles
-rw-r--r--src/application.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/application.c b/src/application.c
index 742d7cd..24b8094 100644
--- a/src/application.c
+++ b/src/application.c
@@ -82,12 +82,16 @@ download_started_cb(WebKitWebContext G_GNUC_UNUSED *context,
MqApplication *
mq_application_new(const gchar *profile)
{
- MqApplication *application;
+ MqApplication *application;
+ gchar *current_profile;
application = malloc(sizeof(*application));
application->profiles = mq_profiles_new();
mq_profiles_set_current(application->profiles, profile);
- application->config = mq_config_new(profile, MQ_CONFIG_PROFILE_DEFAULT);
+ current_profile = mq_profiles_get_current(application->profiles);
+ application->config = mq_config_new(current_profile,
+ MQ_CONFIG_PROFILE_DEFAULT);
+ g_free(current_profile);
mq_config_load(application->config);
application->windows = NULL;
application->tabs = g_hash_table_new_full(g_int64_hash, g_int64_equal,