Review of "GJS OSK" version 51

Details Page Preview

A new Onscreen Keyboard built using GNOME JS

Extension Homepage
https://github.com/Vishram1123/gjs-osk

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) error 1 warning 6

Shexli found 7 issues that may need reviewer attention.

EGO012 error

GSettings schema XML filename must match schema id

GSettings schema filename must match `<schema-id>.gschema.xml`.

GSettings Schemas

  • schemas/org.gnome.shell.extensions.gjsosk.gschema.xml
    expected_filename='org.gnome.shell.extensions.gjsosk.indicator.gschema.xml'

EGO015 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:436
                this._indicator.connect("button-press-event", () => {
                    this._toggleKeyboard();
                    return Clutter.EVENT_STOP;
                })
  • extension.js:494
    this._indicator.connect("button-press-event", () => this._toggleKeyboard())
  • extension.js:440
                this._indicator.connect("touch-event", (_actor, event) => {
                    if (event.type() == Clutter.EventType.TOUCH_END) {
                        this._toggleKeyboard();
                        return Clutter.EVENT_STOP;
                    }
                    return Clutter.EVENT_PROPAGATE;
        
  • extension.js:495
                    this._indicator.connect("touch-event", (_actor, event) => {
                        if (event.type() == Clutter.EventType.TOUCH_END) this._toggleKeyboard()
                    })
  • extension.js:58
    item.connect('activate', () => this.settings.set_int("enable-tap-gesture", num))
  • extension.js:663
                    oskEdgeDragAction.connect('activated', () => {
                        this.open(true);
                        this.openedFromButton = true;
                        this.closedFromButton = false;
                        this.gestureInProgress = false;
                    })
  • extension.js:1547
    item.connect("button-press-event", () => pressEv("mouse"))
  • extension.js:1548
    item.connect("button-release-event", releaseEv)
  • extension.js:702
                    oskEdgeDragAction.connect('cancel', () => {
                        if (this.gestureInProgress) {
                            this.close()
                            this.openedFromButton = false;
                            this.closedFromButton = true;
                        }
                        th
  • extension.js:1270
                    closeBtn.connect("button-press-event", () => {
                        this.close();
                        this.closedFromButton = true;
                    })
  • extension.js:1375
                    closeBtn.connect("button-press-event", () => {
                        this.close();
                        this.closedFromButton = true;
                    })
  • extension.js:1274
                    closeBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN) {
                            this.close();
                            this.closedFromButton = true;
                        }
                    })
  • extension.js:1379
                    closeBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN) {
                            this.close();
                            this.closedFromButton = true;
                        }
                    })
  • extension.js:1424
                item.connect("destroy", () => {
                    if (item.button_pressed !== null) {
                        clearTimeout(item.button_pressed)
                        item.button_pressed == null
                    }
                    if (item.button_repeat !== null) {
                        clearInterval
  • extension.js:696
                    oskEdgeDragAction.connect('end', () => {
                        this.open(true);
                        this.openedFromButton = true;
                        this.closedFromButton = false;
                        this.gestureInProgress = false;
                    })
  • extension.js:669
                    oskEdgeDragAction.connect('gesture-cancel', () => {
                        if (this.gestureInProgress) {
                            this.close()
                            this.openedFromButton = false;
                            this.closedFromButton = true;
                        }
                  
  • extension.js:693
                    oskEdgeDragAction.connect('may-recognize', () => {
                        return Shell.ActionMode.ALL & ~Shell.ActionMode.LOCK_SCREEN & Main.actionMode;
                    })
  • extension.js:1406
                moveHandle.connect("event", (actor, event) => {
                    if (event.type() == Clutter.EventType.BUTTON_PRESS || event.type() == Clutter.EventType.TOUCH_BEGIN) {
                        this.draggable = this.settings.get_boolean("enable-drag");
                    }
                    this.eve
  • extension.js:1299
                moveHandleLeft.connect("event", (actor, event) => {
                    if (event.type() == Clutter.EventType.BUTTON_PRESS || event.type() == Clutter.EventType.TOUCH_BEGIN) {
                        this.draggable = this.settings.get_boolean("enable-drag");
                    }
                    this
  • extension.js:1320
                moveHandleRight.connect("event", (actor, event) => {
                    if (event.type() == Clutter.EventType.BUTTON_PRESS || event.type() == Clutter.EventType.TOUCH_BEGIN) {
                        this.draggable = this.settings.get_boolean("enable-drag");
                    }
                    thi
  • extension.js:678
                    oskEdgeDragAction.connect('progress', (_action, progress) => {
                        if (!this.gestureInProgress)
                            this.open(false)
                        this.setOpenState(Math.min(Math.max(0, (progress / (side % 2 == 0 ? this.box.height : this.box.width)) * 100), 
  • extension.js:711
                    oskEdgeDragAction.connect('progress', (_action, progress) => {
                        if (!this.gestureInProgress)
                            this.open(false)
                        this.setOpenState(Math.min(Math.max(0, (progress / (side % 2 == 0 ? this.box.height : this.box.width)) * 100), 
  • extension.js:1250
                    settingsBtn.connect("button-press-event", () => {
                        this.settingsOpenFunction();
                    })
  • extension.js:1356
                    settingsBtn.connect("button-press-event", () => {
                        this.settingsOpenFunction();
                    })
  • extension.js:1253
                    settingsBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN)
                            this.settingsOpenFunction();
                    })
  • extension.js:1359
                    settingsBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN)
                            this.settingsOpenFunction();
                    })
  • extension.js:1549
                item.connect("touch-event", () => {
                    if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN) {
                        pressEv("touch")
                    } else if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_END || Clutter.get_current_event().

EGO016 warning

main loop sources should be removed in disable()

Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.

Remove main loop sources

  • extension.js:231
    this.waitRefresh = setTimeout(refresh, 1000)

EGO014 warning

objects created by extension should be destroyed in disable()

Objects assigned in `enable()` are missing matching `.destroy()` calls in `disable()` or its helper methods.

Destroy all objects

  • extension.js:606
            this.box = new St.Widget({
                reactive: true,
                layout_manager: new Clutter.GridLayout({
                    orientation: Clutter.Orientation.HORIZONTAL,
                })
            })
  • extension.js:615
    this.nonDragBlocker = new Clutter.Actor()

EGO014 warning

objects created by extension should be destroyed in disable()

Object collections created in `enable()` are missing matching destroy loops in `disable()` or its helper methods.

Destroy all objects

  • extension.js:1185
    keyBtn
  • extension.js:1180
    keyBtn

EGO027 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • extension.js:606
            this.box = new St.Widget({
                reactive: true,
                layout_manager: new Clutter.GridLayout({
                    orientation: Clutter.Orientation.HORIZONTAL,
                })
            })
  • extension.js:615
    this.nonDragBlocker = new Clutter.Actor()

EGO030 warning

extensions should avoid synchronous file IO in shell code

Shell code should avoid synchronous file IO APIs like `GLib.file_get_contents()` and `Gio.File.load_contents()`.

File Operations

  • extension.js:190
    GLib.file_get_contents(this.path + '/physicalLayouts.json')
  • extension.js:370
    GLib.file_get_contents(keycodesPath)

All Versions