[gnome-shell/wip/re-search-v2: 1/29] remote-search: add a LaunchSearch() DBus method



commit 3a8f56b18d2bb9af28c210add7acf20b178b8210
Author: Tanner Doshier <doshitan gmail com>
Date:   Mon Nov 26 16:55:25 2012 -0500

    remote-search: add a LaunchSearch() DBus method
    
    This will be used to launch a search in the application itself.

 data/org.gnome.ShellSearchProvider.xml |   20 ++++++++++++++++++++
 js/ui/remoteSearch.js                  |    7 +++++++
 js/ui/search.js                        |   10 ++++++++++
 3 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/data/org.gnome.ShellSearchProvider.xml b/data/org.gnome.ShellSearchProvider.xml
index 558e662..4bf3076 100644
--- a/data/org.gnome.ShellSearchProvider.xml
+++ b/data/org.gnome.ShellSearchProvider.xml
@@ -143,5 +143,25 @@
         </doc:doc>
       </arg>
     </method>
+
+    <method name="LaunchSearch">
+      <doc:doc>
+        <doc:description>
+          <doc:para>
+            Called when the user clicks on the provider icon. The provider
+            application should open and run the active search term itself.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+      <arg type="as" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The current search term(s).
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+    </method>
   </interface>
 </node>
diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js
index c9b25c6..e6bdc8d 100644
--- a/js/ui/remoteSearch.js
+++ b/js/ui/remoteSearch.js
@@ -27,6 +27,9 @@ const SearchProviderIface = <interface name="org.gnome.Shell.SearchProvider">
 <method name="ActivateResult">
     <arg type="s" direction="in" />
 </method>
+<method name="LaunchSearch">
+    <arg type="as" direction="in" />
+</method>
 </interface>;
 
 var SearchProviderProxy = Gio.DBusProxy.makeProxyWrapper(SearchProviderIface);
@@ -260,6 +263,10 @@ const RemoteSearchProvider = new Lang.Class({
 
     activateResult: function(id) {
         this._proxy.ActivateResultRemote(id);
+    },
+
+    launchSearch: function(terms) {
+        this._proxy.LaunchSearchRemote(terms);
     }
 });
 
diff --git a/js/ui/search.js b/js/ui/search.js
index 2e746d8..d3fa3b1 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -167,6 +167,16 @@ const SearchProvider = new Lang.Class({
      */
     activateResult: function(id) {
         throw new Error('Not implemented');
+    },
+
+    /**
+     * launchSearch:
+     * @terms: Current search terms
+     *
+     * Called when the user clicks the provider icon.
+     */
+    launchSearch: function(terms) {
+        throw new Error('Not implemented');
     }
 });
 Signals.addSignalMethods(SearchProvider.prototype);



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