Skip to content

Commit c4e61cf

Browse files
authored
locatePointer: Fix and object name and cleanup (#13585)
Properly case the LocatePointer object, remove usage of Lang.bind, and clean up unused imports
1 parent 369ee7e commit c4e61cf

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

js/ui/locatePointer.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
22

3-
const { Clutter, Gio, GLib, St } = imports.gi;
3+
const { Clutter, Gio } = imports.gi;
44
const Ripples = imports.ui.ripples;
5-
const Lang = imports.lang;
65
const Main = imports.ui.main;
76

87
const LOCATE_POINTER_ENABLED_SCHEMA = "org.cinnamon.desktop.peripherals.mouse"
98
const LOCATE_POINTER_SCHEMA = "org.cinnamon.muffin"
109

11-
var locatePointer = class {
10+
var LocatePointer = class {
1211
constructor() {
1312
this._enabledSettings = new Gio.Settings({schema_id: LOCATE_POINTER_ENABLED_SCHEMA});
1413
this._enabledSettings.connect('changed::locate-pointer', this._updateKey.bind(this));
@@ -23,7 +22,7 @@ var locatePointer = class {
2322
_updateKey() {
2423
if (this._enabledSettings.get_boolean("locate-pointer")) {
2524
let modifierKeys = this._keySettings.get_strv('locate-pointer-key');
26-
Main.keybindingManager.addHotKeyArray('locate-pointer', modifierKeys, Lang.bind(this, this.show));
25+
Main.keybindingManager.addHotKeyArray('locate-pointer', modifierKeys, this.show.bind(this));
2726
} else {
2827
Main.keybindingManager.removeHotKey('locate-pointer');
2928
}

js/ui/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ function start() {
464464
}
465465

466466
magnifier = new Magnifier.Magnifier();
467-
locatePointer = new LocatePointer.locatePointer();
467+
locatePointer = new LocatePointer.LocatePointer();
468468

469469
layoutManager.init();
470470
overview.init();

0 commit comments

Comments
 (0)