Merge lp:~jonas-drange/ubuntu-system-settings/rtm-othervibrate into lp:ubuntu-system-settings/rtm-14.09

Proposed by Jonas G. Drange
Status: Merged
Approved by: Ken VanDine
Approved revision: 976
Merged at revision: 977
Proposed branch: lp:~jonas-drange/ubuntu-system-settings/rtm-othervibrate
Merge into: lp:ubuntu-system-settings/rtm-14.09
Diff against target: 120 lines (+42/-1)
4 files modified
debian/control (+1/-1)
plugins/sound/PageComponent.qml (+14/-0)
plugins/sound/sound.cpp (+20/-0)
plugins/sound/sound.h (+7/-0)
To merge this branch: bzr merge lp:~jonas-drange/ubuntu-system-settings/rtm-othervibrate
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+247819@code.launchpad.net

Commit message

[sound] let user toggle other vibrate setting

Description of the change

[sound] let user toggle other vibrate setting

To post a comment you must log in.
976. By Jonas G. Drange

cherry pick 1163

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
Ken VanDine (ken-vandine) wrote :

Please link the bug to this branch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-01-21 12:04:00 +0000
3+++ debian/control 2015-01-28 11:50:24 +0000
4@@ -58,7 +58,7 @@
5 bluez (>= 4.36),
6 dbus-property-service [amd64 armhf i386],
7 gsettings-desktop-schemas,
8- gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815),
9+ gsettings-ubuntu-schemas (>= 0.0.4),
10 indicator-bluetooth (>> 0.0.6+13.10.20131010),
11 indicator-network (>= 0.5.0+13.10.20130918),
12 powerd (>= 0.15) | gnome-settings-daemon,
13
14=== modified file 'plugins/sound/PageComponent.qml'
15--- plugins/sound/PageComponent.qml 2014-11-20 14:26:11 +0000
16+++ plugins/sound/PageComponent.qml 2015-01-28 11:50:24 +0000
17@@ -213,6 +213,7 @@
18
19 ListItem.Standard {
20 text: i18n.tr("Keyboard sound")
21+ showDivider: false
22
23 control: Switch {
24 objectName: "keyboardSoundSwitch"
25@@ -231,6 +232,19 @@
26 text: i18n.tr("Lock sound")
27 visible: showAllUI
28 }
29+
30+ ListItem.Divider {}
31+
32+ ListItem.Standard {
33+ text: i18n.tr("Other vibrations")
34+ control: Switch {
35+ objectName: "otherVibrateSwitch"
36+ property bool serverChecked: backendInfo.otherVibrate
37+ onServerCheckedChanged: checked = serverChecked
38+ Component.onCompleted: checked = serverChecked
39+ onTriggered: backendInfo.otherVibrate = checked
40+ }
41+ }
42 }
43 }
44 }
45
46=== modified file 'plugins/sound/sound.cpp'
47--- plugins/sound/sound.cpp 2014-11-18 15:26:42 +0000
48+++ plugins/sound/sound.cpp 2015-01-28 11:50:24 +0000
49@@ -57,6 +57,8 @@
50 Q_EMIT incomingCallVibrateSilentModeChanged();
51 } else if (property == "IncomingMessageVibrateSilentMode") {
52 Q_EMIT incomingMessageVibrateSilentModeChanged();
53+ } else if (property == "OtherVibrate") {
54+ Q_EMIT otherVibrateChanged();
55 } else if (property == "DialpadSoundsEnabled") {
56 Q_EMIT dialpadSoundsEnabledChanged();
57 }
58@@ -71,6 +73,7 @@
59 Q_EMIT incomingMessageVibrateChanged();
60 Q_EMIT incomingCallVibrateSilentModeChanged();
61 Q_EMIT incomingMessageVibrateSilentModeChanged();
62+ Q_EMIT otherVibrateChanged();
63 Q_EMIT dialpadSoundsEnabledChanged();
64 }
65
66@@ -176,6 +179,23 @@
67 Q_EMIT(incomingMessageVibrateSilentModeChanged());
68 }
69
70+bool Sound::getOtherVibrate()
71+{
72+ return m_accountsService.getUserProperty(AS_INTERFACE,
73+ "OtherVibrate").toBool();
74+}
75+
76+void Sound::setOtherVibrate(bool enabled)
77+{
78+ if (enabled == getOtherVibrate())
79+ return;
80+
81+ m_accountsService.setUserProperty(AS_INTERFACE,
82+ "OtherVibrate",
83+ QVariant::fromValue(enabled));
84+ Q_EMIT(otherVibrateChanged());
85+}
86+
87 bool Sound::getDialpadSoundsEnabled()
88 {
89 return m_accountsService.getUserProperty(AS_INTERFACE,
90
91=== modified file 'plugins/sound/sound.h'
92--- plugins/sound/sound.h 2014-11-18 15:26:42 +0000
93+++ plugins/sound/sound.h 2015-01-28 11:50:24 +0000
94@@ -57,6 +57,10 @@
95 READ getIncomingMessageVibrateSilentMode
96 WRITE setIncomingMessageVibrateSilentMode
97 NOTIFY incomingMessageVibrateSilentModeChanged)
98+ Q_PROPERTY (bool otherVibrate
99+ READ getOtherVibrate
100+ WRITE setOtherVibrate
101+ NOTIFY otherVibrateChanged)
102
103 Q_PROPERTY (bool dialpadSoundsEnabled
104 READ getDialpadSoundsEnabled
105@@ -75,6 +79,7 @@
106 void incomingMessageVibrateChanged();
107 void incomingCallVibrateSilentModeChanged();
108 void incomingMessageVibrateSilentModeChanged();
109+ void otherVibrateChanged();
110 void dialpadSoundsEnabledChanged();
111
112 private:
113@@ -92,6 +97,8 @@
114 void setIncomingCallVibrateSilentMode(bool enabled);
115 bool getIncomingMessageVibrateSilentMode();
116 void setIncomingMessageVibrateSilentMode(bool enabled);
117+ bool getOtherVibrate();
118+ void setOtherVibrate(bool enabled);
119 bool getDialpadSoundsEnabled();
120 void setDialpadSoundsEnabled(bool enabled);
121

Subscribers

People subscribed via source and target branches