diff options
author | Stefano Karapetsas <[email protected]> | 2012-11-15 01:45:05 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-11-15 01:45:05 -0800 |
commit | 08fded1464ec46772e5c7fc471ff2e3ad1f887bc (patch) | |
tree | eae0fcb995be83ad401714a572f78e3fcdcd8f79 /mate-session | |
parent | 6b16710b19e25ddb05f5b99f48cd4bf03d46e56a (diff) | |
parent | c0829ab1e6b782149687faa75df1e1cf05bd7a66 (diff) | |
download | mate-session-manager-08fded1464ec46772e5c7fc471ff2e3ad1f887bc.tar.bz2 mate-session-manager-08fded1464ec46772e5c7fc471ff2e3ad1f887bc.tar.xz |
Merge pull request #12 from sbalneav/master
Remember running applications can now be disabled
Diffstat (limited to 'mate-session')
-rw-r--r-- | mate-session/main.c | 12 |
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); |