[tracker/tracker-0.8] tracker-search-tool: Accept command line search terms



commit 09e6c3c0a2b614fee5993c8178a1e6fe9e3e846b
Author: Ken Schmedding <schmedk gmail com>
Date:   Tue Apr 27 08:43:17 2010 +0100

    tracker-search-tool: Accept command line search terms

 src/tracker-search-tool/tracker-search-tool.gs |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-search-tool/tracker-search-tool.gs b/src/tracker-search-tool/tracker-search-tool.gs
index a29c97e..2c18577 100644
--- a/src/tracker-search-tool/tracker-search-tool.gs
+++ b/src/tracker-search-tool/tracker-search-tool.gs
@@ -37,6 +37,7 @@ const static LICENSE : string =\
 window : Window
 service : string?
 terms : array of string?
+search_string : string?
 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 }}
 
@@ -161,4 +162,8 @@ init
 
     window.show_all ()
 
+    if (terms is not null)
+        search_string = string.joinv (" ", terms)
+        entry.set_text (search_string)
+
     Gtk.main ()



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