Ambient light sensors can be quite sensitive and the LightLevel
property might be changing very often. That has two undesired
consequences:
* The `als_enabled_state_changed` callback gets constantly called
due to a change in a property which it does not care about, as
only `HasAmbientLight` is relevant. Therefore, limit the code
execution to when something needs to be changed.
* During debugging, the terminal gets spammed with "ALS enabled: on/off"
messages.
AdwToasts replaces the GtkLabel inside revealer for notifications
and this simplifies handling the notifications and the toast-overlay
handles the complexities of when to show/withdraw them, the order
they are displayed, etc.
The sound plugin of gnome-settings-daemon which flushes the pulseaudio
sample cache does non-recursive monitoring of the sounds directory. If
the custom theme directory used for switching between bell sounds
already exists due to previous bell sound changes, subsequent changes
within that directory will not be noticed. The old bell sample will thus
remain in the cache until the next session restart. Avoid this problem
by manually updating the modification time of the directory.
The alternative solution of adding recursive monitoring to the sound
plugin would require significantly more complicated code as there is no
support for this in glib itself. Given that sound themes never really
caught on and there is an ongoing discussion of removing support for
them entirely, going with this simple solution seems like the better
choice.
Fixes: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/681
WirelessSecurityWPAEAP is a GtkWidget owned by the CEPage8021xSecurity
widget, which is supposed to "unparent" it on "dispose" (since parents
hold a reference to child widgets). Instead we were calling
g_clear_object on it.
Fixes#1671
Weak references are added when logical monitors are created, however we
don't remove them when destroying the display.
This means that if a monitor survives to the display finalization
(because may be referenced elsewhere) it will make g-c-c to crash
during its finalization, as that will trigger the weak reference
callback that will try to access to the already-finalized display.
getlogin() can fail for several reasons as detailed in the man page, and
the current behaviour is a segmentation fault when it fails with NULL,
such as due to an unset loginuid.
* Check return value for error and act accordingly.
* Change to getpwuid(getuid())->pw_name, which is less likely to error.
Instead of using a plain "flat" button positioned at the window corner,
let's use GtkWindowControls to wrap the close button and get the
default window control styling and alignment.
Fixes#1737