Review of "Quick Settings Audio Panel" version 103

Details Page Preview

Create a new panel containing volumes and media control in the quick settings

Extension Homepage
https://github.com/Rayzeq/quick-settings-audio-panel

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 6

Shexli found 6 issues that may need reviewer attention.

EGO-P-006 warning

unnecessary build and translation artifacts should not be shipped

Compiled GSettings schemas should not be shipped for 45+ packages.

Don't include unnecessary files

  • libs/libpanel/gschemas.compiled
    libs/libpanel/gschemas.compiled

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

  • libs/libpanel/main.js:576
            this._width_constraint = new Clutter.BindConstraint({
                coordinate: Clutter.BindCoordinate.WIDTH,
                source: null,
            })
  • libs/widgets.js:590
    this._label = new St.Label({ natural_width: 0, track_hover: true, reactive: 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:44
    this._extension_controller = new ExtensionController(this.settings, this.getLogger(), this.InputVolumeIndicator, OutputVolumeSlider)
  • extension.js:108
    this._indicator = new PanelMenu.Button(0.0, "Audio panel", true)
  • libs/libpanel/main.js:576
            this._width_constraint = new Clutter.BindConstraint({
                coordinate: Clutter.BindCoordinate.WIDTH,
                source: null,
            })
  • libs/widgets.js:590
    this._label = new St.Label({ natural_width: 0, track_hover: true, reactive: 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:127
                    this._panel._grid.connect("child-added", (_self, child) => {
                        child._qsap_vis_changed_callback = child.connect("notify::visible", () => {
                            update_visibility();
                        });
                        update_visibility();
                    }
  • extension.js:133
                    this._panel._grid.connect("child-removed", (_self, child) => {
                        if (child._qsap_vis_changed_callback) {
                            child.disconnect(child._qsap_vis_changed_callback);
                            delete child._qsap_vis_changed_callback;
                        
  • libs/libpanel/main.js:451
            this.actor.connect('destroy', () => {
                if (this._timeout_id)
                    clearTimeout(this._timeout_id);
            })
  • libs/libpanel/main.js:432
            this.actor.connect_after('notify::allocation', () => {
                if (!this._single_column) {
                    // The `setTimeout` fixes the following warning:
                    // Can't update stage views actor ... is on because it needs an allocation.
                    if ((this._alignment == 
  • libs/widgets.js:550
            this._pactl_path_changed_id = settings.connect("changed::pactl-path", () => {
                this._pactl_path = get_pactl_path(settings)[0];
            })
  • libs/widgets.js:594
            this._label.connect("notify::hover", () => {
                this._label.clutter_text.line_wrap = this._label.hover ? true : false;
                this._label.clutter_text.ellipsize = this._label.hover ? Pango.EllipsizeMode.NONE : Pango.EllipsizeMode.END;
            })

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

  • libs/libpanel/main.js:438
                        this._timeout_id = setTimeout(() => {
                            this._timeout_id = null;
                            this._add_column();
                        }, 0)

EGO-L-007 warning

main loop sources should be removed before being recreated

Main loop sources should be removed before creating a new source on the same field.

Remove main loop sources

  • libs/widgets.js:203
    this._setup_timeout = setTimeout(setup, 0)

All Versions