From 6cf1bb3e37df6b69d3b0e17eee394ad8c6e57e75 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 20 Dec 2018 12:47:39 +0100 Subject: [PATCH] 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 --- src/plugins/splash/two-step/plugin.c | 3 +-- themes/bgrt/bgrt.plymouth.in | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c index c1e75a8e..8f1ad584 100644 --- a/src/plugins/splash/two-step/plugin.c +++ b/src/plugins/splash/two-step/plugin.c @@ -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"); diff --git a/themes/bgrt/bgrt.plymouth.in b/themes/bgrt/bgrt.plymouth.in index b5cc8432..dc5eaf5c 100644 --- a/themes/bgrt/bgrt.plymouth.in +++ b/themes/bgrt/bgrt.plymouth.in @@ -13,4 +13,4 @@ Transition=none TransitionDuration=0.0 BackgroundStartColor=0x202020 BackgroundEndColor=0x202020 -UseBGRT=true +UseFirmwareBackground=true