Changeset View
Changeset View
Standalone View
Standalone View
kcms/notifications/package/contents/ui/main.qml
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.9 | 21 | import QtQuick 2.9 | ||
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
23 | import QtQuick.Controls 2.3 as QtControls | 23 | import QtQuick.Controls 2.3 as QtControls | ||
24 | import org.kde.kirigami 2.4 as Kirigami | 24 | import org.kde.kirigami 2.4 as Kirigami | ||
25 | import org.kde.kquickcontrols 2.0 as KQuickControls | ||||
25 | import org.kde.kcm 1.2 as KCM | 26 | import org.kde.kcm 1.2 as KCM | ||
26 | 27 | | |||
27 | import org.kde.notificationmanager 1.0 as NotificationManager | 28 | import org.kde.notificationmanager 1.0 as NotificationManager | ||
28 | 29 | | |||
29 | KCM.SimpleKCM { | 30 | KCM.SimpleKCM { | ||
30 | id: root | 31 | id: root | ||
31 | KCM.ConfigModule.quickHelp: i18n("This module lets you manage application and system notifications.") | 32 | KCM.ConfigModule.quickHelp: i18n("This module lets you manage application and system notifications.") | ||
32 | KCM.ConfigModule.buttons: KCM.ConfigModule.Help | KCM.ConfigModule.Apply | 33 | KCM.ConfigModule.buttons: KCM.ConfigModule.Help | KCM.ConfigModule.Apply | ||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 57 | Kirigami.FormLayout { | |||
89 | 90 | | |||
90 | QtControls.CheckBox { | 91 | QtControls.CheckBox { | ||
91 | text: i18n("Show critical notifications") | 92 | text: i18n("Show critical notifications") | ||
92 | checked: kcm.settings.criticalPopupsInDoNotDisturbMode | 93 | checked: kcm.settings.criticalPopupsInDoNotDisturbMode | ||
93 | onClicked: kcm.settings.criticalPopupsInDoNotDisturbMode = checked | 94 | onClicked: kcm.settings.criticalPopupsInDoNotDisturbMode = checked | ||
94 | enabled: root.notificationsAvailable | 95 | enabled: root.notificationsAvailable | ||
95 | } | 96 | } | ||
96 | 97 | | |||
98 | RowLayout { | ||||
99 | QtControls.Label { | ||||
100 | text: i18nc("Turn do not disturb mode on/off with keyboard shortcut", "Toggle with:") | ||||
ngraham: Maybe "Toggle with:"? | |||||
101 | } | ||||
102 | | ||||
103 | KQuickControls.KeySequenceItem { | ||||
104 | keySequence: kcm.toggleDoNotDisturbShortcut | ||||
105 | onKeySequenceChanged: kcm.toggleDoNotDisturbShortcut = keySequence | ||||
106 | } | ||||
107 | } | ||||
108 | | ||||
97 | QtControls.CheckBox { | 109 | QtControls.CheckBox { | ||
98 | Kirigami.FormData.label: i18n("Critical notifications:") | 110 | Kirigami.FormData.label: i18n("Critical notifications:") | ||
99 | text: i18n("Always keep on top") | 111 | text: i18n("Always keep on top") | ||
100 | checked: kcm.settings.keepCriticalAlwaysOnTop | 112 | checked: kcm.settings.keepCriticalAlwaysOnTop | ||
101 | onClicked: kcm.settings.keepCriticalAlwaysOnTop = checked | 113 | onClicked: kcm.settings.keepCriticalAlwaysOnTop = checked | ||
102 | enabled: root.notificationsAvailable | 114 | enabled: root.notificationsAvailable | ||
103 | } | 115 | } | ||
104 | 116 | | |||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |
Maybe "Toggle with:"?