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
This commit is contained in:
parent
c8e9d70679
commit
7ab09177e1
1 changed files with 10 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue