Review of "Squircle Clock" version 1

Details Page Preview

An elegant, customizable floating digital desktop clock widget with drag-and-drop placement positioning.

Extension Homepage
https://github.com/SANJAY-N0/Squircle-clock

No comments.

FAQ

Files

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

Shexli (experimental) warning 5

Shexli found 5 issues that may need reviewer attention.

EGO-X-004 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:182
    GLib.file_get_contents(this._configFile)
  • extension.js:206
    GLib.file_get_contents(this._configFile)

EGO-L-002 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:92
            this._timeLabel = new St.Label({
                x_align: Clutter.ActorAlign.CENTER,
                y_align: Clutter.ActorAlign.CENTER,
                x_expand: true,
                y_expand: true
            })

EGO-L-005 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:92
            this._timeLabel = new St.Label({
                x_align: Clutter.ActorAlign.CENTER,
                y_align: Clutter.ActorAlign.CENTER,
                x_expand: true,
                y_expand: true
            })

EGO-L-003 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:103
            this._container.connect('button-press-event', (actor, event) => {
                if (!this._dragMode) return Clutter.EVENT_PROPAGATE;
                isDragging = true;
                let [x, y] = event.get_coords();
                let [ax, ay] = actor.get_position();
                offsetOffsetX = x - ax;
    
  • extension.js:120
            this._container.connect('button-release-event', () => {
                if (!isDragging) return Clutter.EVENT_PROPAGATE;
                isDragging = false;
                let [ax, ay] = this._container.get_position();
                this._writePositionToConfig(ax, ay);
                return Clutter.EVENT_ST
  • extension.js:113
            this._container.connect('motion-event', (actor, event) => {
                if (!isDragging || !this._dragMode) return Clutter.EVENT_PROPAGATE;
                let [x, y] = event.get_coords();
                this._container.set_position(x - offsetOffsetX, y - offsetOffsetY);
                return Clutter.

EGO-L-006 warning

preferences classes should not retain window-scoped objects on instance fields without close-request cleanup

Preferences code stores window-scoped objects on the exported prefs class without `close-request` cleanup.

Destroy all objects

  • prefs.js:14
    this._configFile = GLib.build_filenamev([this.path, 'config.json'])

All Versions

Version Status
1 Unreviewed