Merge lp:~seb128/ubuntu-system-settings/sound-silent-mode-handling into lp:ubuntu-system-settings

Proposed by Sebastien Bacher
Status: Merged
Approved by: Ken VanDine
Approved revision: 1507
Merged at revision: 1540
Proposed branch: lp:~seb128/ubuntu-system-settings/sound-silent-mode-handling
Merge into: lp:ubuntu-system-settings
Diff against target: 108 lines (+3/-48)
4 files modified
plugins/sound/CMakeLists.txt (+0/-1)
plugins/sound/PageComponent.qml (+0/-1)
plugins/sound/SilentModeWarning.qml (+0/-36)
plugins/sound/SoundsList.qml (+3/-10)
To merge this branch: bzr merge lp:~seb128/ubuntu-system-settings/sound-silent-mode-handling
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ken VanDine Approve
Review via email: mp+268944@code.launchpad.net

Commit message

[sound] don't display silent mode warnings, sounds should just be played
when user selected

Description of the change

[sound] don't display silent mode warnings, sounds should just be played
when user selected

To post a comment you must log in.
1507. By Sebastien Bacher

[sound] don't display silent mode warnings, sounds should just be played
when user selected

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

Looks good!

review: Approve
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/CMakeLists.txt'
2--- plugins/sound/CMakeLists.txt 2014-01-13 18:08:04 +0000
3+++ plugins/sound/CMakeLists.txt 2015-08-24 17:05:44 +0000
4@@ -1,6 +1,5 @@
5 set(QML_SOURCES
6 PageComponent.qml
7- SilentModeWarning.qml
8 SoundsList.qml
9 )
10
11
12=== modified file 'plugins/sound/PageComponent.qml'
13--- plugins/sound/PageComponent.qml 2015-04-07 10:46:52 +0000
14+++ plugins/sound/PageComponent.qml 2015-08-24 17:05:44 +0000
15@@ -95,7 +95,6 @@
16 objectPath: "/com/canonical/indicator/sound"
17
18 property variant volume: action("volume")
19- property variant silentMode: action("silent-mode")
20 property variant highVolume: action("high-volume")
21
22 Component.onCompleted: start()
23
24=== removed file 'plugins/sound/SilentModeWarning.qml'
25--- plugins/sound/SilentModeWarning.qml 2014-07-28 15:14:46 +0000
26+++ plugins/sound/SilentModeWarning.qml 1970-01-01 00:00:00 +0000
27@@ -1,36 +0,0 @@
28-import QtQuick 2.0
29-import SystemSettings 1.0
30-import Ubuntu.Components 0.1
31-import Ubuntu.Components.ListItems 0.1 as ListItem
32-
33-ListItem.Base {
34- objectName: "silentModeWarning"
35- height: itemId.height + units.gu(4)
36-
37- Item {
38- id: itemId
39- anchors.left: parent.left
40- anchors.right: parent.right
41- anchors.centerIn: parent
42-
43- height: silentIcon.height + silentLabel.height
44- Icon {
45- id: silentIcon
46- anchors.horizontalCenter: parent.horizontalCenter
47- height: units.gu(3)
48- width: height
49- /* TODO: need a different icon */
50- name: "speaker-mute"
51- }
52- Label {
53- id: silentLabel
54- anchors {
55- horizontalCenter: parent.horizontalCenter
56- top: silentIcon.bottom
57- }
58- text: i18n.tr("The phone is in Silent Mode.")
59- }
60- }
61-
62- showDivider: false
63-}
64
65=== modified file 'plugins/sound/SoundsList.qml'
66--- plugins/sound/SoundsList.qml 2014-11-13 17:02:24 +0000
67+++ plugins/sound/SoundsList.qml 2015-08-24 17:05:44 +0000
68@@ -47,8 +47,6 @@
69 busName: "com.canonical.indicator.sound"
70 objectPath: "/com/canonical/indicator/sound"
71
72- property variant silentMode: action("silent-mode")
73-
74 Component.onCompleted: start()
75 }
76
77@@ -62,8 +60,6 @@
78 anchors.left: parent.left
79 anchors.right: parent.right
80
81- SilentModeWarning { visible: soundActionGroup.silentMode.state }
82-
83 ListItem.SingleControl {
84 id: listId
85 control: Button {
86@@ -73,7 +69,7 @@
87 soundEffect.stop()
88 }
89 enabled: soundEffect.playbackState == Audio.PlayingState
90- visible: showStopButton && !soundActionGroup.silentMode.state
91+ visible: showStopButton
92 }
93 }
94
95@@ -103,11 +99,8 @@
96 soundSettings.incomingMessageSound = soundFileNames[index]
97 backendInfo.incomingMessageSound = soundFileNames[index]
98 }
99- /* Only preview the file if not in silent mode */
100- if (!soundActionGroup.silentMode.state) {
101- soundEffect.source = soundFileNames[index]
102- soundEffect.play()
103- }
104+ soundEffect.source = soundFileNames[index]
105+ soundEffect.play()
106 }
107 }
108 }

Subscribers

People subscribed via source and target branches