mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
export path, uuid and use it
This commit is contained in:
@@ -49,7 +49,7 @@ import * as Utils from './utils.js';
|
||||
import * as PanelSettings from './panelSettings.js';
|
||||
import * as Taskbar from './taskbar.js';
|
||||
import * as Progress from './progress.js';
|
||||
import {SETTINGS, DESKTOPSETTINGS} from './extension.js';
|
||||
import {SETTINGS, DESKTOPSETTINGS, EXTENSION_PATH} from './extension.js';
|
||||
import {gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
@@ -599,7 +599,7 @@ var TaskbarAppIcon = GObject.registerClass({
|
||||
bgSvg += (this.dtpPanel.checkIfVertical() ? '_2' : '_3');
|
||||
}
|
||||
|
||||
inlineStyle += "background-image: url('" + Me.path + bgSvg + ".svg');" +
|
||||
inlineStyle += "background-image: url('" + EXTENSION_PATH + bgSvg + ".svg');" +
|
||||
"background-position: 0 " + (pos == DOT_POSITION.TOP ? highlightMargin : 0) + "px;" +
|
||||
"background-size: " + backgroundSize;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
import GLib from 'gi://GLib';
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
|
||||
import {EXTENSION_UUID} from './extension.js';
|
||||
|
||||
import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js';
|
||||
|
||||
const IDENTIFIER_UUID = "130cbc66-235c-4bd6-8571-98d2d8bba5e2";
|
||||
@@ -153,6 +155,6 @@ var DesktopIconsUsableAreaClass = class {
|
||||
|
||||
const usableArea = extension?.stateObj?.DesktopIconsUsableArea;
|
||||
if (usableArea?.uuid === IDENTIFIER_UUID)
|
||||
usableArea.setMarginsForExtension(Me.uuid, this._margins);
|
||||
usableArea.setMarginsForExtension(EXTENSION_UUID, this._margins);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ let extensionSystem = (Main.extensionManager || imports.ui.extensionSystem);
|
||||
export var SETTINGS = null;
|
||||
export var DESKTOPSETTINGS = null;
|
||||
export var PERSISTENTSTORAGE = null;
|
||||
export var EXTENSION_UUID = null;
|
||||
export var EXTENSION_PATH = null;
|
||||
|
||||
export default class DashToPanelExtension extends Extension {
|
||||
constructor(metadata) {
|
||||
@@ -134,6 +136,8 @@ function _enable(extension) {
|
||||
|
||||
SETTINGS = extension.getSettings('org.gnome.shell.extensions.dash-to-panel');
|
||||
DESKTOPSETTINGS = extension.getSettings('org.gnome.desktop.interface');
|
||||
EXTENSION_UUID = extension.uuid
|
||||
EXTENSION_PATH = extension.path
|
||||
|
||||
Main.layoutManager.startInOverview = !SETTINGS.get_boolean('hide-overview-on-startup');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user