[gnome] Fix version for gjsosk and gsconnect, add impatience
This commit is contained in:
@ -2,13 +2,13 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
'use strict';
|
||||
import Gdk from 'gi://Gdk';
|
||||
import GdkPixbuf from 'gi://GdkPixbuf';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const GdkPixbuf = imports.gi.GdkPixbuf;
|
||||
const GLib = imports.gi.GLib;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
import system from 'system';
|
||||
|
||||
|
||||
/**
|
||||
@ -156,7 +156,7 @@ function getNumberTypeLabel(type) {
|
||||
* @param {string} address - A phone number
|
||||
* @return {string} A (possibly) better display number for the address
|
||||
*/
|
||||
function getDisplayNumber(contact, address) {
|
||||
export function getDisplayNumber(contact, address) {
|
||||
const number = address.toPhoneNumber();
|
||||
|
||||
for (const contactNumber of contact.numbers) {
|
||||
@ -175,7 +175,7 @@ function getDisplayNumber(contact, address) {
|
||||
*/
|
||||
const AvatarCache = new WeakMap();
|
||||
|
||||
var Avatar = GObject.registerClass({
|
||||
export const Avatar = GObject.registerClass({
|
||||
GTypeName: 'GSConnectContactAvatar',
|
||||
}, class ContactAvatar extends Gtk.DrawingArea {
|
||||
|
||||
@ -363,7 +363,7 @@ const AddressRow = GObject.registerClass({
|
||||
/**
|
||||
* A widget for selecting contact addresses (usually phone numbers)
|
||||
*/
|
||||
var ContactChooser = GObject.registerClass({
|
||||
export const ContactChooser = GObject.registerClass({
|
||||
GTypeName: 'GSConnectContactChooser',
|
||||
Properties: {
|
||||
'device': GObject.ParamSpec.object(
|
||||
@ -435,7 +435,7 @@ var ContactChooser = GObject.registerClass({
|
||||
for (let i = 0, len = rows.length; i < len; i++) {
|
||||
rows[i].destroy();
|
||||
// HACK: temporary mitigator for mysterious GtkListBox leak
|
||||
imports.system.gc();
|
||||
system.gc();
|
||||
}
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ var ContactChooser = GObject.registerClass({
|
||||
if (row.contact.id === id) {
|
||||
row.destroy();
|
||||
// HACK: temporary mitigator for mysterious GtkListBox leak
|
||||
imports.system.gc();
|
||||
system.gc();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,19 +2,17 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
'use strict';
|
||||
import Gio from 'gi://Gio';
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
|
||||
const Gio = imports.gi.Gio;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
|
||||
const Contacts = imports.service.ui.contacts;
|
||||
const Messaging = imports.service.ui.messaging;
|
||||
const URI = imports.service.utils.uri;
|
||||
const _ui = imports.service.utils.ui;
|
||||
import * as Contacts from '../ui/contacts.js';
|
||||
import * as Messaging from '../ui/messaging.js';
|
||||
import * as URI from '../utils/uri.js';
|
||||
import '../utils/ui.js';
|
||||
|
||||
|
||||
var Dialog = GObject.registerClass({
|
||||
const Dialog = GObject.registerClass({
|
||||
GTypeName: 'GSConnectLegacyMessagingDialog',
|
||||
Properties: {
|
||||
'device': GObject.ParamSpec.object(
|
||||
@ -226,3 +224,4 @@ var Dialog = GObject.registerClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default Dialog;
|
||||
|
||||
@ -2,21 +2,21 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
'use strict';
|
||||
import Gdk from 'gi://Gdk';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import Pango from 'gi://Pango';
|
||||
|
||||
import system from 'system';
|
||||
|
||||
import * as Contacts from './contacts.js';
|
||||
import * as Sms from '../plugins/sms.js';
|
||||
import * as URI from '../utils/uri.js';
|
||||
import '../utils/ui.js';
|
||||
|
||||
const Tweener = imports.tweener.tweener;
|
||||
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const GLib = imports.gi.GLib;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Pango = imports.gi.Pango;
|
||||
|
||||
const Contacts = imports.service.ui.contacts;
|
||||
const Sms = imports.service.plugins.sms;
|
||||
const URI = imports.service.utils.uri;
|
||||
const _ui = imports.service.utils.ui;
|
||||
|
||||
|
||||
/*
|
||||
* Useful time constants
|
||||
@ -460,7 +460,7 @@ const Conversation = GObject.registerClass({
|
||||
conversation.list.foreach(message => {
|
||||
// HACK: temporary mitigator for mysterious GtkListBox leak
|
||||
message.destroy();
|
||||
imports.system.gc();
|
||||
system.gc();
|
||||
});
|
||||
}
|
||||
|
||||
@ -800,7 +800,7 @@ const ConversationSummary = GObject.registerClass({
|
||||
/**
|
||||
* A Gtk.ApplicationWindow for SMS conversations
|
||||
*/
|
||||
var Window = GObject.registerClass({
|
||||
export const Window = GObject.registerClass({
|
||||
GTypeName: 'GSConnectMessagingWindow',
|
||||
Properties: {
|
||||
'device': GObject.ParamSpec.object(
|
||||
@ -1025,13 +1025,13 @@ var Window = GObject.registerClass({
|
||||
|
||||
if (conversation) {
|
||||
conversation.destroy();
|
||||
imports.system.gc();
|
||||
system.gc();
|
||||
}
|
||||
|
||||
// Then the summary widget
|
||||
row.destroy();
|
||||
// HACK: temporary mitigator for mysterious GtkListBox leak
|
||||
imports.system.gc();
|
||||
system.gc();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1219,7 +1219,7 @@ var Window = GObject.registerClass({
|
||||
/**
|
||||
* A Gtk.ApplicationWindow for selecting from open conversations
|
||||
*/
|
||||
var ConversationChooser = GObject.registerClass({
|
||||
export const ConversationChooser = GObject.registerClass({
|
||||
GTypeName: 'GSConnectConversationChooser',
|
||||
Properties: {
|
||||
'device': GObject.ParamSpec.object(
|
||||
|
||||
@ -2,12 +2,10 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
'use strict';
|
||||
|
||||
const GLib = imports.gi.GLib;
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
import GLib from 'gi://GLib';
|
||||
import Gdk from 'gi://Gdk';
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
|
||||
|
||||
/**
|
||||
@ -73,7 +71,7 @@ const isShift = (key) => [Gdk.KEY_Shift_L, Gdk.KEY_Shift_R].includes(key);
|
||||
const isSuper = (key) => [Gdk.KEY_Super_L, Gdk.KEY_Super_R].includes(key);
|
||||
|
||||
|
||||
var InputDialog = GObject.registerClass({
|
||||
export const InputDialog = GObject.registerClass({
|
||||
GTypeName: 'GSConnectMousepadInputDialog',
|
||||
Properties: {
|
||||
'device': GObject.ParamSpec.object(
|
||||
@ -390,7 +388,7 @@ var InputDialog = GObject.registerClass({
|
||||
(Math.abs(this.touchpad_motion_y) < 4);
|
||||
|
||||
if (is_click) {
|
||||
var click_body = {};
|
||||
const click_body = {};
|
||||
switch (gesture_button) {
|
||||
case 1:
|
||||
click_body.singleclick = true;
|
||||
@ -444,8 +442,8 @@ var InputDialog = GObject.registerClass({
|
||||
}
|
||||
|
||||
_onTouchpadMotionTimeout() {
|
||||
var diff_x = this.touchpad_motion_x - this.touchpad_motion_prev_x;
|
||||
var diff_y = this.touchpad_motion_y - this.touchpad_motion_prev_y;
|
||||
const diff_x = this.touchpad_motion_x - this.touchpad_motion_prev_x;
|
||||
const diff_y = this.touchpad_motion_y - this.touchpad_motion_prev_y;
|
||||
|
||||
this.device.sendPacket({
|
||||
type: 'kdeconnect.mousepad.request',
|
||||
|
||||
@ -2,20 +2,18 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
'use strict';
|
||||
import Gio from 'gi://Gio';
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
|
||||
const Gio = imports.gi.Gio;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
|
||||
const URI = imports.service.utils.uri;
|
||||
const _ui = imports.service.utils.ui;
|
||||
import * as URI from '../utils/uri.js';
|
||||
import '../utils/ui.js';
|
||||
|
||||
|
||||
/**
|
||||
* A dialog for repliable notifications.
|
||||
*/
|
||||
var ReplyDialog = GObject.registerClass({
|
||||
const ReplyDialog = GObject.registerClass({
|
||||
GTypeName: 'GSConnectNotificationReplyDialog',
|
||||
Properties: {
|
||||
'device': GObject.ParamSpec.object(
|
||||
@ -177,3 +175,4 @@ var ReplyDialog = GObject.registerClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default ReplyDialog;
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
'use strict';
|
||||
import GLib from 'gi://GLib';
|
||||
import Gio from 'gi://Gio';
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
|
||||
const GLib = imports.gi.GLib;
|
||||
const Gio = imports.gi.Gio;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
import system from 'system';
|
||||
|
||||
const Config = imports.config;
|
||||
import Config from '../../config.js';
|
||||
|
||||
|
||||
/*
|
||||
@ -17,7 +17,7 @@ const Config = imports.config;
|
||||
*/
|
||||
const ISSUE_HEADER = `
|
||||
GSConnect: ${Config.PACKAGE_VERSION} (${Config.IS_USER ? 'user' : 'system'})
|
||||
GJS: ${imports.system.version}
|
||||
GJS: ${system.version}
|
||||
Session: ${GLib.getenv('XDG_SESSION_TYPE')}
|
||||
OS: ${GLib.get_os_info('PRETTY_NAME')}
|
||||
`;
|
||||
@ -26,7 +26,7 @@ OS: ${GLib.get_os_info('PRETTY_NAME')}
|
||||
/**
|
||||
* A dialog for selecting a device
|
||||
*/
|
||||
var DeviceChooser = GObject.registerClass({
|
||||
export const DeviceChooser = GObject.registerClass({
|
||||
GTypeName: 'GSConnectServiceDeviceChooser',
|
||||
Properties: {
|
||||
'action-name': GObject.ParamSpec.string(
|
||||
@ -192,7 +192,7 @@ var DeviceChooser = GObject.registerClass({
|
||||
/**
|
||||
* A dialog for reporting an error.
|
||||
*/
|
||||
var ErrorDialog = GObject.registerClass({
|
||||
export const ErrorDialog = GObject.registerClass({
|
||||
GTypeName: 'GSConnectServiceErrorDialog',
|
||||
Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/service-error-dialog.ui',
|
||||
Children: [
|
||||
|
||||
Reference in New Issue
Block a user