summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-12-16 13:54:03 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-12-16 13:54:03 +0100
commit66f3e3c57e54644c59caab987fd5bda5cae0ee0b (patch)
tree15b73906d9708780b661dc64225d873fe0bb02d6
parenta114b25c5720cedc93bec36e4fa822fe6cfa85b4 (diff)
osx fw stop
-rw-r--r--gui/components/MainView.qml12
-rw-r--r--gui/components/Systray.qml2
-rw-r--r--pkg/helper/darwin.go11
3 files changed, 16 insertions, 9 deletions
diff --git a/gui/components/MainView.qml b/gui/components/MainView.qml
index 886e896..946e36f 100644
--- a/gui/components/MainView.qml
+++ b/gui/components/MainView.qml
@@ -48,36 +48,36 @@ Page {
ListElement {
text: qsTr("Preferences")
icon: "../resources/tools.svg"
- triggered: function () {
+ triggered: function() {
stackView.push("Preferences.qml")
}
}
ListElement {
text: qsTr("Donate")
icon: "../resources/donate.svg"
- triggered: function () {
+ triggered: function() {
Qt.openUrlExternally(ctx.donateURL)
}
}
ListElement {
text: qsTr("Help")
icon: "../resources/help.svg"
- triggered: function () {
+ triggered: function() {
stackView.push("Help.qml")
}
} // -> can link to another dialog with report bug / support / contribute / FAQ
ListElement {
text: qsTr("About")
icon: "../resources/about.svg"
- triggered: function () {
+ triggered: function() {
stackView.push("About.qml")
}
}
ListElement {
text: qsTr("Quit")
icon: "../resources/quit.svg"
- triggered: function () {
- backend.quit()
+ triggered: function() {
+ Qt.callLater(backend.quit)
}
}
} // end listmodel
diff --git a/gui/components/Systray.qml b/gui/components/Systray.qml
index f25860c..f89bd16 100644
--- a/gui/components/Systray.qml
+++ b/gui/components/Systray.qml
@@ -53,7 +53,7 @@ Labs.SystemTrayIcon {
}
Labs.MenuItem {
- //: Part of the systray menu; quits que application
+ //: Part of the systray menu; quits the application
text: qsTr("Quit")
onTriggered: backend.quit()
}
diff --git a/pkg/helper/darwin.go b/pkg/helper/darwin.go
index a9f8e00..0cbc1bc 100644
--- a/pkg/helper/darwin.go
+++ b/pkg/helper/darwin.go
@@ -135,9 +135,16 @@ func firewallStop() error {
log.Printf("An error ocurred stopping the firewall: %v", out)
/* TODO return error if different from anchor not exists */
/*return errors.New("Error while stopping firewall")*/
- return nil
}
- return nil
+ for i := range [50]int{} {
+ if firewallIsUp() {
+ log.Printf("Firewall still up, waiting...")
+ time.Sleep(200 * time.Millisecond)
+ } else {
+ return nil
+ }
+ }
+ return errors.New("Could not stop firewall")
}
func firewallIsUp() bool {