Browse Source

added a detect fans action

Malte Veerman 10 years ago
parent
commit
3c47bd6628
1 changed files with 9 additions and 6 deletions
  1. 9 6
      package/contents/ui/PwmFansTab.qml

+ 9 - 6
package/contents/ui/PwmFansTab.qml

@@ -48,9 +48,7 @@ ColumnLayout {
         }
         Button {
             Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
-            text: i18n("Detect fans")
-            iconName: "dialog-password"
-            onClicked: baseObject.loader.detectSensors()
+            action: detectFansAction
         }
     }
     
@@ -84,9 +82,14 @@ ColumnLayout {
         
         Button {
             Layout.alignment: Qt.AlignCenter
-            text: i18n("Detect fans")
-            iconName: "dialog-password"
-            onClicked: loader.detectSensors()
+            action: detectFansAction
         }
     }
+    
+    Action {
+        id: detectFansAction
+        text: i18n("Detect fans")
+        iconName: "dialog-password"
+        onTriggered: loader.detectSensors()
+    }
 }