summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-11-26 13:38:33 -0500
committerRyan Lortie <desrt@desrt.ca>2013-11-26 13:46:13 -0500
commiteb8f17c4c59ab480007f5ead6949388297b00e74 (patch)
tree3855cdf48da9950274c667e016b8a9daa4548e04 /engine
parent735d95a845ac886355da00f5b0a565bfcaeb9534 (diff)
downloaddconf-eb8f17c4c59ab480007f5ead6949388297b00e74.tar.gz
engine: add 'profile' argument to constructor
Allow specifying a profile when calling dconf_engine_new(). This will allow us to avoid setting/unsetting the DCONF_PROFILE environment in testcases from contexts where other threads may be reading from the environment.
Diffstat (limited to 'engine')
-rw-r--r--engine/dconf-engine.c7
-rw-r--r--engine/dconf-engine.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index af98cdf..5492098 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -224,8 +224,9 @@ dconf_engine_unlock_queues (DConfEngine *engine)
}
DConfEngine *
-dconf_engine_new (gpointer user_data,
- GDestroyNotify free_func)
+dconf_engine_new (const gchar *profile,
+ gpointer user_data,
+ GDestroyNotify free_func)
{
DConfEngine *engine;
@@ -238,7 +239,7 @@ dconf_engine_new (gpointer user_data,
g_mutex_init (&engine->queue_lock);
g_cond_init (&engine->queue_cond);
- engine->sources = dconf_engine_profile_open (NULL, &engine->n_sources);
+ engine->sources = dconf_engine_profile_open (profile, &engine->n_sources);
g_mutex_lock (&dconf_engine_global_lock);
dconf_engine_global_list = g_slist_prepend (dconf_engine_global_list, engine);
diff --git a/engine/dconf-engine.h b/engine/dconf-engine.h
index 0b969a2..cac631f 100644
--- a/engine/dconf-engine.h
+++ b/engine/dconf-engine.h
@@ -97,7 +97,8 @@ void dconf_engine_handle_dbus_signal (GBusTyp
GVariant *parameters);
G_GNUC_INTERNAL
-DConfEngine * dconf_engine_new (gpointer user_data,
+DConfEngine * dconf_engine_new (const gchar *profile,
+ gpointer user_data,
GDestroyNotify free_func);
G_GNUC_INTERNAL