From d879a18a09e9cbdd43050365e08afd9f9bee72bd Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Fri, 23 Oct 2020 22:05:37 +0200 Subject: mate-power-preferences: add option to enable keyboard dimming --- data/gpm-prefs.ui | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/gpm-prefs-core.c | 3 +++ 2 files changed, 59 insertions(+) diff --git a/data/gpm-prefs.ui b/data/gpm-prefs.ui index 81638ff..996fc60 100644 --- a/data/gpm-prefs.ui +++ b/data/gpm-prefs.ui @@ -639,6 +639,62 @@ 1 + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 6 + 6 + vertical + 6 + + + _Reduce keyboard backlight + True + True + False + start + True + True + + + False + False + 1 + + + + + + + + + True + False + Keyboard + + + + + + + + False + True + 2 + + 1 diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c index b43dd12..4375a6a 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -480,6 +480,9 @@ prefs_setup_battery (GpmPrefs *prefs) g_settings_bind (prefs->priv->settings, GPM_SETTINGS_IDLE_DIM_BATT, GET_WIDGET ("checkbutton_battery_display_dim"), "active", G_SETTINGS_BIND_DEFAULT); + g_settings_bind (prefs->priv->settings, GPM_SETTINGS_KBD_BACKLIGHT_BATT_REDUCE, + GET_WIDGET ("checkbutton_battery_keyboard_reduce"), "active", + G_SETTINGS_BIND_DEFAULT); if (prefs->priv->has_button_lid == FALSE) gtk_widget_hide (GET_WIDGET ("box_battery_lid")); -- cgit v1.2.1