aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorAlberto Aguirre <alberto.aguirre@canonical.com>2014-06-19 10:04:01 -0500
committerAlberto Aguirre <alberto.aguirre@canonical.com>2014-06-19 10:04:01 -0500
commit9e9a0da8c20c64dd394d98b94955e58911b2c53e (patch)
tree4b8240c91d44e6c494811ef1517104b31693171a /src/service.c
parent2769c7f764177e69870e92dabd207bb352cff0bc (diff)
downloadayatana-indicator-power-9e9a0da8c20c64dd394d98b94955e58911b2c53e.tar.gz
ayatana-indicator-power-9e9a0da8c20c64dd394d98b94955e58911b2c53e.tar.bz2
ayatana-indicator-power-9e9a0da8c20c64dd394d98b94955e58911b2c53e.zip
Remove references to powerd since the brightness interface is now provided by Unity.Screen
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/service.c b/src/service.c
index 46ad802..6438c9a 100644
--- a/src/service.c
+++ b/src/service.c
@@ -27,7 +27,7 @@
#include "device.h"
#include "device-provider.h"
#include "ib-brightness-control.h"
-#include "ib-brightness-powerd-control.h"
+#include "ib-brightness-uscreen-control.h"
#include "service.h"
#define BUS_NAME "com.canonical.indicator.power"
@@ -105,7 +105,7 @@ struct _IndicatorPowerServicePrivate
GSettings * settings;
IbBrightnessControl * brightness_control;
- IbBrightnessPowerdControl * brightness_powerd_control;
+ IbBrightnessUscreenControl * brightness_uscreen_control;
guint own_id;
guint actions_export_id;
@@ -467,9 +467,9 @@ get_brightness_range (IndicatorPowerService * self, gint * low, gint * high)
{
max = ib_brightness_control_get_max_value (self->priv->brightness_control);
}
- else if (p->brightness_powerd_control)
+ else if (p->brightness_uscreen_control)
{
- max = ib_brightness_powerd_control_get_max_value (self->priv->brightness_powerd_control);
+ max = ib_brightness_uscreen_control_get_max_value (self->priv->brightness_uscreen_control);
}
*low = max * 0.05; /* 5% minimum -- don't let the screen go completely dark */
*high = max;
@@ -500,9 +500,9 @@ action_state_for_brightness (IndicatorPowerService * self)
{
brightness = ib_brightness_control_get_value (p->brightness_control);
}
- else if (p->brightness_powerd_control)
+ else if (p->brightness_uscreen_control)
{
- brightness = ib_brightness_powerd_control_get_value (p->brightness_powerd_control);
+ brightness = ib_brightness_uscreen_control_get_value (p->brightness_uscreen_control);
}
return g_variant_new_double (brightness_to_percentage (self, brightness));
}
@@ -527,9 +527,9 @@ on_brightness_change_requested (GSimpleAction * action G_GNUC_UNUSED,
{
ib_brightness_control_set_value (self->priv->brightness_control, brightness);
}
- else if (self->priv->brightness_powerd_control)
+ else if (self->priv->brightness_uscreen_control)
{
- ib_brightness_powerd_control_set_value (self->priv->brightness_powerd_control, brightness);
+ ib_brightness_uscreen_control_set_value (self->priv->brightness_uscreen_control, brightness);
}
update_brightness_action_state (self);
@@ -1024,7 +1024,7 @@ my_dispose (GObject * o)
// g_clear_pointer has NULL check inside.
g_clear_pointer (&p->brightness_control, ib_brightness_control_free);
- g_clear_pointer (&p->brightness_powerd_control, ib_brightness_powerd_control_free);
+ g_clear_pointer (&p->brightness_uscreen_control, ib_brightness_uscreen_control_free);
indicator_power_service_set_device_provider (self, NULL);
@@ -1038,8 +1038,8 @@ my_dispose (GObject * o)
static void
indicator_power_service_init (IndicatorPowerService * self)
{
- GDBusProxy *powerd_proxy;
- brightness_params_t powerd_brightness_params;
+ GDBusProxy *uscreen_proxy;
+ brightness_params_t brightness_params;
priv_t * p = G_TYPE_INSTANCE_GET_PRIVATE (self,
INDICATOR_TYPE_POWER_SERVICE,
IndicatorPowerServicePrivate);
@@ -1049,10 +1049,10 @@ indicator_power_service_init (IndicatorPowerService * self)
p->settings = g_settings_new ("com.canonical.indicator.power");
- powerd_proxy = powerd_get_proxy(&powerd_brightness_params);
- if (powerd_proxy != NULL)
+ uscreen_proxy = uscreen_get_proxy(&brightness_params);
+ if (uscreen_proxy != NULL)
{
- p->brightness_powerd_control = ib_brightness_powerd_control_new(powerd_proxy, powerd_brightness_params);
+ p->brightness_uscreen_control = ib_brightness_uscreen_control_new(uscreen_proxy, brightness_params);
}
else
{