[tracker] tracker-search-tool: add "--version" option
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-search-tool: add "--version" option
- Date: Wed, 18 Nov 2009 09:22:14 +0000 (UTC)
commit 28cd55f12b315fb42c8189d918c6067fe3108065
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Nov 18 10:08:28 2009 +0100
tracker-search-tool: add "--version" option
src/tracker-search-tool/tracker-search-tool.gs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-search-tool/tracker-search-tool.gs b/src/tracker-search-tool/tracker-search-tool.gs
index 3a7a63d..389af54 100644
--- a/src/tracker-search-tool/tracker-search-tool.gs
+++ b/src/tracker-search-tool/tracker-search-tool.gs
@@ -22,10 +22,14 @@
uses
Gtk
+[CCode (cheader_filename = "config.h")]
+const extern static PACKAGE_STRING : string
+
window : Window
service : string?
terms : array of string?
-const options : array of OptionEntry = {{"service", 's', 0, OptionArg.STRING, ref service, "Search from a specific service", "SERVICE" }, {"", 0, 0, OptionArg.STRING_ARRAY, ref terms, "search terms", null}, { null }}
+print_version: bool
+const options : array of OptionEntry = {{"service", 's', 0, OptionArg.STRING, ref service, "Search from a specific service", "SERVICE" }, {"version", 'v', 0, OptionArg.NONE, ref print_version, "Print version", null }, {"", 0, 0, OptionArg.STRING_ARRAY, ref terms, "search terms", null}, { null }}
[DBus (name = "org.freedesktop.Tracker1.SearchTool")]
class TrackerSearchToolServer : GLib.Object
@@ -50,6 +54,10 @@ init
stdout.printf ("Run '%s --help' to see a full list of available command line options.\n", args[0])
return
+ if (print_version)
+ stdout.printf ("%s\n", PACKAGE_STRING)
+ return
+
var server = new TrackerSearchToolServer
try
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]