[gnome-control-center] screen: Fix for gnome-settings-daemon changes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] screen: Fix for gnome-settings-daemon changes
- Date: Fri, 15 Jun 2012 15:04:41 +0000 (UTC)
commit 7ab09177e12b6041ca9a681c0739ffa40b6e1f57
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Fri Jun 8 23:01:10 2012 +0200
screen: Fix for gnome-settings-daemon changes
g-s-d changed its DBus interface, and that made all
external changes to brightness invisible to the panel. Update
accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=662117
panels/screen/cc-screen-panel.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/panels/screen/cc-screen-panel.c b/panels/screen/cc-screen-panel.c
index f365d71..c76a63d 100644
--- a/panels/screen/cc-screen-panel.c
+++ b/panels/screen/cc-screen-panel.c
@@ -186,21 +186,21 @@ on_signal (GDBusProxy *proxy,
{
CcScreenPanel *self = CC_SCREEN_PANEL (user_data);
- if (g_strcmp0 (signal_name, "BrightnessChanged") == 0)
+ if (g_strcmp0 (signal_name, "Changed") == 0)
{
- guint brightness;
- GtkRange *range;
-
/* changed, but ignoring */
if (self->priv->setting_brightness)
return;
- /* update the bar */
- g_variant_get (parameters,
- "(u)",
- &brightness);
- range = GTK_RANGE (WID ("screen_brightness_hscale"));
- gtk_range_set_value (range, brightness);
+ /* retrieve the value again from g-s-d */
+ g_dbus_proxy_call (self->priv->proxy,
+ "GetPercentage",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ 200, /* we don't want to randomly move the bar */
+ self->priv->cancellable,
+ get_brightness_cb,
+ user_data);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]