gnome-shell/js
Florian Müllner f45ccc9143 signalTracker: Provide monkey-patching for (dis)connectObject()
The module exports a `addObjectSignalMethods()` method that extends
the provided prototype with `connectObject()` and `disconnectObject()`
methods.

In its simplest form, `connectObject()` looks like the regular
`connect()` method, except for an additional parameter:

```js
    this._button.connectObject('clicked',
        () => this._onButtonClicked(), this);
```

The additional object can be used to disconnect all handlers on the
instance that were connected with that object, similar to
`g_signal_handlers_disconnect_by_data()` (which cannot be used
from introspection).

For objects that are subclasses of Clutter.Actor, that will happen
automatically when the actor is destroyed, similar to
`g_signal_connect_object()`.

Finally, `connectObject()` allows to conveniently connect multiple
signals at once, similar to `g_object_connect()`:

```js
    this._toggleButton.connect(
        'clicked', () => this._onClicked(),
        'notify::checked', () => this._onChecked(), this);
```

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1953>
2022-03-04 14:14:37 +00:00
..
dbusServices js: Simplify promisify() calls 2022-02-11 16:24:01 +00:00
gdm cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
misc signalTracker: Provide monkey-patching for (dis)connectObject() 2022-03-04 14:14:37 +00:00
perf cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
portalHelper cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
ui signalTracker: Provide monkey-patching for (dis)connectObject() 2022-03-04 14:14:37 +00:00
js-resources.gresource.xml signalTracker: Provide monkey-patching for (dis)connectObject() 2022-03-04 14:14:37 +00:00
meson.build extensions-app: Move Extensions app to new subproject 2020-03-27 23:33:30 +00:00
portal-resources.gresource.xml js: Remove unused files from resources 2020-03-09 13:18:48 +00:00