[gnome-shell/wip/jimmac/dash-icon-spacing: 39/72] viewSelector: Move 'toggle-overview' shortcut to overview




commit 5b28a6f79a93fe98318bddd5f465a731d25ff5ac
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Jan 2 17:10:36 2021 -0300

    viewSelector: Move 'toggle-overview' shortcut to overview
    
    It is handled there already, there's no reason for it to continue
    to be in ViewSelector.

 js/ui/overview.js     | 10 +++++++++-
 js/ui/viewSelector.js |  7 -------
 2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 2c3bb50f1d..2577b691c6 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -1,7 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 /* exported Overview */
 
-const { Clutter, GLib, GObject, Meta, Shell, St } = imports.gi;
+const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
 const Signals = imports.signals;
 
 // Time for initial animation going into Overview mode;
@@ -14,6 +14,7 @@ const Main = imports.ui.main;
 const MessageTray = imports.ui.messageTray;
 const OverviewControls = imports.ui.overviewControls;
 const Params = imports.misc.params;
+const WindowManager = imports.ui.windowManager;
 
 var DND_WINDOW_SWITCH_TIMEOUT = 750;
 
@@ -228,6 +229,13 @@ var Overview = class {
 
         Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
         this._relayout();
+
+        Main.wm.addKeybinding(
+            'toggle-overview',
+            new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
+            Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+            Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+            this.toggle.bind(this));
     }
 
     addSearchProvider(provider) {
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 027b6ef305..d937acbab0 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -289,13 +289,6 @@ var ViewSelector = GObject.registerClass({
                               Shell.ActionMode.OVERVIEW,
                               this._toggleAppsPage.bind(this));
 
-        Main.wm.addKeybinding('toggle-overview',
-                              new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
-                              Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
-                              Shell.ActionMode.NORMAL |
-                              Shell.ActionMode.OVERVIEW,
-                              Main.overview.toggle.bind(Main.overview));
-
         let side;
         if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
             side = St.Side.RIGHT;


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