[gnome-shell] overview: Add focusSearch() method and export it over DBus
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overview: Add focusSearch() method and export it over DBus
- Date: Fri, 17 May 2013 16:28:21 +0000 (UTC)
commit 434f1edb25d7e96b3341eeff58bbe7d66fef9cec
Author: Florian Müllner <fmuellner gnome org>
Date: Fri May 17 17:31:27 2013 +0200
overview: Add focusSearch() method and export it over DBus
Some keyboard spot a dedicated search key, which gnome-settings-daemon
currently handles by spawning gnome-search-tool. It makes a lot of
sense to promote the Shell's integrated search feature instead, so
expose an appropriate DBus method g-s-d can use.
https://bugzilla.gnome.org/show_bug.cgi?id=700536
js/ui/overview.js | 5 +++++
js/ui/shellDBus.js | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 12785ad..d49f51a 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -477,6 +477,11 @@ const Overview = new Lang.Class({
this._animateVisible();
},
+ focusSearch: function() {
+ this.show();
+ this._searchEntry.grab_key_focus();
+ },
+
fadeInDesktop: function() {
this._desktopFade.opacity = 0;
this._desktopFade.show();
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 952613b..84597fd 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -21,6 +21,7 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
<arg type="b" direction="out" name="success" />
<arg type="s" direction="out" name="result" />
</method>
+<method name="FocusSearch"/>
<method name="ShowOSD">
<arg type="a{sv}" direction="in" name="params"/>
</method>
@@ -116,6 +117,10 @@ const GnomeShell = new Lang.Class({
return [success, returnValue];
},
+ FocusSearch: function() {
+ Main.overview.focusSearch();
+ },
+
ShowOSD: function(params) {
for (let param in params)
params[param] = params[param].deep_unpack();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]