diff --git a/imports/Spectral/Panel/RoomListPanel.qml b/imports/Spectral/Panel/RoomListPanel.qml index 1029522..93e3318 100644 --- a/imports/Spectral/Panel/RoomListPanel.qml +++ b/imports/Spectral/Panel/RoomListPanel.qml @@ -33,7 +33,7 @@ Rectangle { connection: controller.connection - onNewMessage: if (!window.active) spectralController.postNotification(roomId, eventId, roomName, senderName, text, icon, iconPath) + onNewMessage: if (!window.active && MSettings.showNotification) spectralController.postNotification(roomId, eventId, roomName, senderName, text, icon, iconPath) } SortFilterProxyModel { @@ -445,6 +445,13 @@ Rectangle { onCheckedChanged: MSettings.darkTheme = checked } + Switch { + text: "Show notifications" + checked: MSettings.showNotification + + onCheckedChanged: MSettings.showNotification = checked + } + Switch { text: "Use press and hold instead of right click" checked: MSettings.pressAndHold @@ -459,13 +466,6 @@ Rectangle { onCheckedChanged: MSettings.showTray = checked } - Switch { - text: "Confirm on Exit" - checked: MSettings.confirmOnExit - - onCheckedChanged: MSettings.confirmOnExit = checked - } - RowLayout { Layout.fillWidth: true diff --git a/imports/Spectral/Setting/Setting.qml b/imports/Spectral/Setting/Setting.qml index c95c500..f963694 100644 --- a/imports/Spectral/Setting/Setting.qml +++ b/imports/Spectral/Setting/Setting.qml @@ -3,9 +3,10 @@ import QtQuick 2.9 import Qt.labs.settings 1.0 Settings { + property bool showNotification: true + property bool pressAndHold property bool showTray: true - property bool confirmOnExit: true property bool darkTheme } diff --git a/qml/main.qml b/qml/main.qml index 061f222..390e58b 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -67,6 +67,11 @@ ApplicationWindow { onSyncDone: roomListForm.errorControl.visible = false } + Shortcut { + sequence: StandardKey.Quit + onActivated: Qt.quit() + } + Dialog { property bool busy: false