[tracker] tracker-status-icon: add "--version" option
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-status-icon: add "--version" option
- Date: Wed, 18 Nov 2009 09:22:03 +0000 (UTC)
commit 96a166814580f43599b59353d21775d880a843de
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Nov 18 10:08:29 2009 +0100
tracker-status-icon: add "--version" option
src/tracker-status-icon/tracker-main.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-status-icon/tracker-main.c b/src/tracker-status-icon/tracker-main.c
index aa43698..3d1e394 100644
--- a/src/tracker-status-icon/tracker-main.c
+++ b/src/tracker-status-icon/tracker-main.c
@@ -29,8 +29,13 @@
#include <glib.h>
#include <glib/gi18n.h>
+static gboolean print_version;
+
/* Unused at the moment */
static GOptionEntry entries[] = {
+ { "version", 'v', 0, G_OPTION_ARG_NONE, &print_version,
+ N_("Print version"),
+ NULL},
{ NULL }
};
@@ -53,6 +58,11 @@ main (int argc, char *argv[])
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
+ if (print_version) {
+ g_print ("%s\n", PACKAGE_STRING);
+ return EXIT_SUCCESS;
+ }
+
g_type_init ();
if (!g_thread_supported ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]