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
This commit is contained in:
parent
c330036fef
commit
b6edbd46b9
@ -499,6 +499,11 @@ const Overview = new Lang.Class({
|
|||||||
this._animateVisible();
|
this._animateVisible();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
focusSearch: function() {
|
||||||
|
this.show();
|
||||||
|
this._searchEntry.grab_key_focus();
|
||||||
|
},
|
||||||
|
|
||||||
fadeInDesktop: function() {
|
fadeInDesktop: function() {
|
||||||
this._desktopFade.opacity = 0;
|
this._desktopFade.opacity = 0;
|
||||||
this._desktopFade.show();
|
this._desktopFade.show();
|
||||||
|
@ -21,6 +21,7 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
|
|||||||
<arg type="b" direction="out" name="success" />
|
<arg type="b" direction="out" name="success" />
|
||||||
<arg type="s" direction="out" name="result" />
|
<arg type="s" direction="out" name="result" />
|
||||||
</method>
|
</method>
|
||||||
|
<method name="FocusSearch"/>
|
||||||
<method name="ShowOSD">
|
<method name="ShowOSD">
|
||||||
<arg type="a{sv}" direction="in" name="params"/>
|
<arg type="a{sv}" direction="in" name="params"/>
|
||||||
</method>
|
</method>
|
||||||
@ -116,6 +117,10 @@ const GnomeShell = new Lang.Class({
|
|||||||
return [success, returnValue];
|
return [success, returnValue];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
FocusSearch: function() {
|
||||||
|
Main.overview.focusSearch();
|
||||||
|
},
|
||||||
|
|
||||||
ShowOSD: function(params) {
|
ShowOSD: function(params) {
|
||||||
for (let param in params)
|
for (let param in params)
|
||||||
params[param] = params[param].deep_unpack();
|
params[param] = params[param].deep_unpack();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user