mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
feat!: remove legacy tray applet
This removes the applet, that uses the experimental Qt API. This might fix the bugs, that is caused by it.
This commit is contained in:
parent
fe500a04da
commit
78eff10512
@ -66,7 +66,6 @@ add_custom_command(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui" "${CMAKE_CURRENT_BINARY_DIR}/bismuth/contents/ui"
|
||||
DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/main.qml"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/TrayItem.qml"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/ui/popup.qml"
|
||||
COMMENT "📑 Preparing UI and metadata files..."
|
||||
)
|
||||
|
@ -174,7 +174,6 @@ export class ControllerImpl implements Controller {
|
||||
*/
|
||||
public start(): void {
|
||||
this.driver.bindEvents();
|
||||
this.bindTrayActions();
|
||||
this.bindShortcuts();
|
||||
|
||||
this.driver.manageWindows();
|
||||
@ -385,16 +384,6 @@ export class ControllerImpl implements Controller {
|
||||
this.driver.drop();
|
||||
}
|
||||
|
||||
private bindTrayActions(): void {
|
||||
// NOTE: Since the qml interface is very agile, it's seems
|
||||
// to be unreasonable to make the bindings universal.
|
||||
// However, this may be changed it the future.
|
||||
this.qmlObjects.trayItem.menu.onToggleTiling = (): void => {
|
||||
const action = new Action.ToggleFloatingLayout(this.engine, this.log);
|
||||
action.execute();
|
||||
};
|
||||
}
|
||||
|
||||
private bindShortcuts(): void {
|
||||
const allPossibleActions = [
|
||||
new Action.FocusNextWindow(this.engine, this.log),
|
||||
|
9
src/kwinscript/extern/global.d.ts
vendored
9
src/kwinscript/extern/global.d.ts
vendored
@ -9,19 +9,10 @@ declare namespace Bismuth {
|
||||
export namespace Qml {
|
||||
export interface Main {
|
||||
scriptRoot: object;
|
||||
trayItem: TrayItem;
|
||||
activityInfo: Plasma.TaskManager.ActivityInfo;
|
||||
popupDialog: PopupDialog;
|
||||
}
|
||||
|
||||
export interface TrayItem {
|
||||
menu: TrayMenu;
|
||||
}
|
||||
|
||||
export interface TrayMenu {
|
||||
onToggleTiling: () => void;
|
||||
}
|
||||
|
||||
export interface PopupDialog {
|
||||
show(text: string, icon?: string, hint?: string): void;
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2021 Mikhail Zolotukhin <mail@genda.life>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import Qt.labs.platform 1.1 as Labs
|
||||
import QtQuick 2.0
|
||||
|
||||
Labs.SystemTrayIcon {
|
||||
id: root
|
||||
|
||||
visible: true
|
||||
icon.name: "bismuth"
|
||||
tooltip: "Windows' Tiling"
|
||||
|
||||
menu: Labs.Menu {
|
||||
id: menu
|
||||
|
||||
property var onToggleTiling: () => {
|
||||
}
|
||||
|
||||
visible: false // Prevent from showing on Script Loading
|
||||
|
||||
Labs.MenuItem {
|
||||
text: i18n("Toggle Tiling")
|
||||
icon.name: "window"
|
||||
onTriggered: () => {
|
||||
return menu.onToggleTiling();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -19,7 +19,6 @@ Item {
|
||||
core.proxy.log("Initiating Bismuth: Plasma Tiling Window script!");
|
||||
const qmlObjects = {
|
||||
"scriptRoot": scriptRoot,
|
||||
"trayItem": trayItem,
|
||||
"activityInfo": activityInfo,
|
||||
"popupDialog": popupDialog
|
||||
};
|
||||
@ -40,10 +39,6 @@ Item {
|
||||
id: core
|
||||
}
|
||||
|
||||
TrayItem {
|
||||
id: trayItem
|
||||
}
|
||||
|
||||
TaskManager.ActivityInfo {
|
||||
id: activityInfo
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user