cc-common-resources.h is used by both libwidgets and liblanguage, and
so must be generated before they build. However, Meson wasn't aware
of this dependency which resulted in a race condition during build.
Conveniently, "generates_sources_dep" already contains other generated
sources used by these two libraries, so adding cc-common-resources.h
to this list is enough to declare the dependency.
AdwActionRow handles many of the properties we use
CcListRow for. We can re-use it instead of re-creating it.
CcListRow is now an AdwActionRow with three suffixes.
The `activatable-widget` is set when the switch is visible.
Since our `icon-name` property was only used for the arrow
icon, it has been replaced with a `show-arrow` property.
The `bold` property has been removed - it was only used in
one place, and it's not a pattern used in other apps.
I decided to go this route because replacing all the
instances of CcListRow with AdwActionRow directly would
end up being more code.
The add_device() check for g_udev_device_get_parent() was leaking (see
below). As this is actually used in create_device(), I'm passing it as
argument to avoid a second call to that function.
> 34,175 (1,080 direct, 33,095 indirect) bytes in 27 blocks are definitely lost in loss record 19,729 of 19,758
> at 0x4A7A337: g_type_create_instance (gtype.c:1907)
> by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
> by 0x4A62C7C: g_object_new_with_properties (gobject.c:2114)
> by 0x4A63780: g_object_new (gobject.c:1785)
> by 0x5EA5A6A: _g_udev_device_new (gudevdevice.c:132)
> by 0x4B6D24: add_device (gsd-device-manager.c:447)
> by 0x4B6FBF: gsd_device_manager_init (gsd-device-manager.c:517)
> by 0x4A7A288: g_type_create_instance (gtype.c:1929)
> by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
> by 0x4A62C7C: g_object_new_with_properties (gobject.c:2114)
> by 0x4A63780: g_object_new (gobject.c:1785)
> by 0x4B7075: gsd_device_manager_get (gsd-device-manager.c:533)
Generated sources need to be generated before files that
use them can be built.
Add a separate dependency on them, and make the various
libraries under panels/common/ depend on these sources.
This is only the bare minimum to make everything under panels/common
build. Since these widgets are used by the main window, port them
first.
CcTimeEntry was particularly hard to port. That's because GtkEntry
is a final class now. Overall, though, I'm happy with how it turned
out to be - much cleaner, less code, more obvious.
As described in #1346, GLib 2.64 includes a g_get_os_info() function,
providing access to keys from /etc/os-release. This commit replaces calls to
gnome-control-center's custom parser (in panels/common/cc-os-release.c)
with calls to this new function, and deletes the custom parser code.
Closes#1346
The C code tries to fetch and use 'check_image', but the UI definition
calls it 'check', which throws a few warnings. Renaming it in the UI file
is easier than in the C file, so I went with the former.
Print e.g. "2 minutes" instead of "2 minutes 0 seconds". Also, update
the path in Totem from which this was copied. The MR to make the same
change in Totem is here:
https://gitlab.gnome.org/GNOME/totem/merge_requests/134
The "CcPermissionInfobar" widget is a more descriptive way to
communicate that some Settings panel needs authentication in order
to perform certain actions.
This widget doesn't handle the permissions (as in GPermission)
itself. It needs to be binded to an existing instance of GPermission,
and it will react to the permission's state (show when the current
user is not authorized, and hide when the user is authorized).
This is part of a big set of changes that aim to set a consistent
authentication method accross Settings panels.
See #685, #556, and #771
Increase height so that "view-more-symbolic" icon appears
by default when the language-dialog is displayed. This
improves UI-feedback for the user for browsing additional
language entries.
Drop the subtypes, and keep a single udev-based GsdDeviceManager,
which will work on both backends, and should work on all platforms
we care about (?).
Those files are no longer existent in gnome-settings-daemon, so
this module is free to do as it pleases with them, there doesn't
need to exist any synchronization anymore.
A report in Red Hat bugzilla [1] shows for some reason the country is set to
NULL and this causes a crash when comparing against search terms. The solution
is to handle the NULL without crashing.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1685251
libgudev allocs a new GUdevDevice object for each event, so the pointer value
for the 'add' udev event differs from the one for the 'remove' event. If we
use the pointer value as hash table key, we'll never remove the device.
Switch to use the syspath of the device instead, that one is unique per
device.
Fixes#309