pmaports/temp/plasma-phone-components/0001-add-back-panels-if-they-disappeared.patch

40 lines
1.1 KiB
Diff
Raw Normal View History

From 083b4634994b421108614607444a14ffcceb4df0 Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Wed, 27 Jan 2021 14:20:15 +0100
Subject: [PATCH] add back panels if they disappeared
---
shell/contents/updates/panelsfix.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 shell/contents/updates/panelsfix.js
diff --git a/shell/contents/updates/panelsfix.js b/shell/contents/updates/panelsfix.js
new file mode 100644
index 0000000..21d1fdc
--- /dev/null
+++ b/shell/contents/updates/panelsfix.js
@@ -0,0 +1,20 @@
+let topFound = false
+let bottomFound = false
+
+for (let i in panels()) {
+ print(panels()[i].type)
+ if (panels()[i].type === "org.kde.phone.panel") {
+ topFound = true;
+ } else if (panels()[i].type === "org.kde.phone.taskpanel") {
+ topFound = true;
+ }
+}
+
+if (!topFound) {
+ let topPanel = new Panel("org.kde.phone.panel")
+ topPanel.location = "Top";
+}
+if (!bottomFound) {
+ let topPanel = new Panel("org.kde.phone.taskpanel")
+ topPanel.location = "Bottom";
+}
--
GitLab