[PATCH] applets/systemmonitor: skip configure button on sensorless faces
authorChristoph Wolk <cwo.kde@posteo.net>
Sat, 17 May 2025 07:38:00 +0000 (07:38 +0000)
committerAurélien COUDERC <coucouf@debian.org>
Tue, 20 May 2025 06:31:26 +0000 (08:31 +0200)
Some faces don't need sensors as they have their data included already,
namely Process Table and Application Table. The applet does not take
this into account and keeps showing the "Configure" button.

Instead, don't show that button if one of these faces is the current
face.

BUG: 504335
FIXED-IN: 6.4.0

(cherry picked from commit 184e883786520d6a7494b4db69dad29d69ff63a6)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>
Gbp-Pq: Name upstream_b9bc83c6_applets-systemmonitor-skip-configure-button-on-sensorless-faces.patch

applets/systemmonitor/systemmonitor/package/contents/ui/main.qml

index 6d4480cae8a0ee9070ee5419be4a925619c6fbe0..ebc2ba40755854d88c82ae366b55702843c0b22e 100644 (file)
@@ -67,7 +67,12 @@ PlasmoidItem {
     fullRepresentation: FullRepresentation {
     }
 
-    Plasmoid.configurationRequired: (Plasmoid.faceController ?? false) && Plasmoid.faceController.highPrioritySensorIds.length == 0 && Plasmoid.faceController.lowPrioritySensorIds.length == 0 && Plasmoid.faceController.totalSensors.length == 0
+    Plasmoid.configurationRequired: (Plasmoid.faceController ?? false) &&
+        Plasmoid.faceController.highPrioritySensorIds.length == 0 &&
+        Plasmoid.faceController.lowPrioritySensorIds.length == 0 &&
+        Plasmoid.faceController.totalSensors.length == 0 &&
+        ! (["org.kde.ksysguard.applicationstable",
+            "org.kde.ksysguard.processtable"].includes(Plasmoid.faceController.faceId))
 
     Sensors.Sensor {
         id: totalSensor