gnome-session r4935 - in trunk: . capplet



Author: mccann
Date: Mon Aug 11 21:37:48 2008
New Revision: 4935
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4935&view=rev

Log:
2008-08-11  William Jon McCann  <jmccann redhat com>

	* capplet/main.c (main):
	Add support for --version.




Modified:
   trunk/ChangeLog
   trunk/capplet/main.c

Modified: trunk/capplet/main.c
==============================================================================
--- trunk/capplet/main.c	(original)
+++ trunk/capplet/main.c	Mon Aug 11 21:37:48 2008
@@ -31,7 +31,10 @@
 
 #include "gsm-properties-dialog.h"
 
+static gboolean    show_version     = FALSE;
+
 static GOptionEntry options[] = {
+        { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
         { NULL, 0, 0, 0, NULL, NULL, NULL }
 };
 
@@ -60,6 +63,11 @@
                 exit (1);
         }
 
+        if (show_version) {
+                g_print ("%s %s\n", argv [0], VERSION);
+                exit (1);
+        }
+
         dialog = gsm_properties_dialog_new ();
         g_signal_connect (dialog,
                           "response",



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