aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rw-r--r--src/ib-brightness-powerd-control.c14
-rw-r--r--src/ib-brightness-powerd-control.h3
3 files changed, 17 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 73b9718..14ad040 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+indicator-power (12.10.6+14.10.20140428-0ubuntu1) utopic; urgency=low
+
+ [ Ricardo Salveti de Araujo ]
+ * Updating code to reflect latest powerd dbus API changes
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 28 Apr 2014 23:25:53 +0000
+
indicator-power (12.10.6+14.04.20140411-0ubuntu1) trusty; urgency=low
[ Sebastien Bacher ]
diff --git a/src/ib-brightness-powerd-control.c b/src/ib-brightness-powerd-control.c
index 2136fcd..9e8815b 100644
--- a/src/ib-brightness-powerd-control.c
+++ b/src/ib-brightness-powerd-control.c
@@ -19,8 +19,8 @@
#include "ib-brightness-powerd-control.h"
-static gboolean getBrightnessParams(GDBusProxy* powerd_proxy, int *min, int *max,
- int *dflt, gboolean *ab_supported);
+static gboolean getBrightnessParams(GDBusProxy* powerd_proxy, int *dim, int *min,
+ int *max, int *dflt, gboolean *ab_supported);
GDBusProxy*
powerd_get_proxy(brightness_params_t *params)
@@ -46,8 +46,8 @@ powerd_get_proxy(brightness_params_t *params)
return NULL;
}
- ret = getBrightnessParams(powerd_proxy, &(params->min), &(params->max),
- &(params->dflt), &(params->ab_supported));
+ ret = getBrightnessParams(powerd_proxy, &(params->dim), &(params->min),
+ &(params->max), &(params->dflt), &(params->ab_supported));
if (! ret)
{
@@ -61,7 +61,7 @@ powerd_get_proxy(brightness_params_t *params)
static gboolean
-getBrightnessParams(GDBusProxy* powerd_proxy, int *min, int *max, int *dflt, gboolean *ab_supported)
+getBrightnessParams(GDBusProxy* powerd_proxy, int *dim, int *min, int *max, int *dflt, gboolean *ab_supported)
{
GVariant *ret = NULL;
GError *error = NULL;
@@ -84,7 +84,7 @@ getBrightnessParams(GDBusProxy* powerd_proxy, int *min, int *max, int *dflt, gbo
return FALSE;
}
- g_variant_get(ret, "((iiib))", min, max, dflt, ab_supported);
+ g_variant_get(ret, "((iiiib))", dim, min, max, dflt, ab_supported);
g_variant_unref(ret);
return TRUE;
}
@@ -114,6 +114,7 @@ struct _IbBrightnessPowerdControl
GDBusProxy *powerd_proxy;
GCancellable *gcancel;
+ int dim;
int min;
int max;
int dflt; // defalut value
@@ -131,6 +132,7 @@ ib_brightness_powerd_control_new (GDBusProxy* powerd_proxy, brightness_params_t
control->powerd_proxy = powerd_proxy;
control->gcancel = g_cancellable_new();
+ control->dim = params.dim;
control->min = params.min;
control->max = params.max;
control->dflt = params.dflt;
diff --git a/src/ib-brightness-powerd-control.h b/src/ib-brightness-powerd-control.h
index 77f6c8d..95de1f4 100644
--- a/src/ib-brightness-powerd-control.h
+++ b/src/ib-brightness-powerd-control.h
@@ -23,8 +23,9 @@
#include <gio/gio.h>
typedef struct {
- int max;
+ int dim;
int min;
+ int max;
int dflt;
gboolean ab_supported;
} brightness_params_t;