summaryrefslogtreecommitdiff
path: root/daemon/gdm-session-worker.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-02-26 21:13:59 +0000
committerRay Strode <halfline@src.gnome.org>2008-02-26 21:13:59 +0000
commit9962e1d70bf72c59924e6152e996ab82d31e6257 (patch)
tree7c4f95fe0328f53c3ebb3c54d4a4506317c81ef4 /daemon/gdm-session-worker.c
parent2deb1a852ee1850974f6f14b1bcd3e3c76665acf (diff)
downloadgdm-9962e1d70bf72c59924e6152e996ab82d31e6257.tar.gz
Save out user settings to ~/.dmrc before starting the session
2008-02-26 Ray Strode <rstrode@redhat.com> * daemon/gdm-session-worker.c: (_save_user_settings), (gdm_session_worker_start_user_session): Save out user settings to ~/.dmrc before starting the session svn path=/trunk/; revision=5880
Diffstat (limited to 'daemon/gdm-session-worker.c')
-rw-r--r--daemon/gdm-session-worker.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index e1f09ad1..f4fb86b1 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -1435,6 +1435,25 @@ out:
return fd;
}
+static void
+_save_user_settings (GdmSessionWorker *worker,
+ const char *home_dir)
+{
+ GError *error;
+
+ if (!gdm_session_settings_is_loaded (worker->priv->user_settings)) {
+ return;
+ }
+
+ error = NULL;
+ if (!gdm_session_settings_save (worker->priv->user_settings,
+ home_dir, &error)) {
+ g_warning ("could not save session and language settings: %s",
+ error->message);
+ g_error_free (error);
+ }
+}
+
static gboolean
gdm_session_worker_start_user_session (GdmSessionWorker *worker,
GError **error)
@@ -1497,6 +1516,8 @@ gdm_session_worker_start_user_session (GdmSessionWorker *worker,
dup2 (fd, STDERR_FILENO);
close (fd);
+ _save_user_settings (worker, home_dir);
+
gdm_session_execute (worker->priv->arguments[0],
worker->priv->arguments,
environment,