summaryrefslogtreecommitdiff
path: root/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js
diff options
context:
space:
mode:
authorAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
committerAlexanderCurl <alexc@alexc.hu>2026-04-18 17:46:06 +0100
commit70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch)
treeab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js
parent5d94c0a7d44a2255b81815a52a7056a94a39842d (diff)
downloadRaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz
RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js')
-rw-r--r--raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js108
1 files changed, 0 insertions, 108 deletions
diff --git a/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js b/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js
deleted file mode 100644
index 047f2d2..0000000
--- a/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/dbusProxy.js
+++ /dev/null
@@ -1,108 +0,0 @@
-import Gio from 'gi://Gio';
-import GLib from 'gi://GLib';
-import GObject from 'gi://GObject';
-
-import {CancellableChild, Logger} from './util.js';
-
-Gio._promisify(Gio.DBusProxy.prototype, 'init_async');
-
-export const DBusProxy = GObject.registerClass({
- Signals: {'destroy': {}},
-}, class DBusProxy extends Gio.DBusProxy {
- static get TUPLE_VARIANT_TYPE() {
- if (!this._tupleVariantType)
- this._tupleVariantType = new GLib.VariantType('(v)');
-
- return this._tupleVariantType;
- }
-
- static destroy() {
- delete this._tupleType;
- }
-
- _init(busName, objectPath, interfaceInfo, flags = Gio.DBusProxyFlags.NONE) {
- if (interfaceInfo.signals.length)
- Logger.warn('Avoid exposing signals to gjs!');
-
- super._init({
- gConnection: Gio.DBus.session,
- gInterfaceName: interfaceInfo.name,
- gInterfaceInfo: interfaceInfo,
- gName: busName,
- gObjectPath: objectPath,
- gFlags: flags,
- });
-
- this._signalIds = [];
-
- if (!(flags & Gio.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS)) {
- this._signalIds.push(this.connect('g-signal',
- (_proxy, ...args) => this._onSignal(...args)));
- }
-
- this._signalIds.push(this.connect('notify::g-name-owner', () => {
- if (!this.gNameOwner) {
- this._cancellable.cancel();
- this._cancellable = new Gio.Cancellable();
- }
- this._onNameOwnerChanged();
- }));
- }
-
- async initAsync(cancellable) {
- cancellable = new CancellableChild(cancellable);
- await this.init_async(GLib.PRIORITY_DEFAULT, cancellable);
- this._cancellable = cancellable;
-
- this.gInterfaceInfo.methods.map(m => m.name).forEach(method =>
- this._ensureAsyncMethod(method));
- }
-
- destroy() {
- this.emit('destroy');
-
- this._signalIds.forEach(id => this.disconnect(id));
-
- if (this._cancellable)
- this._cancellable.cancel();
- }
-
- // This can be removed when we will have GNOME 43 as minimum version
- _ensureAsyncMethod(method) {
- if (this[`${method}Async`])
- return;
-
- if (!this[`${method}Remote`])
- throw new Error(`Missing remote method '${method}'`);
-
- this[`${method}Async`] = function (...args) {
- return new Promise((resolve, reject) => {
- this[`${method}Remote`](...args, (ret, e) => {
- if (e)
- reject(e);
- else
- resolve(ret);
- });
- });
- };
- }
-
- _onSignal() {
- }
-
- getProperty(propertyName, cancellable) {
- return this.gConnection.call(this.gName,
- this.gObjectPath, 'org.freedesktop.DBus.Properties', 'Get',
- GLib.Variant.new('(ss)', [this.gInterfaceName, propertyName]),
- DBusProxy.TUPLE_VARIANT_TYPE, Gio.DBusCallFlags.NONE, -1,
- cancellable);
- }
-
- getProperties(cancellable) {
- return this.gConnection.call(this.gName,
- this.gObjectPath, 'org.freedesktop.DBus.Properties', 'GetAll',
- GLib.Variant.new('(s)', [this.gInterfaceName]),
- GLib.VariantType.new('(a{sv})'), Gio.DBusCallFlags.NONE, -1,
- cancellable);
- }
-});