Группа :: Графические оболочки/KDE
Пакет: plasma-applet-thermal-monitor
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: fix-update-at-startup2.patch
Скачать
Скачать
From 0ca959180b6afcb4b0624e2ae845f094defe05ca Mon Sep 17 00:00:00 2001
From: dwardor <50771662+dwardor@users.noreply.github.com>
Date: Thu, 19 Dec 2019 21:29:09 +0100
Subject: [PATCH] Update main.qml
---
package/contents/ui/main.qml | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml
index 8553085..5c2bca2 100644
--- a/package/contents/ui/main.qml
+++ b/package/contents/ui/main.qml
@@ -55,7 +55,6 @@ Item {
property double iconBottomMargin: itemHeight * plasmoid.configuration.iconBottomMargin * 0.01
property bool enableLabelDropShadow: plasmoid.configuration.enableLabelDropShadow
- property var systemmonitorAvailableSources: []
property var systemmonitorSourcesToAdd: []
property int numberOfParts: temperatureModel.count
@@ -171,14 +170,6 @@ Item {
reloadAllSources()
}
- function getSystemmonitorAvailableSources() {
- if (systemmonitorAvailableSources.length === 0) {
- // then it has not been filled in by "systemmonitorDS onSourceAdded" actions yet so just set to systemmonitorDS.sources
- systemmonitorAvailableSources = systemmonitorDS.sources
- }
- return systemmonitorAvailableSources
- }
-
function action_reloadSources() {
reloadAllSources()
}
@@ -274,10 +265,12 @@ Item {
dbgprint('adding source to systemmonitorDS: ' + source)
- if (getSystemmonitorAvailableSources().indexOf(source) > -1) {
+ if (systemmonitorDS.sources.indexOf(source) > -1) {
+ // this is an existing source of systemmonitorDS so we can connect it
dbgprint('adding to connected')
addToSourcesOfDatasource(systemmonitorDS, source)
} else {
+ // the source does not exist in systemmonitorDS (yet...) so we can't add yet it but we store it to add it if it appears later
dbgprint('adding to sta')
systemmonitorSourcesToAdd.push(source)
}
@@ -306,7 +299,6 @@ Item {
if (source.indexOf(lmSensorsStart) === 0 || source.indexOf(acpiStart) === 0) {
- systemmonitorAvailableSources.push(source)
var staIndex = systemmonitorSourcesToAdd.indexOf(source)
if (staIndex > -1) {
addToSourcesOfDatasource(systemmonitorDS, source)