[gnome] Update extensions

This commit is contained in:
2026-06-10 11:03:09 -04:00
parent 20fc1e4e75
commit 6c973853c6
394 changed files with 12513 additions and 1340 deletions

View File

@ -137,8 +137,23 @@ export const Clipboard = GObject.registerClass({
}
}
async _onHandleMethodCall(iface, name, parameters, invocation) {
async _onHandleMethodCall(iface, name, param1, param2) {
let retval;
let invocation, parameters;
// GNOME 50+ changed the callback signature from
// (iface, name, parameters, invocation) to
// (iface, name, invocation, parameters)
// Detect which order is being used
if (param1 instanceof GLib.Variant) {
// Old order: parameters, invocation
parameters = param1;
invocation = param2;
} else {
// New order: invocation, parameters
invocation = param1;
parameters = param2;
}
try {
const args = parameters.recursiveUnpack();
@ -267,7 +282,7 @@ export const Clipboard = GObject.registerClass({
}
/**
* Get the content of the clipboard with the type @mimetype.
* Get the content of the clipboard with the type {@link mimetype}.
*
* @param {string} mimetype - the mimetype to request
* @returns {Promise<Uint8Array>} The content of the clipboard
@ -296,7 +311,8 @@ export const Clipboard = GObject.registerClass({
}
/**
* Set the content of the clipboard to @value with the type @mimetype.
* Set the content of the clipboard to {@link value} with the type
* {@link mimetype}.
*
* @param {Uint8Array} value - the value to set
* @param {string} mimetype - the mimetype of the value

View File

@ -19,7 +19,7 @@ import Tooltip from './tooltip.js';
* Get a dictionary of a GMenuItem's attributes
*
* @param {Gio.MenuModel} model - The menu model containing the item
* @param {number} index - The index of the item in @model
* @param {number} index - The index of the item in {@link model}
* @returns {object} A dictionary of the item's attributes
*/
function getItemInfo(model, index) {

View File

@ -6,6 +6,10 @@ import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
/**
* @callback KeybindingCallback
* @returns {void}
*/
/**
* Keybindings.Manager is a simple convenience class for managing keyboard
@ -48,8 +52,8 @@ export class Manager {
* Add a keybinding with callback
*
* @param {string} accelerator - An accelerator in the form '<Control>q'
* @param {Function} callback - A callback for the accelerator
* @returns {*} A non-zero action id on success, or 0 on failure
* @param {KeybindingCallback} callback - A callback for the accelerator
* @returns {number} A non-zero action id on success, or 0 on failure
*/
add(accelerator, callback) {
try {
@ -65,6 +69,7 @@ export class Manager {
return action;
} catch (e) {
logError(e);
return 0;
}
}

View File

@ -15,7 +15,7 @@ import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'
import {HAS_MESSAGELIST_NOTIFICATIONMESSAGE, getIcon} from './utils.js';
const {NotificationMessage} = HAS_MESSAGELIST_NOTIFICATIONMESSAGE
? await import('resource:///org/gnome/shell/ui/messageList.js') // GNOME 48
? await import('resource:///org/gnome/shell/ui/messageList.js') // GNOME 48+
: await import('resource:///org/gnome/shell/ui/calendar.js'); // GNOME 46/47
const APP_ID = 'org.gnome.Shell.Extensions.GSConnect';