Allow disabling notifications.
This commit is contained in:
parent
6d30e9d682
commit
d708c9aab6
|
@ -33,7 +33,7 @@ Rectangle {
|
||||||
|
|
||||||
connection: controller.connection
|
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 {
|
SortFilterProxyModel {
|
||||||
|
@ -445,6 +445,13 @@ Rectangle {
|
||||||
onCheckedChanged: MSettings.darkTheme = checked
|
onCheckedChanged: MSettings.darkTheme = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Switch {
|
||||||
|
text: "Show notifications"
|
||||||
|
checked: MSettings.showNotification
|
||||||
|
|
||||||
|
onCheckedChanged: MSettings.showNotification = checked
|
||||||
|
}
|
||||||
|
|
||||||
Switch {
|
Switch {
|
||||||
text: "Use press and hold instead of right click"
|
text: "Use press and hold instead of right click"
|
||||||
checked: MSettings.pressAndHold
|
checked: MSettings.pressAndHold
|
||||||
|
@ -459,13 +466,6 @@ Rectangle {
|
||||||
onCheckedChanged: MSettings.showTray = checked
|
onCheckedChanged: MSettings.showTray = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
Switch {
|
|
||||||
text: "Confirm on Exit"
|
|
||||||
checked: MSettings.confirmOnExit
|
|
||||||
|
|
||||||
onCheckedChanged: MSettings.confirmOnExit = checked
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@ import QtQuick 2.9
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
Settings {
|
Settings {
|
||||||
|
property bool showNotification: true
|
||||||
|
|
||||||
property bool pressAndHold
|
property bool pressAndHold
|
||||||
property bool showTray: true
|
property bool showTray: true
|
||||||
property bool confirmOnExit: true
|
|
||||||
|
|
||||||
property bool darkTheme
|
property bool darkTheme
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,11 @@ ApplicationWindow {
|
||||||
onSyncDone: roomListForm.errorControl.visible = false
|
onSyncDone: roomListForm.errorControl.visible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
sequence: StandardKey.Quit
|
||||||
|
onActivated: Qt.quit()
|
||||||
|
}
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
property bool busy: false
|
property bool busy: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue