After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698757 - power: Adapt to new DBus interface for setting screen brightness
power: Adapt to new DBus interface for setting screen brightness
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
unspecified
Other All
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-24 15:40 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-06-23 00:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Adapt to new DBus interface for setting screen brightness (5.69 KB, patch)
2013-04-24 15:40 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
power: Adapt to new DBus interface for setting screen brightness (6.16 KB, patch)
2013-06-10 19:02 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-04-24 15:40:47 UTC
Adapt to the interface changes in bug #698754.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-04-24 15:40:54 UTC
Created attachment 242338 [details] [review]
power: Adapt to new DBus interface for setting screen brightness
Comment 2 Bastien Nocera 2013-06-04 12:08:50 UTC
Review of attachment 242338 [details] [review]:

Where do you check for the backlight not being present?

::: panels/power/cc-power-panel.c
@@ +833,3 @@
   g_dbus_proxy_call (priv->screen_proxy,
+                     "org.freedesktop.DBus.Properties.Set",
+                     g_variant_new_parsed ("('org.gnome.SettingsDaemon.Power.Screen',"

Put this on one line, it's already quite indigest.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-06-10 19:02:23 UTC
Created attachment 246440 [details] [review]
power: Adapt to new DBus interface for setting screen brightness
Comment 4 Bastien Nocera 2013-06-11 16:17:54 UTC
Review of attachment 246440 [details] [review]:

Looks good to commit after those changes.

::: panels/power/cc-power-panel.c
@@ +855,3 @@
+  /* set the slider */
+  g_variant_get (result, "i", &brightness);
+  visible = brightness >= 0.0;

() around the comparison part.

@@ +862,1 @@
+  if (visible)

if (!visible)
  return;

Saves you from reformatting/moving that code.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-06-23 00:18:01 UTC
Attachment 246440 [details] pushed as e5c0be9 - power: Adapt to new DBus interface for setting screen brightness