summaryrefslogtreecommitdiff
path: root/mate-session/main.c
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2012-11-14 11:23:18 -0600
committerScott Balneaves <[email protected]>2012-11-14 11:23:18 -0600
commitc0829ab1e6b782149687faa75df1e1cf05bd7a66 (patch)
treeeae0fcb995be83ad401714a572f78e3fcdcd8f79 /mate-session/main.c
parentdee0e9ab8f63d1b022a7ac011a921db48acc1cd7 (diff)
downloadmate-session-manager-c0829ab1e6b782149687faa75df1e1cf05bd7a66.tar.bz2
mate-session-manager-c0829ab1e6b782149687faa75df1e1cf05bd7a66.tar.xz
Possible patch for https://github.com/mate-desktop/mate-session-manager/issues/8
Diffstat (limited to 'mate-session/main.c')
-rw-r--r--mate-session/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mate-session/main.c b/mate-session/main.c
index 603a521..0a6259c 100644
--- a/mate-session/main.c
+++ b/mate-session/main.c
@@ -57,6 +57,8 @@
#define IS_STRING_EMPTY(x) \
((x) == NULL || (x)[0] == '\0')
+#define KEY_AUTOSAVE "auto-save-session"
+
static gboolean failsafe = FALSE;
static gboolean show_version = FALSE;
static gboolean debug = FALSE;
@@ -265,7 +267,15 @@ static void maybe_load_saved_session_apps(GsmManager* manager)
if (g_strcmp0 (session_type, GSM_CONSOLEKIT_SESSION_TYPE_LOGIN_WINDOW) != 0)
{
- gsm_manager_add_autostart_apps_from_dir(manager, gsm_util_get_saved_session_dir());
+ GSettings* settings;
+ gboolean autostart;
+
+ settings = g_settings_new (GSM_SCHEMA);
+ autostart = g_settings_get_boolean (settings, KEY_AUTOSAVE);
+ g_object_unref (settings);
+
+ if (autostart == TRUE)
+ gsm_manager_add_autostart_apps_from_dir(manager, gsm_util_get_saved_session_dir());
}
g_object_unref(consolekit);