phonemgr r291 - in trunk: . src



Author: hadess
Date: Mon May 12 19:58:01 2008
New Revision: 291
URL: http://svn.gnome.org/viewvc/phonemgr?rev=291&view=rev

Log:
2008-05-12  Bastien Nocera  <hadess hadess net>

	* src/main.c (main): Add -v/--version to display the program's
	version (Closes: #524360)



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

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Mon May 12 19:58:01 2008
@@ -31,11 +31,13 @@
 static char *bdaddr_ident = NULL;
 static char *bdaddr_config = NULL;
 static gboolean debug = FALSE;
+static gboolean version = FALSE;
 
 const GOptionEntry options[] = {
 	{ "identify", '\0', 0, G_OPTION_ARG_STRING, &bdaddr_ident, N_("Show model name of a specific device"), NULL },
 	{ "config", '\0', 0, G_OPTION_ARG_STRING, &bdaddr_config, N_("Write the configuration file for gnokii debugging"), NULL },
 	{ "debug", 'd', 0, G_OPTION_ARG_NONE, &debug, N_("Enable debug"), NULL},
+	{ "version", 'v', 0, G_OPTION_ARG_NONE, &version, N_("Show version information and exit"), NULL },
 	{ NULL }
 };
 
@@ -66,6 +68,11 @@
 		return 1;
 	}
 
+	if (version != FALSE) {
+		g_print (_("gnome-phone-manager version %s\n"), VERSION);
+		return 0;
+	}
+
 	if (bdaddr_ident != NULL) {
 		phonemgr_utils_tell_driver (bdaddr_ident);
 		return 0;



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