[gnome] Fix version for gjsosk and gsconnect, add impatience

This commit is contained in:
2024-11-01 09:35:38 -04:00
parent 66e76c2764
commit 1bd891f30a
78 changed files with 804 additions and 1226 deletions

View File

@ -2,12 +2,10 @@
//
// SPDX-License-Identifier: GPL-2.0-or-later
'use strict';
const Gio = imports.gi.Gio;
const GjsPrivate = imports.gi.GjsPrivate;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
import Gio from 'gi://Gio';
import GjsPrivate from 'gi://GjsPrivate';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
/*
@ -19,12 +17,6 @@ function toDBusCase(string) {
}).replace(/[\s_-]+/g, '');
}
function toHyphenCase(string) {
return string.replace(/(?:[A-Z])/g, (ltr, offset) => {
return (offset > 0) ? `-${ltr.toLowerCase()}` : ltr.toLowerCase();
}).replace(/[\s_]+/g, '');
}
function toUnderscoreCase(string) {
return string.replace(/(?:^\w|[A-Z]|_|\b\w)/g, (ltr, offset) => {
if (ltr === '_')
@ -39,7 +31,7 @@ function toUnderscoreCase(string) {
* DBus.Interface represents a DBus interface bound to an object instance, meant
* to be exported over DBus.
*/
var Interface = GObject.registerClass({
export const Interface = GObject.registerClass({
GTypeName: 'GSConnectDBusInterface',
Implements: [Gio.DBusInterface],
Properties: {
@ -241,7 +233,7 @@ var Interface = GObject.registerClass({
* @param {Gio.Cancellable} [cancellable] - an optional Gio.Cancellable
* @return {Promise<Gio.DBusConnection>} A new DBus connection
*/
function newConnection(busType = Gio.BusType.SESSION, cancellable = null) {
export function newConnection(busType = Gio.BusType.SESSION, cancellable = null) {
return new Promise((resolve, reject) => {
Gio.DBusConnection.new_for_address(
Gio.dbus_address_get_for_bus_sync(busType, cancellable),