mirror of
https://gitlab.gnome.org/june/top-bar-organizer.git
synced 2026-01-11 16:53:51 +01:00
Breaking: Migrate extension to the new ESM system of GNOME 45
Migrate with the help of, among others, the following resources: https://blogs.gnome.org/shell-dev/2023/09/02/extensions-in-gnome-45/ https://gjs.guide/extensions/upgrading/gnome-shell-45.html Only support GNOME Shell version 45, since only 45 is compatible with the new ESM system. Since panel._originalAddToPanelBox is no longer valid, just overwrite using the prototype on disable. Add "sourceType": "module" to eslintrc.yml to get rid of: "Parsing error: 'import' and 'export' may appear only with 'sourceType: module'" See here: https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options
This commit is contained in:
parent
62e9609b2d
commit
a1188d5684
10 changed files with 85 additions and 102 deletions
|
|
@ -1,18 +1,15 @@
|
|||
"use strict";
|
||||
/* exported PrefsBoxOrderItemRow */
|
||||
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const Gio = imports.gi.Gio;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Adw = imports.gi.Adw;
|
||||
import Gtk from "gi://Gtk";
|
||||
import Gdk from "gi://Gdk";
|
||||
import Gio from "gi://Gio";
|
||||
import GObject from "gi://GObject";
|
||||
import Adw from "gi://Adw";
|
||||
import GLib from "gi://GLib";
|
||||
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
const Me = ExtensionUtils.getCurrentExtension();
|
||||
|
||||
var PrefsBoxOrderItemRow = GObject.registerClass({
|
||||
const PrefsBoxOrderItemRow = GObject.registerClass({
|
||||
GTypeName: "PrefsBoxOrderItemRow",
|
||||
Template: Me.dir.get_child("ui").get_child("prefs-box-order-item-row.ui").get_uri(),
|
||||
Template: GLib.uri_resolve_relative(import.meta.url, "../ui/prefs-box-order-item-row.ui", GLib.UriFlags.NONE),
|
||||
InternalChildren: [
|
||||
"item-name-display-label"
|
||||
]
|
||||
|
|
@ -144,3 +141,5 @@ var PrefsBoxOrderItemRow = GObject.registerClass({
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default PrefsBoxOrderItemRow;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue