Skip to content

Commit

Permalink
gnome shell ui imports
Browse files Browse the repository at this point in the history
  • Loading branch information
István Derda committed Sep 9, 2023
1 parent a4955d0 commit 077a39e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions port.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ find . -type f -exec sed -i -E 's-(const|let|var) (.*) = *imports\.gi\.(.*);-imp
find . -type f -name "*.js" -exec sed -i -E 's-^.*imports.*$-\0 //todo port import-g' {} +
find . -type f -name "*.js" -exec sed -i -E 's-const (.*) = Extension\.imports\.([^.]*)\.?([^.]+)?;.*$-import * as \1 from "./\2/\3.js";-g' {} +
find . -type f -name "*.js" -exec sed -i -E '/imports.misc.extensionUtils.getCurrentExtension/d' {} +
find src -type f -name "*.js" -exec sed -i -E 's_const (.*) = imports.ui.(.*);.*$_import * as \1 from "resource:///org/gnome/shell/ui/\2.js";_g' {} +

8 changes: 4 additions & 4 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import * as Gio from "gi://Gio";
import * as GObject from "gi://GObject";
import * as Gtk from "gi://Gtk";

const Main = imports.ui.main; //todo port import
const PanelMenu = imports.ui.panelMenu; //todo port import
const PopupMenu = imports.ui.popupMenu; //todo port import
import * as Main from "resource:///org/gnome/shell/ui/main.js";
import * as PanelMenu from "resource:///org/gnome/shell/ui/panelMenu.js";
import * as PopupMenu from "resource:///org/gnome/shell/ui/popupMenu.js";
const QuickSettingsMenu = Main.panel.statusArea.quickSettings;
const QuickSettings = imports.ui.quickSettings; //todo port import
import * as QuickSettings from "resource:///org/gnome/shell/ui/quickSettings.js";

// Bootstrap
import * as Utils from "./shell/utils.js";
Expand Down
4 changes: 2 additions & 2 deletions src/shell/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import * as Clutter from "gi://Clutter";
import * as GObject from "gi://GObject";
import * as St from "gi://St";

const PanelMenu = imports.ui.panelMenu; //todo port import
const PopupMenu = imports.ui.popupMenu; //todo port import
import * as PanelMenu from "resource:///org/gnome/shell/ui/panelMenu.js";
import * as PopupMenu from "resource:///org/gnome/shell/ui/popupMenu.js";


// eslint-disable-next-line no-redeclare
Expand Down
2 changes: 1 addition & 1 deletion src/shell/gmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as Gio from "gi://Gio";
import * as GObject from "gi://GObject";
import * as St from "gi://St";

const PopupMenu = imports.ui.popupMenu; //todo port import
import * as PopupMenu from "resource:///org/gnome/shell/ui/popupMenu.js";


import * as Tooltip from "./shell/tooltip.js";
Expand Down
2 changes: 1 addition & 1 deletion src/shell/keybindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';

const Config = imports.misc.config; //todo port import
const Main = imports.ui.main; //todo port import
import * as Main from "resource:///org/gnome/shell/ui/main.js";
import * as Meta from "gi://Meta";
import * as Shell from "gi://Shell";

Expand Down
6 changes: 3 additions & 3 deletions src/shell/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import * as GLib from "gi://GLib";
import * as GObject from "gi://GObject";
import * as St from "gi://St";

const Main = imports.ui.main; //todo port import
const MessageTray = imports.ui.messageTray; //todo port import
const NotificationDaemon = imports.ui.notificationDaemon; //todo port import
import * as Main from "resource:///org/gnome/shell/ui/main.js";
import * as MessageTray from "resource:///org/gnome/shell/ui/messageTray.js";
import * as NotificationDaemon from "resource:///org/gnome/shell/ui/notificationDaemon.js";


// eslint-disable-next-line no-redeclare
Expand Down
2 changes: 1 addition & 1 deletion src/shell/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as GLib from "gi://GLib";
import * as Pango from "gi://Pango";
import * as St from "gi://St";

const Main = imports.ui.main; //todo port import
import * as Main from "resource:///org/gnome/shell/ui/main.js";


/**
Expand Down

0 comments on commit 077a39e

Please sign in to comment.