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 733412 - power: always connect to power settings changes
power: always connect to power settings changes
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: 2014-07-19 19:00 UTC by Cosimo Cecchi
Modified: 2014-07-23 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: always connect to power settings changes (1.51 KB, patch)
2014-07-19 19:00 UTC, Cosimo Cecchi
needs-work Details | Review
power: always connect to power settings changes (1.95 KB, patch)
2014-07-23 03:12 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2014-07-19 19:00:53 UTC
See attached patch.
This fixes a bug where the automatic suspend setting label wasn't updated immediately when changing a setting from the dialog.
Comment 1 Cosimo Cecchi 2014-07-19 19:00:56 UTC
Created attachment 281192 [details] [review]
power: always connect to power settings changes

We were failing to connect to the signal when CanHibernate returned
FALSE; in that case, we would never update the automatic suspend label
when a setting in the dialog was changed.
Comment 2 Rui Matos 2014-07-21 09:20:50 UTC
Review of attachment 281192 [details] [review]:

But this means that if the critical-battery-action gsetting changes we'll try to use priv->critical_battery_combo which is then uninitialized (in the !CanHibernate case).
Comment 3 Cosimo Cecchi 2014-07-23 03:12:23 UTC
Created attachment 281448 [details] [review]
power: always connect to power settings changes

--

Whoops, good point.
Comment 4 Bastien Nocera 2014-07-23 11:36:31 UTC
Review of attachment 281448 [details] [review]:

Looks good.
Comment 5 Rui Matos 2014-07-23 14:04:16 UTC
Pushing to include in today's release.

Attachment 281448 [details] pushed as 84a9c51 - power: always connect to power settings changes