Rather than building it again; this is the second half of resolving the
dependency cycle from the previous commit.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #16
This allows the UI components (libmalcontent-ui and malcontent-control)
to be disabled in the build so that a dependency cycle with flatpak can
be avoided (by building malcontent twice, once with `-Dui=disabled` and
then again with `-Dui=enabled`).
The dependency graph is:
malcontent-control → libmalcontent-ui → flatpak → libmalcontent
which becomes cyclic if libmalcontent-ui and libmalcontent can only be
built at the same time.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #16
When the user object changes one of its properties (for example, the
user’s locale might change if the administrator is editing a user in
g-c-c while viewing their parental controls in malcontent-control),
update the UI.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
If the user’s locale changes, we need to update the set of entries in
the OARS menu before selecting a new one and updating the label.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
On laptops which have a 1366 by 768 display, in gnome-initial-setup the
OARS dropdown is cut off by the edge of the screen. Only the first
couple entries are visible. So make it open to the right instead, where
more room is available.
Some of the files in `malcontent-control` are GPL-2.0+.
Use the latest SPDX identifiers in the machine-readable data in
meson.build, but use the deprecated ‘+’ form in the README since it’s a
little more human friendly.
See https://spdx.org/licenses/.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Make it look more and more like a combo box. This widget really should
have been a combo box to begin with. We’re eventually going to end up
re-implementing a combo box from first principles at this rate.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Helps: #11
This will store information about the user which is related to parental
controls. Currently, that’s just a boolean indicating that the user is a
parent, and hence that their account should be presented differently in
UIs.
See: https://gitlab.gnome.org/GNOME/gnome-initial-setup/issues/94
Signed-off-by: Philip Withnall <withnall@endlessm.com>
The labels are too long to fit on a single line, given the default width
of the user controls widget, so allow them to wrap onto multiple lines
rather than unhelpfully ellipsising.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Helps: #11
To make it more obvious that it triggers a drop-down menu. Potentially,
this should be a `GtkComboBox` rather than reinventing the wheel using a
`GtkMenuButton` — but that’s a change for another day.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Helps: #11
Otherwise an application won’t be able to override the CSS installed by
libmalcontent-ui if this is ever moved into libmalcontent-ui.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This will be used in upcoming commits to mark switches as restricting
something when they’re active, rather than allowing something. Their
background will be red, rather than blue.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Helps: #11