diff --git a/ui/qml/harbour-amazfish.qml b/ui/qml/harbour-amazfish.qml index 506543dd..eb996d42 100644 --- a/ui/qml/harbour-amazfish.qml +++ b/ui/qml/harbour-amazfish.qml @@ -116,19 +116,9 @@ ApplicationWindowPL function updateProperties() { if (ENABLE_SYSTEMD === "YES"){ var activeProperty = systemdServiceIface.getProperty("ActiveState"); - if (activeProperty === "active") { - serviceActiveState = true; - } else { - serviceActiveState = false; - } - + serviceActiveState = (activeProperty === "active"); var serviceEnabledProperty = systemdServiceIface.getProperty("UnitFileState"); - if (serviceEnabledProperty === "enabled") { - serviceEnabledState = true; - } - else { - serviceEnabledState = false; - } + serviceEnabledState = (serviceEnabledProperty === "enabled"); } } @@ -144,13 +134,6 @@ ApplicationWindowPL iface: "org.freedesktop.systemd1.Manager" signalsEnabled: true - signal unitNew(string name) - onUnitNew: { - if (name == "harbour-amazfish.service" && ENABLE_SYSTEMD === "YES") { - systemdServiceIface.updateProperties() - } - } - function enableService() { if(ENABLE_SYSTEMD === "YES") { systemdManager.typedCall("EnableUnitFiles", [{"type":"as", "value":["harbour-amazfish.service"]}, {"type":"b", "value":false}, {"type":"b", "value":true}])