Review of "GJS OSK" version 52

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 2 warning 6

Shexli found 8 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'

EGO017 error

deprecated modules must not be imported

Deprecated module `ByteArray` is imported.

Do not use deprecated modules

  • extension.js:18
    ByteArray = imports.byteArray
  • extension.js:18
    const ByteArray = imports.byteArray;

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:432
                this._indicator.connect("button-press-event", () => {
                    this._toggleKeyboard();
                    return Clutter.EVENT_STOP;
                })
  • extension.js:489
    this._indicator.connect("button-press-event", () => this._toggleKeyboard())
  • extension.js:436
                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:490
                    this._indicator.connect("touch-event", (_actor, event) => {
                        if (event.type() == Clutter.EventType.TOUCH_END) this._toggleKeyboard()
                    })
  • extension.js:649
                bottomDragAction.connect('activated', () => {
                    this.open(true);
                    this.openedFromButton = true;
                    this.closedFromButton = false;
                    this.gestureInProgress = false;
                })
  • extension.js:1467
    item.connect("button-press-event", () => pressEv("mouse"))
  • extension.js:1468
    item.connect("button-release-event", releaseEv)
  • extension.js:1202
                    closeBtn.connect("button-press-event", () => {
                        this.close();
                        this.closedFromButton = true;
                    })
  • extension.js:1297
                    closeBtn.connect("button-press-event", () => {
                        this.close();
                        this.closedFromButton = true;
                    })
  • extension.js:1206
                    closeBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN) {
                            this.close();
                            this.closedFromButton = true;
                        }
                    })
  • extension.js:1301
                    closeBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN) {
                            this.close();
                            this.closedFromButton = true;
                        }
                    })
  • extension.js:1345
                item.connect("destroy", () => {
                    if (item.button_pressed !== null) {
                        clearTimeout(item.button_pressed)
                        item.button_pressed == null
                    }
                    if (item.button_repeat !== null) {
                        clearInterval
  • extension.js:661
                bottomDragAction.connect('gesture-cancel', () => {
                    if (this.gestureInProgress) {
                        this.close()
                        this.openedFromButton = false;
                        this.closedFromButton = true;
                    }
                    this.gestureInProgress 
  • extension.js:1327
                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:1230
                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:1250
                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:655
                bottomDragAction.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), 100))
               
  • extension.js:1182
                    settingsBtn.connect("button-press-event", () => {
                        this.settingsOpenFunction();
                    })
  • extension.js:1278
                    settingsBtn.connect("button-press-event", () => {
                        this.settingsOpenFunction();
                    })
  • extension.js:1185
                    settingsBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN)
                            this.settingsOpenFunction();
                    })
  • extension.js:1281
                    settingsBtn.connect("touch-event", () => {
                        if (Clutter.get_current_event().type() == Clutter.EventType.TOUCH_BEGIN)
                            this.settingsOpenFunction();
                    })
  • extension.js:1469
                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:228
    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:596
            this.box = new St.Widget({
                reactive: true,
                layout_manager: new Clutter.GridLayout({
                    orientation: Clutter.Orientation.HORIZONTAL,
                })
            })
  • extension.js:604
    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:1128
    keyBtn
  • extension.js:1123
    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:596
            this.box = new St.Widget({
                reactive: true,
                layout_manager: new Clutter.GridLayout({
                    orientation: Clutter.Orientation.HORIZONTAL,
                })
            })
  • extension.js:604
    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:187
    GLib.file_get_contents(Me.path + '/physicalLayouts.json')
  • extension.js:367
    GLib.file_get_contents(keycodesPath)

All Versions