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 749436 - "When battery power is critical" option isn't an option anymore
"When battery power is critical" option isn't an option anymore
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
: 751121 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-05-15 14:29 UTC by Bastien Nocera
Modified: 2015-06-17 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Remove critical-battery-action key (2.22 KB, patch)
2015-05-15 14:42 UTC, Bastien Nocera
committed Details | Review
power: Fix "When battery power is critical" label with UPower 1.0 (6.59 KB, patch)
2015-05-15 14:54 UTC, Bastien Nocera
none Details | Review
power: Fix "When battery power is critical" label with UPower 1.0 (7.71 KB, patch)
2015-05-15 15:21 UTC, Bastien Nocera
committed Details | Review
power: Remove "When battery power is critical" label (5.97 KB, patch)
2015-05-18 12:39 UTC, Bastien Nocera
none Details | Review
power: Remove "When battery power is critical" label (6.08 KB, patch)
2015-05-18 12:47 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-05-15 14:29:17 UTC
It's handled in UPower directly now. We should call:
GetCriticalAction()
on UPower to get the value.
Comment 1 Bastien Nocera 2015-05-15 14:42:41 UTC
Created attachment 303426 [details] [review]
power: Remove critical-battery-action key

It's not used anymore.
Comment 2 Bastien Nocera 2015-05-15 14:54:56 UTC
Created attachment 303427 [details] [review]
power: Fix "When battery power is critical" label with UPower 1.0

With UPower 1.0, the critical action to take when the battery level is
too low isn't in the hands of the user anymore, but in the hands of the
system.

It's now handled by UPower directly, through the
CriticalPowerAction configuration option. Instead of asking logind
whether the system supports hibernation, ask UPower directly what the
action will be when we're nearly out of battery.
Comment 3 Rui Matos 2015-05-15 15:09:41 UTC
Review of attachment 303427 [details] [review]:

The UI looks weird though since there's nothing the user can do here.

I think we either need to make upower have a dbus API to change this or just not show it?

::: panels/power/cc-power-panel.c
@@ +1840,3 @@
   GVariant *result;
   GDBusConnection *connection;
+  const char *label;

this needs to be named something else since there's already a GtkWidget *label
Comment 4 Bastien Nocera 2015-05-15 15:21:09 UTC
Created attachment 303430 [details] [review]
power: Fix "When battery power is critical" label with UPower 1.0

With UPower 1.0, the critical action to take when the battery level is
too low isn't in the hands of the user anymore, but in the hands of the
system.

It's now handled by UPower directly, through the
CriticalPowerAction configuration option. Instead of asking logind
whether the system supports hibernation, ask UPower directly what the
action will be when we're nearly out of battery.
Comment 5 Bastien Nocera 2015-05-15 15:24:34 UTC
(In reply to Rui Matos from comment #3)
> Review of attachment 303427 [details] [review] [review]:
> 
> The UI looks weird though since there's nothing the user can do here.
> 
> I think we either need to make upower have a dbus API to change this or just
> not show it?

This looks the same way it did when hibernation wasn't available. This isn't really something we want users to change in any case.

> ::: panels/power/cc-power-panel.c
> @@ +1840,3 @@
>    GVariant *result;
>    GDBusConnection *connection;
> +  const char *label;
> 
> this needs to be named something else since there's already a GtkWidget
> *label

Yeah, I should have tried to compile the thing, fixed in the latter bug.
Comment 6 Rui Matos 2015-05-15 15:30:32 UTC
(In reply to Bastien Nocera from comment #5)
> This looks the same way it did when hibernation wasn't available. This isn't
> really something we want users to change in any case.

Right, it was like that already. I'm asking if we should change it now since it doesn't look "right" IMO.

If we're happy with the non user changeable UI, I think at a minimum we should move the string from the listbox or somehow make it more obvious that this isn't tweakable. Dunno how though, Allan?
Comment 7 Allan Day 2015-05-18 09:21:32 UTC
(In reply to Rui Matos from comment #6)
> If we're happy with the non user changeable UI, I think at a minimum we
> should move the string from the listbox or somehow make it more obvious that
> this isn't tweakable. Dunno how though, Allan?

I'd just remove that row from the listbox altogether.
Comment 8 Bastien Nocera 2015-05-18 10:09:00 UTC
(In reply to Allan Day from comment #7)
> (In reply to Rui Matos from comment #6)
> > If we're happy with the non user changeable UI, I think at a minimum we
> > should move the string from the listbox or somehow make it more obvious that
> > this isn't tweakable. Dunno how though, Allan?
> 
> I'd just remove that row from the listbox altogether.

Right. I'll do that for master, but this will have to stay for 3.14 and 3.16.
Comment 9 Bastien Nocera 2015-05-18 12:29:35 UTC
Comment on attachment 303430 [details] [review]
power: Fix "When battery power is critical" label with UPower 1.0

Committed to gnome-3-14 and gnome-3-16

Attachment 303430 [details] pushed as 7b12c68 - power: Fix "When battery power is critical" label with UPower 1.0
Comment 10 Bastien Nocera 2015-05-18 12:39:58 UTC
Created attachment 303521 [details] [review]
power: Remove "When battery power is critical" label

With UPower 1.0, the critical action to take when the battery level
is too low isn't in the hands of the user anymore, but in the hands
of the system.

It's now handled by UPower directly, through the CriticalPowerAction
configuration option. Instead of asking logind whether the system
supports hibernation, remove the action label altogether.
Comment 11 Bastien Nocera 2015-05-18 12:47:31 UTC
Created attachment 303524 [details] [review]
power: Remove "When battery power is critical" label

With UPower 1.0, the critical action to take when the battery level
is too low isn't in the hands of the user anymore, but in the hands
of the system.

It's now handled by UPower directly, through the CriticalPowerAction
configuration option. Instead of asking logind whether the system
supports hibernation, remove the action label altogether.
Comment 12 Bastien Nocera 2015-05-18 13:50:33 UTC
Comment on attachment 303426 [details] [review]
power: Remove critical-battery-action key

Removed in master (don't want a newer g-s-d making the old g-c-c crash)

Attachment 303426 [details] pushed as d80738c - power: Remove critical-battery-action key
Comment 13 Bastien Nocera 2015-05-18 15:43:21 UTC
Attachment 303524 [details] pushed as 008d7c1 - power: Remove "When battery power is critical" label
Comment 14 Bastien Nocera 2015-06-17 17:00:31 UTC
*** Bug 751121 has been marked as a duplicate of this bug. ***