This file is indexed.

/usr/share/ubuntu/settings/system/qml-plugins/sound/PageComponent.qml is in ubuntu-system-settings 0.3+16.04.20160330-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
/*
 * This file is part of system-settings
 *
 * Copyright (C) 2013 Canonical Ltd.
 *
 * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 3, as published
 * by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import GSettings 1.0
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.ListItems 1.3 as ListItem
import Ubuntu.Connectivity 1.0
import SystemSettings 1.0
import Ubuntu.SystemSettings.Sound 1.0
import Ubuntu.Settings.Menus 0.1 as Menus
import Ubuntu.Settings.Components 0.1 as USC
import QMenuModel 0.1

import "utilities.js" as Utilities

ItemPage {
    id: root

    objectName: "soundPage"

    title: i18n.tr("Sound")
    flickable: scrollWidget

    UbuntuSoundPanel { id: backendInfo }

    GSettings {
        id: keyboardSettings

        schema.id: "com.canonical.keyboard.maliit"
    }

    GSettings {
        id: soundSettings
        schema.id: "com.ubuntu.touch.sound"
    }

    Flickable {
        id: scrollWidget
        anchors.fill: parent
        contentHeight: contentItem.childrenRect.height
        boundsBehavior: (contentHeight > root.height) ?
                            Flickable.DragAndOvershootBounds :
                            Flickable.StopAtBounds
        /* Set the direction to workaround https://bugreports.qt-project.org/browse/QTBUG-31905
           otherwise the UI might end up in a situation where scrolling doesn't work */
        flickableDirection: Flickable.VerticalFlick

        Column {
            anchors.left: parent.left
            anchors.right: parent.right

            ListItem.Standard {
                control: Switch {
                    id: silentModeSwitch
                    objectName: "silentMode"
                    property bool serverChecked: soundActionGroup.silentMode.state

                    USC.ServerPropertySynchroniser {
                        userTarget: silentModeSwitch
                        userProperty: "checked"
                        serverTarget: silentModeSwitch
                        serverProperty: "serverChecked"

                        onSyncTriggered: soundActionGroup.silentMode.activate()
                    }
                }
                text: i18n.tr("Silent Mode")
            }

            QDBusActionGroup {
                id: soundActionGroup
                busType: DBus.SessionBus
                busName: "com.canonical.indicator.sound"
                objectPath: "/com/canonical/indicator/sound"

                property variant volume: action("volume")
                property variant silentMode: action("silent-mode")
                property variant highVolume: action("high-volume")

                Component.onCompleted: start()
            }

            Column  {
                anchors.left: parent.left
                anchors.right: parent.right
                visible: NetworkingStatus.modemAvailable

                SettingsItemTitle {
                    text: i18n.tr("Ringer:")
                }

                Menus.SliderMenu {
                    id: volumeSlider
                    objectName: "sliderMenu"
                    enabled: soundActionGroup.volume.state != null
                    minimumValue: 0.0
                    maximumValue: 1.0
                    minIcon: "image://theme/audio-volume-low-zero"
                    maxIcon: "image://theme/audio-volume-high"

                    property real serverValue: soundActionGroup.volume.state

                    USC.ServerPropertySynchroniser {
                        userTarget: volumeSlider
                        userProperty: "value"
                        serverTarget: volumeSlider
                        serverProperty: "serverValue"
                        maximumWaitBufferInterval: 16

                        onSyncTriggered: soundActionGroup.volume.updateState(value);
                    }
                }

                ListItem.Standard {
                    id: highVolumeWarning
                    visible: soundActionGroup.highVolume.state == true
                    text: i18n.tr("High volume can damage your hearing.")
                }

                SettingsItemTitle {
                    text: i18n.tr("Phone calls:")
                }

                ListItem.SingleValue {
                    text: i18n.tr("Ringtone")
                    value: Utilities.buildDisplayName(
                               backendInfo.incomingCallSound)
                    progression: true
                    onClicked: pageStack.push(
                                   Qt.resolvedUrl("SoundsList.qml"),
                                   { title: i18n.tr("Ringtone"),
                                     showStopButton: true,
                                     soundType: 0,
                                     soundsDir:
                                       "/usr/share/sounds/ubuntu/ringtones/" })
                }

                ListItem.Standard {
                    control: CheckBox {
                        objectName: "callVibrate"
                        property bool serverChecked: backendInfo.incomingCallVibrate
                        onServerCheckedChanged: checked = serverChecked
                        Component.onCompleted: checked = serverChecked
                        onTriggered: backendInfo.incomingCallVibrate = checked
                    }
                    text: i18n.tr("Vibrate on ring")
                }

                ListItem.Standard {
                    control: CheckBox {
                        objectName: "callVibrateSilentMode"
                        property bool serverChecked: backendInfo.incomingCallVibrateSilentMode
                        onServerCheckedChanged: checked = serverChecked
                        Component.onCompleted: checked = serverChecked
                        onTriggered: backendInfo.incomingCallVibrateSilentMode = checked
                    }
                    text: i18n.tr("Vibrate in Silent Mode")
                }

                ListItem.Standard {
                    control: Switch {
                        objectName: "dialpadSounds"
                        property bool serverChecked: backendInfo.dialpadSoundsEnabled
                        onServerCheckedChanged: checked = serverChecked
                        Component.onCompleted: checked = serverChecked
                        onTriggered: backendInfo.dialpadSoundsEnabled = checked
                    }
                    text: i18n.tr("Dialpad tones")
                }

                SettingsItemTitle {
                    text: i18n.tr("Messages:")
                }

                ListItem.SingleValue {
                    text: i18n.tr("Message received")
                    value:Utilities.buildDisplayName(
                              backendInfo.incomingMessageSound)
                    progression: true
                    onClicked: pageStack.push(
                                   Qt.resolvedUrl("SoundsList.qml"),
                                   { title: i18n.tr("Message received"),
                                      soundType: 1,
                                     soundsDir:
                                       "/usr/share/sounds/ubuntu/notifications/" })
                }

                ListItem.Standard {
                    control: CheckBox {
                        objectName: "messageVibrate"
                        property bool serverChecked: backendInfo.incomingMessageVibrate
                        onServerCheckedChanged: checked = serverChecked
                        Component.onCompleted: checked = serverChecked
                        onTriggered: backendInfo.incomingMessageVibrate = checked
                    }
                    text: i18n.tr("Vibrate with message sound")
                }

                ListItem.Standard {
                    control: CheckBox {
                        objectName: "messageVibrateSilentMode"
                        property bool serverChecked: backendInfo.incomingMessageVibrateSilentMode
                        onServerCheckedChanged: checked = serverChecked
                        Component.onCompleted: checked = serverChecked
                        onTriggered: backendInfo.incomingMessageVibrateSilentMode = checked
                    }
                    text: i18n.tr("Vibrate in Silent Mode")
                }

                SettingsItemTitle {
                    text: i18n.tr("Other sounds:")
                }
            }

            ListItem.Standard {
                text: i18n.tr("Keyboard sound")

                control: Switch {
                    objectName: "keyboardSoundSwitch"
                    property bool serverChecked: keyboardSettings.keyPressFeedback
                    onServerCheckedChanged: checked = serverChecked
                    Component.onCompleted: checked = serverChecked
                    onTriggered: keyboardSettings.keyPressFeedback = checked
                }
            }

            ListItem.Standard {
                id: lockSound
                control: Switch {
                    checked: false
                }
                text: i18n.tr("Lock sound")
                visible: showAllUI
            }

            ListItem.Divider {}

            ListItem.Standard {
                text: i18n.tr("Other vibrations")
                control: Switch {
                    objectName: "otherVibrateSwitch"
                    property bool serverChecked: backendInfo.otherVibrate
                    onServerCheckedChanged: checked = serverChecked
                    Component.onCompleted: checked = serverChecked
                    onTriggered: backendInfo.otherVibrate = checked
                }
            }
        }
    }
}