diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-12-16 13:54:03 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-12-16 20:58:52 +0100 |
commit | c2317a1f99ff778010385aad11745eb75d6a1900 (patch) | |
tree | e58ed853022036130aece07baf62c14d38f68ac9 /gui/components | |
parent | a114b25c5720cedc93bec36e4fa822fe6cfa85b4 (diff) |
[bug] fix osx quits from app menu and dock
aboutToQuit let us catch Quits coming from the osx menu or the dock.
Diffstat (limited to 'gui/components')
-rw-r--r-- | gui/components/MainView.qml | 12 | ||||
-rw-r--r-- | gui/components/StatusBox.qml | 11 | ||||
-rw-r--r-- | gui/components/Systray.qml | 6 |
3 files changed, 10 insertions, 19 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/StatusBox.qml b/gui/components/StatusBox.qml index bfcc175..7715123 100644 --- a/gui/components/StatusBox.qml +++ b/gui/components/StatusBox.qml @@ -56,13 +56,6 @@ Item { } onClicked: { settingsDrawer.toggle() - /* - if (stackView.depth > 1) { - stackView.pop() - } else { - settingsDrawer.toggle() - } - */ } Icon { @@ -71,10 +64,6 @@ Item { height: 16 anchors.centerIn: settingsButton source: "../resources/gear-fill.svg" - /* - source: stackView.depth - > 1 ? "../resources/arrow-left.svg" : "../resources/gear-fill.svg" - */ } } diff --git a/gui/components/Systray.qml b/gui/components/Systray.qml index f25860c..1026f01 100644 --- a/gui/components/Systray.qml +++ b/gui/components/Systray.qml @@ -53,9 +53,11 @@ 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() + onTriggered: { + backend.quit() + } } } |