Merge lp:~rsalveti/indicator-power/update-powerd-api into lp:indicator-power/14.04

Proposed by Ricardo Salveti on 2014-04-28
Status: Merged
Merged at revision: 242
Proposed branch: lp:~rsalveti/indicator-power/update-powerd-api
Merge into: lp:indicator-power/14.04
Diff against target: 74 lines (+10/-7)
2 files modified
src/ib-brightness-powerd-control.c (+8/-6)
src/ib-brightness-powerd-control.h (+2/-1)
To merge this branch: bzr merge lp:~rsalveti/indicator-power/update-powerd-api
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2014-04-28
Indicator Applet Developers 2014-04-28 Pending
Review via email: mp+217522@code.launchpad.net

Commit message

Updating code to reflect latest powerd dbus API changes

Description of the change

Updating code to reflect latest powerd dbus API changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ib-brightness-powerd-control.c'
2--- src/ib-brightness-powerd-control.c 2014-03-06 03:27:12 +0000
3+++ src/ib-brightness-powerd-control.c 2014-04-28 23:20:04 +0000
4@@ -19,8 +19,8 @@
5
6 #include "ib-brightness-powerd-control.h"
7
8-static gboolean getBrightnessParams(GDBusProxy* powerd_proxy, int *min, int *max,
9- int *dflt, gboolean *ab_supported);
10+static gboolean getBrightnessParams(GDBusProxy* powerd_proxy, int *dim, int *min,
11+ int *max, int *dflt, gboolean *ab_supported);
12
13 GDBusProxy*
14 powerd_get_proxy(brightness_params_t *params)
15@@ -46,8 +46,8 @@
16 return NULL;
17 }
18
19- ret = getBrightnessParams(powerd_proxy, &(params->min), &(params->max),
20- &(params->dflt), &(params->ab_supported));
21+ ret = getBrightnessParams(powerd_proxy, &(params->dim), &(params->min),
22+ &(params->max), &(params->dflt), &(params->ab_supported));
23
24 if (! ret)
25 {
26@@ -61,7 +61,7 @@
27
28
29 static gboolean
30-getBrightnessParams(GDBusProxy* powerd_proxy, int *min, int *max, int *dflt, gboolean *ab_supported)
31+getBrightnessParams(GDBusProxy* powerd_proxy, int *dim, int *min, int *max, int *dflt, gboolean *ab_supported)
32 {
33 GVariant *ret = NULL;
34 GError *error = NULL;
35@@ -84,7 +84,7 @@
36 return FALSE;
37 }
38
39- g_variant_get(ret, "((iiib))", min, max, dflt, ab_supported);
40+ g_variant_get(ret, "((iiiib))", dim, min, max, dflt, ab_supported);
41 g_variant_unref(ret);
42 return TRUE;
43 }
44@@ -114,6 +114,7 @@
45 GDBusProxy *powerd_proxy;
46 GCancellable *gcancel;
47
48+ int dim;
49 int min;
50 int max;
51 int dflt; // defalut value
52@@ -131,6 +132,7 @@
53 control->powerd_proxy = powerd_proxy;
54 control->gcancel = g_cancellable_new();
55
56+ control->dim = params.dim;
57 control->min = params.min;
58 control->max = params.max;
59 control->dflt = params.dflt;
60
61=== modified file 'src/ib-brightness-powerd-control.h'
62--- src/ib-brightness-powerd-control.h 2014-03-05 08:09:10 +0000
63+++ src/ib-brightness-powerd-control.h 2014-04-28 23:20:04 +0000
64@@ -23,8 +23,9 @@
65 #include <gio/gio.h>
66
67 typedef struct {
68+ int dim;
69+ int min;
70 int max;
71- int min;
72 int dflt;
73 gboolean ab_supported;
74 } brightness_params_t;

Subscribers

People subscribed via source and target branches