[gnome-control-center] night-light: Turn on Night Light for 5 seconds when adjusting Color Temp
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] night-light: Turn on Night Light for 5 seconds when adjusting Color Temp
- Date: Mon, 7 Jan 2019 14:18:11 +0000 (UTC)
commit 0858fd5d36f2a0c595fc331be9e9b69464f6884a
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Wed Dec 19 08:13:40 2018 -0500
night-light: Turn on Night Light for 5 seconds when adjusting Color Temp
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/147
panels/display/cc-night-light-dialog.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/panels/display/cc-night-light-dialog.c b/panels/display/cc-night-light-dialog.c
index 462c69198..8ab9d4ca0 100644
--- a/panels/display/cc-night-light-dialog.c
+++ b/panels/display/cc-night-light-dialog.c
@@ -66,6 +66,7 @@ G_DEFINE_TYPE (CcNightLightDialog, cc_night_light_dialog, GTK_TYPE_DIALOG);
#define CLOCK_SCHEMA "org.gnome.desktop.interface"
#define DISPLAY_SCHEMA "org.gnome.settings-daemon.plugins.color"
#define CLOCK_FORMAT_KEY "clock-format"
+#define NIGHT_LIGHT_PREVIEW_TIMEOUT_SECONDS 5
static void
dialog_adjustments_set_frac_hours (CcNightLightDialog *self,
@@ -381,6 +382,16 @@ dialog_color_temperature_value_changed_cb (GtkAdjustment *adjustment,
g_debug ("new value = %.0f", value);
+ if (self->proxy_color != NULL)
+ g_dbus_proxy_call (self->proxy_color,
+ "NightLightPreview",
+ g_variant_new ("(u)", NIGHT_LIGHT_PREVIEW_TIMEOUT_SECONDS),
+ G_DBUS_CALL_FLAGS_NONE,
+ 5000,
+ NULL,
+ NULL,
+ NULL);
+
g_settings_set_uint (self->settings_display, "night-light-temperature", (guint) value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]