! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Confusing magic integer value "9" for timeout "never".
Status:
RESOLVED: WONTFIX
Product:
Xfce4-power-manager
Component:
General

Comments

Description Bernd 2019-07-29 21:50:47 CEST
Versions affected:
xfce4-power-manager-settings: Unknown option --version.
Ubuntu 16.04.6 LTS xenial, Xfce 4.12, Xfce Power Manager 1.4.4

Observation:
Confusing values in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml:
<property name="brightness-on-battery" type="uint" value="9"/>
<property name="brightness-switch" type="int" value="9"/>

Expectation: Something like "0", "off", "false", "NULL", "never"

How to reproduce:
Launch xfce4-power-manager-settings on a notebook.
Select Display tab.
Drag both timeout sliders (bottom) to the right (120 sec).
Close.
Watch the XML file until it shows "120" as the values.
Launch again, drag sliders to the left.
This should show "never" and save values of "9".

It kinda makes sense if you compare this:
Launch again, set them to the minimum value that's not "never".
This should show and save values of "10".

Still, using an arbitraty positive number for "never" is really error-prone
in case the minimum value is ever changed in the future, and confusing to
people who don't know the minimum value.

I suggest we save "0" if the slider is anywhere below minimum.
Comment 1 Bernd 2019-07-29 21:53:01 CEST
I'm sorry, I copied the wrong line. Of course the other value is "brightness-on-ac", not "brightness-switch".
Comment 2 Simon Steinbeiss editbugs 2020-05-27 01:21:32 CEST
Right, but the average user is not expected to look at the integer value of this range.

This was simply a technical decision because it's very easy and straightforward to cap the range element at 9 and handle the lowest value as "off".

So I think I don't want to add the code just for the sanity of those who look at the xml (or xfce4-settings-editor UI).

Bug #15761

Reported by:
Bernd
Reported on: 2019-07-29
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
3 users

Version

Attachments

Additional information