Review of "Auto Timer" version 2

Details Page Preview

Quick Settings toggle: after a countdown or at a set clock time, close chosen apps and/or shut down, restart or suspend the system.

Extension Homepage
https://github.com/Baryonex/auto-timer

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) warning 4

Shexli found 4 issues that may need reviewer attention.

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:239
    this._actionItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:228
    this._appsItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:297
    this._clockItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:255
    this._delayItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:258
            this._entry = new St.Entry({
                hint_text: 'Custom minutes… (Enter)',
                can_focus: true,
                x_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:239
    this._actionItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:228
    this._appsItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:297
    this._clockItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:255
    this._delayItem = new PopupMenu.PopupSubMenuMenuItem('')
  • extension.js:258
            this._entry = new St.Entry({
                hint_text: 'Custom minutes… (Enter)',
                can_focus: true,
                x_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:217
                this.menu.connect('open-state-changed', (_menu, open) => {
                    if (open) {
                        this._rebuildApps();
                        this._refreshLabels();
                    }
                })

EGO-L-004 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:574
                this._powerOffId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, GRACE_SECONDS, () => {
                    this._powerOffId = 0;
                    this._runSystemAction(cfg.action);
                    return GLib.SOURCE_REMOVE;
                })
  • extension.js:522
    this._tickId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => this._tick())

All Versions

Version Status
6 Unreviewed
5 Rejected
4 Rejected
3 Rejected
2 Unreviewed
1 Rejected