2
* This file is part of system-settings
4
* Copyright (C) 2013-2014 Canonical Ltd.
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License version 3, as published
8
* by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranties of
12
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13
* PURPOSE. See the GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License along
16
* with this program. If not, see <http://www.gnu.org/licenses/>.
20
import Ubuntu.Components 1.3
21
import Ubuntu.SystemSettings.Notifications 1.0
22
import SystemSettings 1.0
25
id: appsSoundsNotifyPage
26
objectName: "appsSoundsNotifyPage"
28
property alias model: appsSoundsNotifyList.model
30
title: i18n.tr("Sound")
33
id: appsSoundsNotifyList
34
objectName: "appsSoundsNotifyList"
44
contentHeight: contentItem.childrenRect.height
48
title.text: i18n.tr("Apps that notify with sound:")
49
title.color: theme.palette.normal.backgroundSecondaryText
55
Component.onCompleted: {
56
var iconPath = model.icon.toString()
57
if (iconPath.search("/") == -1) {
58
icon.name = model.icon
60
icon.source = model.icon
64
title.text: model.displayName
69
SlotsLayout.position: SlotsLayout.Leading;
72
anchors.verticalCenter: icon.verticalCenter
73
checked: model.soundsNotify
75
onCheckedChanged: appsSoundsNotifyPage.model.setNotifyEnabled(index, checked)