Convert to use ESM modules
See: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import GObject from 'gi://GObject';
|
||||
import Shell from 'gi://Shell';
|
||||
|
||||
const { Shell, GObject } = imports.gi;
|
||||
|
||||
const PopupMenu = imports.ui.popupMenu;
|
||||
import * as PopupMenu from '../popupMenu.js';
|
||||
|
||||
function _windowAppId(window) {
|
||||
const tracker = Shell.WindowTracker.get_default();
|
||||
@ -14,7 +14,7 @@ function _windowAppId(window) {
|
||||
}
|
||||
}
|
||||
|
||||
function windowMenuDebugString(window) {
|
||||
export function windowMenuDebugString(window) {
|
||||
const id = _windowAppId(window);
|
||||
const realm_name = windowRealmName(window);
|
||||
const realms = Shell.Realms.get_default();
|
||||
@ -78,7 +78,8 @@ function windowContextRealmName(window) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function enableFrameItem(window) {
|
||||
|
||||
export function enableFrameItem(window) {
|
||||
const realms = Shell.Realms.get_default();
|
||||
const frames = realms.window_frames();
|
||||
if (!frames.has_frame(window)) {
|
||||
@ -99,7 +100,7 @@ function enableFrameItem(window) {
|
||||
return item;
|
||||
}
|
||||
|
||||
function realmWindowMenu(window) {
|
||||
export function realmWindowMenu(window) {
|
||||
|
||||
const realm_name = windowContextRealmName(window);
|
||||
|
||||
@ -131,4 +132,4 @@ function realmWindowMenu(window) {
|
||||
subMenu.menu.addMenuItem(item);
|
||||
});
|
||||
return subMenu;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user