Merge lp:~ted/ubuntu-system-settings/extreme-volume-warning into lp:ubuntu-system-settings

Proposed by Ted Gould
Status: Merged
Merged at revision: 1213
Proposed branch: lp:~ted/ubuntu-system-settings/extreme-volume-warning
Merge into: lp:ubuntu-system-settings
Diff against target: 105 lines (+37/-10)
1 file modified
plugins/sound/PageComponent.qml (+37/-10)
To merge this branch: bzr merge lp:~ted/ubuntu-system-settings/extreme-volume-warning
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Touch System Settings Pending
Review via email: mp+238335@code.launchpad.net

Commit message

Show high volume warning

Description of the change

Using the indicator-sound action to determine whether we should show a warning on high volume. Also, cleaned up the dividers to match the spec while I was there. It was hard to read as a flat list.

To post a comment you must log in.
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

We'll need this targetting lp:ubuntu-system-settings/rtm-14.09 as well.

Revision history for this message
Ted Gould (ted) wrote :

We dropped for RTM, but would like it go through the normal landing process. And get there through that.

Revision history for this message
Ted Gould (ted) wrote :

For Utopic it needs this MR to land in indicator-sound to make the action available.

https://code.launchpad.net/~ted/indicator-sound/extreme-volume-warning/+merge/238168

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/sound/PageComponent.qml'
2--- plugins/sound/PageComponent.qml 2014-09-10 09:48:31 +0000
3+++ plugins/sound/PageComponent.qml 2014-10-15 04:46:19 +0000
4@@ -74,9 +74,13 @@
5 onCheckedChanged: backendInfo.silentMode = checked
6 }
7 text: i18n.tr("Silent Mode")
8- }
9-
10- ListItem.Standard {
11+ showDivider: false
12+ }
13+
14+ ListItem.Divider {
15+ }
16+
17+ ListItem.Header {
18 text: i18n.tr("Ringer:")
19 }
20
21@@ -87,6 +91,7 @@
22 objectPath: "/com/canonical/indicator/sound"
23
24 property variant volume: action("volume")
25+ property variant highVolume: action("high-volume")
26
27 Component.onCompleted: start()
28 }
29@@ -96,7 +101,7 @@
30 property: "value"
31 value: soundActionGroup.volume.state
32 }
33-
34+
35 Menus.SliderMenu {
36 id: sliderMenu
37 objectName: "sliderMenu"
38@@ -106,9 +111,20 @@
39 minIcon: "image://theme/audio-volume-low"
40 maxIcon: "image://theme/audio-volume-high"
41 onUpdated: soundActionGroup.volume.updateState(value);
42+ showDivider: highVolumeWarning.visible
43 }
44
45 ListItem.Standard {
46+ id: highVolumeWarning
47+ visible: soundActionGroup.highVolume.state == true
48+ text: i18n.tr("High volume can damage your hearing.")
49+ showDivider: false
50+ }
51+
52+ ListItem.Divider {
53+ }
54+
55+ ListItem.Header {
56 text: i18n.tr("Phone calls:")
57 }
58
59@@ -151,9 +167,13 @@
60 onCheckedChanged: backendInfo.dialpadSoundsEnabled = checked
61 }
62 text: i18n.tr("Dialpad sounds")
63- }
64-
65- ListItem.Standard {
66+ showDivider: false
67+ }
68+
69+ ListItem.Divider {
70+ }
71+
72+ ListItem.Header {
73 text: i18n.tr("Messages:")
74 }
75
76@@ -186,9 +206,13 @@
77 onCheckedChanged: backendInfo.incomingMessageVibrateSilentMode = checked
78 }
79 text: i18n.tr("Vibrate in Silent Mode")
80- }
81-
82- ListItem.Standard {
83+ showDivider: false
84+ }
85+
86+ ListItem.Divider {
87+ }
88+
89+ ListItem.Header {
90 text: i18n.tr("Other sounds:")
91 }
92
93@@ -201,9 +225,12 @@
94
95 onClicked: keyboardSettings.keyPressFeedback = checked
96 }
97+
98+ showDivider: lockSound.visible
99 }
100
101 ListItem.Standard {
102+ id: lockSound
103 control: Switch {
104 checked: false
105 }

Subscribers

People subscribed via source and target branches