🚧 Continue port to ESM
This commit is contained in:
@@ -18,9 +18,10 @@ import Gio from 'gi://Gio';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import GLib from 'gi://GLib';
|
||||
import Gdk from 'gi://Gdk';
|
||||
import Adw from 'gi://Adw';
|
||||
|
||||
import {isADW, isGTK4, getUIDir, getStringResource, shellVersionIsAtLeast} from './utils.js';
|
||||
import {ProfileManager} from './ProfileManager.js';
|
||||
import {isADW, isGTK4, getUIDir, getStringResource, shellVersionIsAtLeast} from './src/utils.js';
|
||||
import {ProfileManager} from './src/ProfileManager.js';
|
||||
|
||||
import Apparition from './src/effects/Apparition.js';
|
||||
import BrokenGlass from './src/effects/BrokenGlass.js';
|
||||
@@ -44,14 +45,6 @@ import TVEffect from './src/effects/TVEffect.js';
|
||||
import TVGlitch from './src/effects/TVGlitch.js';
|
||||
import Wisps from './src/effects/Wisps.js';
|
||||
|
||||
// libadwaita is available starting with GNOME Shell 42.
|
||||
let Adw = null;
|
||||
try {
|
||||
Adw = await import('gi://Adw');
|
||||
} catch (e) {
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
const _ = imports.gettext.domain('burn-my-windows').gettext;
|
||||
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@ import Gio from 'gi://Gio';
|
||||
const _ = imports.gettext.domain('burn-my-windows').gettext;
|
||||
|
||||
import {ShaderFactory} from '../ShaderFactory.js';
|
||||
import {isGTK4} from '../utils.js';
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// This effect is a homage to the good old Compiz days. However, it is implemented //
|
||||
@@ -224,7 +225,7 @@ export default class Effect {
|
||||
|
||||
dialog.getBuilder().get_object('fire-preset-button').set_menu_model(menu);
|
||||
|
||||
const root = utils.isGTK4() ? widget.get_root() : widget.get_toplevel();
|
||||
const root = isGTK4() ? widget.get_root() : widget.get_toplevel();
|
||||
root.insert_action_group(groupName, group);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-8
@@ -17,14 +17,7 @@
|
||||
import Gio from 'gi://Gio';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import GLib from 'gi://GLib';
|
||||
|
||||
// libadwaita is available starting with GNOME Shell 42.
|
||||
let Adw = null;
|
||||
try {
|
||||
Adw = await import('gi://Adw');
|
||||
} catch (e) {
|
||||
// Nothing to do.
|
||||
}
|
||||
import Adw from 'gi://Adw';
|
||||
|
||||
// Returns the given argument, except for "alpha", "beta", and "rc". In these cases -3,
|
||||
// -2, and -1 are returned respectively.
|
||||
|
||||
Reference in New Issue
Block a user