[gnome-session] gsm: Reorder how we fill session, to start with required components
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm: Reorder how we fill session, to start with required components
- Date: Tue, 22 Mar 2011 12:01:29 +0000 (UTC)
commit 69cad093b1d32392078233166edac5180dabaf8a
Author: Vincent Untz <vuntz gnome org>
Date: Tue Mar 22 12:57:46 2011 +0100
gsm: Reorder how we fill session, to start with required components
We first fill with required components because we always want to
guarantee that explicitly defined required components are available.
Then we add normal autostart applications and default providers, which
can be overridden.
Part of https://bugzilla.gnome.org/show_bug.cgi?id=642367
gnome-session/gsm-session-fill.c | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/gnome-session/gsm-session-fill.c b/gnome-session/gsm-session-fill.c
index db3cd4d..344224b 100644
--- a/gnome-session/gsm-session-fill.c
+++ b/gnome-session/gsm-session-fill.c
@@ -228,12 +228,18 @@ static void
load_standard_apps (GsmManager *manager,
GKeyFile *keyfile)
{
- char **autostart_dirs;
- int i;
-
- autostart_dirs = gsm_util_get_autostart_dirs ();
+ g_debug ("fill: *** Adding required components");
+ handle_required_components (keyfile, !gsm_manager_get_failsafe (manager),
+ append_required_components_helper, manager);
+ g_debug ("fill: *** Done adding required components");
if (!gsm_manager_get_failsafe (manager)) {
+ char **autostart_dirs;
+ int i;
+
+ autostart_dirs = gsm_util_get_autostart_dirs ();
+
+
maybe_load_saved_session_apps (manager);
for (i = 0; autostart_dirs[i]; i++) {
@@ -241,20 +247,13 @@ load_standard_apps (GsmManager *manager,
autostart_dirs[i]);
}
+ g_strfreev (autostart_dirs);
}
- /* We do this at the end in case a saved session contains an
- * application that already provides one of the components. */
- g_debug ("fill: *** Adding required components and providers");
-
+ g_debug ("fill: *** Adding default providers");
handle_default_providers (keyfile, !gsm_manager_get_failsafe (manager),
append_required_providers_helper, manager);
- handle_required_components (keyfile, !gsm_manager_get_failsafe (manager),
- append_required_components_helper, manager);
-
- g_debug ("fill: *** Done adding required components and providers");
-
- g_strfreev (autostart_dirs);
+ g_debug ("fill: *** Done adding default providers");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]