[tracker] Add command line options to tracker-search-tool
- From: Ivan Frade <ifrade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] Add command line options to tracker-search-tool
- Date: Thu, 12 Nov 2009 17:34:11 +0000 (UTC)
commit 69e116a23037c424f2369c639c555e665e9d1ab7
Author: Juan A. Suarez <jasuarez igalia com>
Date: Thu Nov 12 19:30:55 2009 +0200
Add command line options to tracker-search-tool
Author: Juan A. Suarez <jasuarez igalia com>
src/tracker-search-tool/tracker-search-tool.gs | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-search-tool/tracker-search-tool.gs b/src/tracker-search-tool/tracker-search-tool.gs
index b2a59af..3a7a63d 100644
--- a/src/tracker-search-tool/tracker-search-tool.gs
+++ b/src/tracker-search-tool/tracker-search-tool.gs
@@ -23,6 +23,9 @@ uses
Gtk
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 }}
[DBus (name = "org.freedesktop.Tracker1.SearchTool")]
class TrackerSearchToolServer : GLib.Object
@@ -32,6 +35,21 @@ class TrackerSearchToolServer : GLib.Object
init
Gtk.init (ref args)
+ /* get options */
+
+ var option_context = new OptionContext ("tracker-search-tool")
+ option_context.set_help_enabled (true)
+ option_context.add_main_entries (options, null)
+
+ try
+ option_context.parse (ref args)
+
+ except e : GLib.OptionError
+
+ stdout.printf ("%s\n", e.message)
+ stdout.printf ("Run '%s --help' to see a full list of available command line options.\n", args[0])
+ return
+
var server = new TrackerSearchToolServer
try
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]