Skip to content

Port Extensions to GNOME Shell 43

Metadata

TIP

There were no relevant changes to metadata.json in GNOME 43.

Extension

TIP

There were no relevant changes to extension.js in GNOME 43.

GNOME Shell

Quick Settings

GNOME Shell 43 removed aggregateMenu and uses quick settings instead:

TypeWhere
Direct accessMain.panel.statusArea.quickSettings
Columns countui.panel.N_QUICK_SETTINGS_COLUMNS
Panel menu buttonui.panel.QuickSettings

ui.quickSettings is a new module for:

NameUse Case
QuickToggleThe primary entry point to create toggle button.
QuickMenuToggleSame as QuickToggle but with menu.
QuickSliderTo create slider like brightness and volume control (that are already built-in).
QuickSettingsMenuTo add another quick settings menu instead of adding items to the existing Main.panel.statusArea.quickSettings.

Learn how to implement quick settings with examples.

Screen Sharing Indicator

GNOME Shell 43 also have a new screen sharing indicator in panel:

TypeWhere
Direct accessMain.panel.statusArea.screenSharing

App display

App display have new AppGrid and BaseAppViewGridLayout class.

The grid layout allows you to manage the layout such as going to another page and toggling the page indicators visibility.

Signals

In GNOME Shell 43, instead of using Signals.addSignalMethods(), you can extend your class to Signals.EventEmitter.

To do that, you need to use misc.signals module:

js
const Signals = imports.misc.signals;

var MyClass = class extends Signals.EventEmitter {
    constructor() {
        super();
    }
}

Soup3

GNOME Shell 43 uses Soup 3 as default.

Soup 3 API is different from what we had in version 2.

For example, here we post id and receive the result asynchronously:

js
const {Soup, GLib} = imports.gi;

let session = new Soup.Session();

let params = {
    id: '1',
};

let message = Soup.Message.new_from_encoded_form(
    'POST',
    'https://example.com/',
    Soup.form_encode_hash(params)
);

session.send_and_read_async(
    message,
    GLib.PRIORITY_DEFAULT,
    null,
    (session, result) => {
        if (message.get_status() === Soup.Status.OK) {
            let bytes = session.send_and_read_finish(result);
            let decoder = new TextDecoder('utf-8');
            let response = decoder.decode(bytes.get_data());
            console.log(`Response: ${response}`);
        }
    }
);

For more information, you can read the migrating guide for Soup 2 to 3.

GJS

TIP

There were no relevant changes to GJS in GNOME 43.

MIT Licensed | GJS, A GNOME Project