gdm r6083 - in trunk: . utils



Author: mccann
Date: Tue Apr  1 01:05:10 2008
New Revision: 6083
URL: http://svn.gnome.org/viewvc/gdm?rev=6083&view=rev

Log:
2008-03-31  William Jon McCann  <jmccann redhat com>

	* utils/gdmflexiserver.c: (main):
	Add --version command line option.



Modified:
   trunk/ChangeLog
   trunk/utils/gdmflexiserver.c

Modified: trunk/utils/gdmflexiserver.c
==============================================================================
--- trunk/utils/gdmflexiserver.c	(original)
+++ trunk/utils/gdmflexiserver.c	Tue Apr  1 01:05:10 2008
@@ -52,6 +52,7 @@
 static gboolean    authenticate     = FALSE;
 static gboolean    startnew         = FALSE;
 static gboolean    monte_carlo_pi   = FALSE;
+static gboolean    show_version     = FALSE;
 static char      **args_remaining   = NULL;
 
 /* Keep all config options for compatibility even if they are noops */
@@ -63,6 +64,7 @@
         { "authenticate", 'a', 0, G_OPTION_ARG_NONE, &authenticate, N_("Authenticate before running --command"), NULL },
         { "startnew", 's', 0, G_OPTION_ARG_NONE, &startnew, N_("Start new flexible session; do not show popup"), NULL },
         { "monte-carlo-pi", 0, 0, G_OPTION_ARG_NONE, &monte_carlo_pi, NULL, NULL },
+        { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
         { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL },
         { NULL }
 };
@@ -690,6 +692,12 @@
         g_option_context_parse (ctx, &argc, &argv, NULL);
         g_option_context_free (ctx);
 
+
+        if (show_version) {
+                g_print ("%s %s\n", argv [0], VERSION);
+                exit (1);
+        }
+
         /* don't support commands */
         if (send_command != NULL) {
                 g_warning ("No longer supported");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]