Merge lp:~laney/ubuntu-system-settings/upower0.99 into lp:ubuntu-system-settings

Proposed by Iain Lane on 2014-08-15
Status: Merged
Approved by: Ken VanDine on 2014-10-31
Approved revision: 912
Merged at revision: 1170
Proposed branch: lp:~laney/ubuntu-system-settings/upower0.99
Merge into: lp:ubuntu-system-settings
Diff against target: 42 lines (+8/-2)
2 files modified
plugins/battery/battery.cpp (+4/-1)
plugins/battery/plugin/battery-plugin.cpp (+4/-1)
To merge this branch: bzr merge lp:~laney/ubuntu-system-settings/upower0.99
Reviewer Review Type Date Requested Status
Ken VanDine 2014-08-15 Approve on 2014-10-31
PS Jenkins bot continuous-integration Needs Fixing on 2014-10-30
Review via email: mp+230988@code.launchpad.net

Commit message

Update to work with UPower >= 0.99 as well as current versions

Description of the change

Mainly I want the CI debs but also I hope this is right already.

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:910
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1235/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3607
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2827
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/428
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/424
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/424/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/427
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3494
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4854
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4854/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11554
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2292
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3111
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3111/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1235/rebuild

review: Needs Fixing (continuous-integration)
Iain Lane (laney) wrote :

Seems okay to me, & tests pass with 0.99 - please review.

Iain Lane (laney) wrote :

On Fri, Sep 12, 2014 at 03:39:02PM -0000, PS Jenkins bot wrote:
> Review: Needs Fixing continuous-integration
>
> FAILED: Continuous integration, rev:910

ffs

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

911. By Iain Lane on 2014-09-12

Merge trunk

912. By Iain Lane on 2014-10-30

Merge trunk

Iain Lane (laney) wrote :

I just re-merged trunk, no conflicts

Ken VanDine (ken-vandine) wrote :

Nice to have this ready, fixes the FTBFS in vivid :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/battery/battery.cpp'
2--- plugins/battery/battery.cpp 2014-08-28 07:22:28 +0000
3+++ plugins/battery/battery.cpp 2014-10-30 16:41:15 +0000
4@@ -63,15 +63,18 @@
5
6 void Battery::buildDeviceString() {
7 UpClient *client;
8- gboolean returnIsOk;
9 GPtrArray *devices;
10 UpDeviceKind kind;
11
12+#if !UP_CHECK_VERSION(0, 99, 0)
13+ gboolean returnIsOk;
14+
15 client = up_client_new();
16 returnIsOk = up_client_enumerate_devices_sync(client, nullptr, nullptr);
17
18 if(!returnIsOk)
19 return;
20+#endif
21
22 devices = up_client_get_devices(client);
23
24
25=== modified file 'plugins/battery/plugin/battery-plugin.cpp'
26--- plugins/battery/plugin/battery-plugin.cpp 2014-07-23 13:37:06 +0000
27+++ plugins/battery/plugin/battery-plugin.cpp 2014-10-30 16:41:15 +0000
28@@ -49,10 +49,13 @@
29 {
30 BatteryItem *item (static_cast<BatteryItem *> (user_data));
31
32+#if !UP_CHECK_VERSION(0, 99, 0)
33 gboolean ret = up_client_enumerate_devices_sync (client, nullptr, nullptr);
34 if (!ret) {
35 item->setVisibility (false);
36- } else {
37+ } else
38+#endif
39+ {
40 GPtrArray *devices = up_client_get_devices (client);
41 item->setVisibility (devices->len > 0);
42 g_ptr_array_unref (devices);

Subscribers

People subscribed via source and target branches