two-step: Rename UseBGRT to UseFirmwareBackground

Rename the UseBGRT theme configfile option to UseFirmwareBackground,
to make it clear what this does using language which most users will be
able to understand, rather then using the cryptic BGRT ACPI table reference.

While at it also switch to using the new ply_key_file_get_bool function, so
that users can edit an existing configfile with "UseFirmwareBackground=true"
in there and change it to "=false" and actually have that work as expected.

The switch to ply_key_file_get_bool also fixes a memleak as
ply_key_file_get_value returns a strdup-ed value which we were not free-ing.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2018-12-20 12:47:39 +01:00
parent e111ba8baf
commit 6cf1bb3e37
2 changed files with 2 additions and 3 deletions

View file

@ -813,8 +813,7 @@ create_plugin (ply_key_file_t *key_file)
free (color);
/* Boolean option, true if the key is present */
if (ply_key_file_get_value (key_file, "two-step", "UseBGRT"))
if (ply_key_file_get_bool (key_file, "two-step", "UseFirmwareBackground"))
plugin->background_bgrt_image = ply_image_new ("/sys/firmware/acpi/bgrt/image");
progress_function = ply_key_file_get_value (key_file, "two-step", "ProgressFunction");

View file

@ -13,4 +13,4 @@ Transition=none
TransitionDuration=0.0
BackgroundStartColor=0x202020
BackgroundEndColor=0x202020
UseBGRT=true
UseFirmwareBackground=true