gnome-session r4953 - in trunk: . gnome-session
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r4953 - in trunk: . gnome-session
- Date: Thu, 14 Aug 2008 20:02:53 +0000 (UTC)
Author: mccann
Date: Thu Aug 14 20:02:53 2008
New Revision: 4953
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4953&view=rev
Log:
2008-08-14 William Jon McCann <jmccann redhat com>
* gnome-session/main.c (load_standard_apps), (load_override_apps),
(main):
Add command line option to override autostart dirs.
Modified:
trunk/ChangeLog
trunk/gnome-session/main.c
Modified: trunk/gnome-session/main.c
==============================================================================
--- trunk/gnome-session/main.c (original)
+++ trunk/gnome-session/main.c Thu Aug 14 20:02:53 2008
@@ -50,8 +50,10 @@
static gboolean failsafe = FALSE;
static gboolean show_version = FALSE;
+static char **override_autostart_dirs = NULL;
static GOptionEntry entries[] = {
+ { "autostart", 'a', 0, G_OPTION_ARG_STRING_ARRAY, &override_autostart_dirs, N_("Override standard autostart directories"), NULL },
{ "failsafe", 'f', 0, G_OPTION_ARG_NONE, &failsafe, N_("Do not load user-specified applications"), NULL },
{ "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
{ NULL, 0, 0, 0, NULL, NULL, NULL }
@@ -304,7 +306,7 @@
}
static void
-load_apps (GsmManager *manager)
+load_standard_apps (GsmManager *manager)
{
char **autostart_dirs;
int i;
@@ -331,6 +333,15 @@
g_strfreev (autostart_dirs);
}
+static void
+load_override_apps (GsmManager *manager)
+{
+ int i;
+ for (i = 0; override_autostart_dirs[i]; i++) {
+ gsm_manager_add_autostart_apps_from_dir (manager, override_autostart_dirs[i]);
+ }
+}
+
int
main (int argc, char **argv)
{
@@ -387,7 +398,11 @@
acquire_name ();
manager = gsm_manager_new (client_store, failsafe);
- load_apps (manager);
+ if (override_autostart_dirs != NULL) {
+ load_override_apps (manager);
+ } else {
+ load_standard_apps (manager);
+ }
gsm_xsmp_server_start (xsmp_server);
gsm_manager_start (manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]