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);
|
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 */
|
/* changed, but ignoring */
|
||||||
if (self->priv->setting_brightness)
|
if (self->priv->setting_brightness)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* update the bar */
|
/* retrieve the value again from g-s-d */
|
||||||
g_variant_get (parameters,
|
g_dbus_proxy_call (self->priv->proxy,
|
||||||
"(u)",
|
"GetPercentage",
|
||||||
&brightness);
|
NULL,
|
||||||
range = GTK_RANGE (WID ("screen_brightness_hscale"));
|
G_DBUS_CALL_FLAGS_NONE,
|
||||||
gtk_range_set_value (range, brightness);
|
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