diff --git a/js/ui/overview.js b/js/ui/overview.js index 0020dcd4f..6f838db6b 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -605,6 +605,10 @@ var Overview = class { this.show(); } + showApps() { + this._show(OverviewControls.ControlsState.APP_GRID); + } + getShowAppsButton() { logError(new Error('Usage of Overview.\'getShowAppsButton\' is deprecated, ' + 'use \'dash.showAppsButton\' property instead')); diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 2f584d209..f836f822e 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -178,6 +178,8 @@ class ControlsManager extends St.Widget { } animateToOverview(state, callback) { + this._ignoreShowAppsButtonToggle = true; + this.viewSelector.prepareToEnterOverview(); this._stateAdjustment.value = ControlsState.HIDDEN; @@ -189,6 +191,11 @@ class ControlsManager extends St.Widget { callback(); }, }); + + this.dash.showAppsButton.checked = + state === ControlsState.APP_GRID; + + this._ignoreShowAppsButtonToggle = false; } animateFromOverview(callback) { diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 181bd1631..14e449f74 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -10,6 +10,7 @@ const Main = imports.ui.main; const Screenshot = imports.ui.screenshot; const { loadInterfaceXML } = imports.misc.fileUtils; +const { ControlsState } = imports.ui.overviewControls; const GnomeShellIface = loadInterfaceXML('org.gnome.Shell'); const ScreenSaverIface = loadInterfaceXML('org.gnome.ScreenSaver'); @@ -104,7 +105,7 @@ var GnomeShell = class { } ShowApplications() { - Main.overview.viewSelector.showApps(); + Main.overview.show(ControlsState.APP_GRID); } GrabAcceleratorAsync(params, invocation) { diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index bbd412ff0..1abdf9cff 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -369,7 +369,7 @@ var ViewSelector = GObject.registerClass({ if (Main.overview.visible) Main.overview.hide(); else - this.showApps(); + Main.overview.show(ControlsState.APP_GRID); }); global.stage.add_action(gesture); @@ -391,11 +391,6 @@ var ViewSelector = GObject.registerClass({ Main.overview.show(); } - showApps() { - this._showAppsButton.checked = true; - Main.overview.show(); - } - prepareToEnterOverview() { this.show(); this.reset();