From 54885fcddf7f229bbec0e174508dd20f6e1a8654 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 7ee19a7..135768a 100644 --- a/data/gpm-prefs.ui +++ b/data/gpm-prefs.ui @@ -552,6 +552,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 e51e367..018a75d 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -556,6 +556,9 @@ prefs_setup_battery (GpmPrefs *prefs) g_settings_bind (prefs->priv->settings, GPM_SETTINGS_IDLE_DIM_BATT, widget, "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) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_battery_lid")); -- cgit v1.2.1