aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Aguirre <alberto.aguirre@canonical.com>2014-06-16 22:58:17 -0500
committerAlberto Aguirre <alberto.aguirre@canonical.com>2014-06-16 22:58:17 -0500
commit2769c7f764177e69870e92dabd207bb352cff0bc (patch)
tree59c5916206842c841a298aa9240e5600a5e74ca5
parent3982a33ab5d059f3a99f2ccde87270fd2a73d798 (diff)
downloadayatana-indicator-power-2769c7f764177e69870e92dabd207bb352cff0bc.tar.gz
ayatana-indicator-power-2769c7f764177e69870e92dabd207bb352cff0bc.tar.bz2
ayatana-indicator-power-2769c7f764177e69870e92dabd207bb352cff0bc.zip
Changes to address setBrightness interface moving from powerd to unity-system-compositor
-rw-r--r--src/ib-brightness-powerd-control.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/ib-brightness-powerd-control.c b/src/ib-brightness-powerd-control.c
index 9e8815b..ef18ad6 100644
--- a/src/ib-brightness-powerd-control.c
+++ b/src/ib-brightness-powerd-control.c
@@ -55,8 +55,26 @@ powerd_get_proxy(brightness_params_t *params)
g_object_unref (powerd_proxy);
return NULL;
}
-
- return powerd_proxy;
+
+ g_object_unref (powerd_proxy);
+
+ GDBusProxy* uscreen_proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ "com.canonical.Unity.Screen",
+ "/com/canonical/Unity/Screen",
+ "com.canonical.Unity.Screen",
+ NULL,
+ &error);
+
+ if (error != NULL)
+ {
+ g_debug ("could not connect to unity screen: %s", error->message);
+ g_error_free (error);
+ return NULL;
+ }
+
+ return uscreen_proxy;
}