diff options
author | Ted Gould <ted@gould.cx> | 2013-10-31 17:57:31 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-31 17:57:31 +0000 |
commit | f2ce0ee87fb8191e4fc07766f23d10badd2ec775 (patch) | |
tree | 76335695257cf5128fcfdd2a86543c657a8c1a84 /src | |
parent | da34f0cbe9eb05dcaf25fc0a502b4ae15d40ae27 (diff) | |
parent | 96efd3b86974e72d1c23a328e6892cacefc79e8c (diff) | |
download | ayatana-indicator-application-f2ce0ee87fb8191e4fc07766f23d10badd2ec775.tar.gz ayatana-indicator-application-f2ce0ee87fb8191e4fc07766f23d10badd2ec775.tar.bz2 ayatana-indicator-application-f2ce0ee87fb8191e4fc07766f23d10badd2ec775.zip |
Switch indicator application over to having an upstart job for managing the service. Also make it emit it's own event for when application indicators should be started so we can clean up the boot sequence. Fixes: https://bugs.launchpad.net/bugs/1185565.
Approved by PS Jenkins bot, Charles Kerr.
Diffstat (limited to 'src')
-rw-r--r-- | src/application-service-watcher.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index 006f3aa..13280ba 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -288,5 +288,36 @@ get_name_cb (DBusGProxy * proxy, guint status, GError * error, gpointer data) return; } + /* After we've got the name we can request upstart to trigger + the jobs of any application indicators that need to start + at desktop init time. */ + + GError * spawn_error = NULL; + gchar * argv[] = { + "initctl", + "--session", + "--user", + "emit", + "--no-wait", + "appindicators-start", + NULL, + }; + + g_spawn_async(NULL, /* Working Directory */ + argv, + NULL, /* environment */ + G_SPAWN_SEARCH_PATH, + NULL, NULL, /* child setup function */ + NULL, /* Pid */ + &spawn_error); + + if (spawn_error != NULL) { + /* NOTE: When we get to the point where we can start + assuming upstart user sessions this can be escillated + to a warning or higher */ + g_debug("Unable to signal appindicators-start to upstart: %s", spawn_error->message); + g_error_free(spawn_error); + } + return; } |