gex: rename gnome-44, add gnome-45

This commit is contained in:
Luke D. Jones
2023-08-31 14:36:01 +12:00
parent cf92526d87
commit 5f6e6ec382
63 changed files with 6178 additions and 4 deletions

View File

@@ -0,0 +1,49 @@
import { Platform } from "../dbus/platform";
import { addQuickSettingsItems } from "../helpers";
import Gio from 'gi://Gio';
import GObject from 'gi://GObject';
import * as QuickToggle from 'resource:///org/gnome/shell/ui/quickSettings.js';
import * as AsusExtension from "../../extension.js";
export const QuickPanelOd = GObject.registerClass(
class QuickPanelOd extends QuickToggle {
private _dbus_platform: Platform;
constructor(dbus_platform: Platform) {
super({
title: "Panel Overdrive",
iconName: "selection-mode-symbolic",
toggleMode: true,
});
this._dbus_platform = dbus_platform;
this.label = "Panel Overdrive";
this.connectObject(
"clicked", () => this._toggleMode(),
this);
this.connect("destroy", () => {
this.destroy();
});
AsusExtension.extension._settings.bind("panel-od-enabled",
this, "checked",
Gio.SettingsBindFlags.DEFAULT);
this.sync();
addQuickSettingsItems([this]);
}
_toggleMode() {
const checked = this._dbus_platform.getPanelOd();
if (this.checked !== checked)
this._dbus_platform.setPanelOd(this.checked);
}
sync() {
const checked = this._dbus_platform.getPanelOd();
if (this.checked !== checked)
this.set({ checked });
}
});