Merge lp:~albaguirre/unity8/fix-1230345 into lp:unity8

Proposed by Alberto Aguirre
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 1164
Merged at revision: 1186
Proposed branch: lp:~albaguirre/unity8/fix-1230345
Merge into: lp:unity8
Diff against target: 47 lines (+17/-1)
2 files modified
debian/control (+1/-1)
plugins/Powerd/Powerd.cpp (+16/-0)
To merge this branch: bzr merge lp:~albaguirre/unity8/fix-1230345
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+231006@code.launchpad.net

Commit message

Proxy inactivity timeout values from gsettings into Unity.Screen

Description of the change

Proxy inactivity timeout values from gsettings into Unity.Screen

To post a comment you must log in.
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

* Are there any related MPs required for this MP to build/function as expected? Please list.
Yes this is required for this to function: https://bugs.launchpad.net/gsettings-ubuntu-touch-schemas/+bug/1230345

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

* Did you make sure that your branch does not contain spurious tags?
Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
I changed the required version for gsettings-ubuntu-schemas. Does that count?

* If you changed the UI, has there been a design review?
N/A

lp:~albaguirre/unity8/fix-1230345 updated
1163. By Alberto Aguirre

Update required gsettings-ubuntu-schemas version

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~albaguirre/unity8/fix-1230345 updated
1164. By Alberto Aguirre

Update required gsettings-ubuntu-schemas package version

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looks harmless enough.

review: Approve
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

You can test this on command line:

sudo -u phablet -i gsettings set com.ubuntu.touch.system activity-timeout <secs>
sudo -u phablet -i gsettings set com.ubuntu.touch.system dim-timeout <secs>

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 2014-08-13 13:52:09 +0000
3+++ debian/control 2014-08-15 21:23:22 +0000
4@@ -166,7 +166,7 @@
5 Multi-Arch: same
6 Pre-Depends: ${misc:Pre-Depends},
7 Depends: accountsservice-ubuntu-schemas,
8- gsettings-ubuntu-schemas,
9+ gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815),
10 libhardware2,
11 libunity-core-6.0-9,
12 pay-service,
13
14=== modified file 'plugins/Powerd/Powerd.cpp'
15--- plugins/Powerd/Powerd.cpp 2014-06-17 03:52:25 +0000
16+++ plugins/Powerd/Powerd.cpp 2014-08-15 21:23:22 +0000
17@@ -25,6 +25,18 @@
18 unityScreen->asyncCall("userAutobrightnessEnable", QVariant(value));
19 }
20
21+void activityTimeoutChanged(GSettings *settings, const gchar *key, QDBusInterface *unityScreen)
22+{
23+ int value = g_settings_get_uint(settings, key);
24+ unityScreen->asyncCall("setInactivityTimeouts", QVariant(value), QVariant(-1));
25+}
26+
27+void dimTimeoutChanged(GSettings *settings, const gchar *key, QDBusInterface *unityScreen)
28+{
29+ int value = g_settings_get_uint(settings, key);
30+ unityScreen->asyncCall("setInactivityTimeouts", QVariant(-1), QVariant(value));
31+}
32+
33 Powerd::Powerd(QObject* parent)
34 : QObject(parent),
35 unityScreen(NULL)
36@@ -43,7 +55,11 @@
37
38 systemSettings = g_settings_new("com.ubuntu.touch.system");
39 g_signal_connect(systemSettings, "changed::auto-brightness", G_CALLBACK(autoBrightnessChanged), unityScreen);
40+ g_signal_connect(systemSettings, "changed::activity-timeout", G_CALLBACK(activityTimeoutChanged), unityScreen);
41+ g_signal_connect(systemSettings, "changed::dim-timeout", G_CALLBACK(dimTimeoutChanged), unityScreen);
42 autoBrightnessChanged(systemSettings, "auto-brightness", unityScreen);
43+ activityTimeoutChanged(systemSettings, "activity-timeout", unityScreen);
44+ dimTimeoutChanged(systemSettings, "dim-timeout", unityScreen);
45 }
46
47 Powerd::~Powerd()

Subscribers

People subscribed via source and target branches