Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
feat!: remove legacy tray applet
Browse files Browse the repository at this point in the history
This removes the applet, that uses the experimental Qt API.
This might fix the bugs, that is caused by it.
  • Loading branch information
Mikhail Zolotukhin committed Feb 14, 2022
1 parent fe500a0 commit 78eff10
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 58 deletions.
1 change: 0 additions & 1 deletion src/kwinscript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
)
Expand Down
11 changes: 0 additions & 11 deletions src/kwinscript/controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ export class ControllerImpl implements Controller {
*/
public start(): void {
this.driver.bindEvents();
this.bindTrayActions();
this.bindShortcuts();

this.driver.manageWindows();
Expand Down Expand Up @@ -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),
Expand Down
9 changes: 0 additions & 9 deletions src/kwinscript/extern/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
32 changes: 0 additions & 32 deletions src/kwinscript/ui/TrayItem.qml

This file was deleted.

5 changes: 0 additions & 5 deletions src/kwinscript/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Item {
core.proxy.log("Initiating Bismuth: Plasma Tiling Window script!");
const qmlObjects = {
"scriptRoot": scriptRoot,
"trayItem": trayItem,
"activityInfo": activityInfo,
"popupDialog": popupDialog
};
Expand All @@ -40,10 +39,6 @@ Item {
id: core
}

TrayItem {
id: trayItem
}

TaskManager.ActivityInfo {
id: activityInfo
}
Expand Down

0 comments on commit 78eff10

Please sign in to comment.