Commit graph

18 commits

Author SHA1 Message Date
Matthijs Velsink
3a253bc4b1 general: Use g_clear_handle_id to remove GSources
Using `g_clear_handle_id()` in combination with `g_source_remove()` can
save a lot of boiler plate code.

This removes about 110 lines of code for free.
2024-02-06 09:22:07 +00:00
Felipe Borges
cd911dfa5d display: Use CcHostname to detect when running in a VM
Instead of a manual call to system-hostnamed to obtain the chassis-type
and compare whether it is equal to "vm".
2024-01-30 13:34:10 +00:00
Hari Rana
afc690cb74 night-light-page: Port to AdwSwitchRow 2024-01-08 09:57:13 +00:00
Lukáš Tyrychtr
ba79d849af displays: Use an AdwComboRow for the schedule type of the night light page
GtkComboBox is deprecated and not accessible, so this one is definitely better from this point of view.
2023-07-18 08:29:43 +00:00
Robert Ancell
f756184e3b display: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Emad Saadat
ce9c7c289a
display: Make nightlight widgets clamped to same size as other panels
by using an AdwPreferencesPage instead of a plain GtkBox. And also
move disabled infobar out of night_light_settings.
2023-04-06 00:38:32 -07:00
Jonas Ådahl
e561f32d9c display/night-light: Don't leak config manager proxy 2023-04-04 13:39:36 +00:00
Jonas Ådahl
80af5137c1 display/night-light: Disconnect config manager changed handler
Use g_signal_connect_object() to automatically disconnect the signal
handle when the listener object gets destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2333
2023-04-04 13:39:36 +00:00
Felipe Borges
5b3fff1961 display: Show Night Light Unavailable message when running on a VM
See #2020
2022-12-01 01:34:39 +00:00
Jonas Ådahl
fc984e90a1 display: Show infobar if night light isn't supported
This may be the case on e.g. fully remote / headless sessions, or as of
now, when using the NVIDIA driver to run a Wayland session.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1659
2022-05-17 12:32:48 +02:00
Yosef Or Boczko
5a7aa11b1e display: Force LTR to the spinbuttons's box 2022-02-28 09:47:53 +00:00
Georges Basile Stavracas Neto
8b05bc91d3 display: Remove labels from Night Light temperature scale
As per mockups.
2022-02-15 19:35:18 +00:00
Georges Basile Stavracas Neto
f598fb3ed6 display: Port to GTK4 2021-12-14 22:34:21 -03:00
Robert Ancell
c0cfbeccff display: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
Robert Ancell
73469d3ba2 display: Replace GtkStack child names with widget references
The child names are easier to break if widgets are changed - this can't be
detected by the compiler.
2020-03-30 01:45:57 +00:00
Benjamin Berg
ca684c2a7c display: Update night light scale to new blackbody calculation
g-s-d was changed to use a better black body temperature calculation.
This strongly affects the effect of the color temperature (the default
is changed from 4000K to 2700K). Update the scale to represent a similar
range to default even if the distribution on the scale is quite
different.
2019-07-30 10:47:36 +02:00
Georges Basile Stavracas Neto
28b0acb24e display: Rework Night Light page
The new Night Light page, as described by the latest mockups [1],
uses a listbox to display the options. Also, there is a small
revamp on how the disabled state is handled; it now is a switch
in a row, instead of an extra radio button.

This commit changes the Night Light page to have a listbox, and
uses libhandy's rows to achieve the desired interface.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/533
2019-06-16 01:01:36 +00:00
Georges Basile Stavracas Neto
b46aef0cb6 display: Make night light dialog a GtkBin
And create the dialog manually instead. The next commit
will move it to a different page in the panel itself,
so not much care was put into makin the dialog perfectly
matching.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/533
2019-06-16 01:01:36 +00:00
Renamed from panels/display/cc-night-light-dialog.c (Browse further)