Commit Graph

429 Commits

Author SHA1 Message Date
Philip Withnall 5054ba2bfb Merge branch '16-libraries-as-features' into 'master'
build: Add -Dui option to Meson

Closes #16

See merge request pwithnall/malcontent!38
2020-03-24 11:09:56 +00:00
Philip Withnall d8602bcd0b Merge branch 'refactor-bus' into 'master'
malcontent-control: Refactor bus initialisation

See merge request pwithnall/malcontent!49
2020-03-24 11:08:54 +00:00
Philip Withnall 435515d9da Merge branch 'parental-controls-enabled' into 'master'
app-filter: Add mct_app_filter_is_enabled() API

See merge request pwithnall/malcontent!47
2020-03-24 11:08:33 +00:00
Philip Withnall 04705c079a session-limits: Add mct_session_limits_is_enabled() API
This is a high-level API to indicate whether parental controls are
‘enabled’ for the given user. It’s a mirror of
`mct_app_filter_is_enabled()`, and exposes the existing
`time_limit_enabled_out` argument of
`mct_session_limits_check_time_remaining()` more conveniently.

Includes tests.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-24 11:06:16 +00:00
Philip Withnall f106319fdd app-filter: Add mct_app_filter_is_enabled() API
This is a high-level API to indicate whether parental controls are
‘enabled’ for the given user. Specifically, whether any of the
properties of the `MctAppFilter` differ from their default value.

Includes tests.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-24 11:06:16 +00:00
Philip Withnall faa0b9a3eb app-filter: Factor out a helper function
This introduces no functional changes, but will make an upcoming change
a little simpler.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-24 11:06:16 +00:00
Philip Withnall 9fbcef0fb8 libmalcontent: Add a clarifying comment about nullability
This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-24 11:06:16 +00:00
Philip Withnall f917f6e79a malcontent-control: Refactor bus initialisation
Get the system bus higher up in the application, so the same system bus
connection can be shared between different parts of the application if
needed in future.

This also means the synchronous I/O needed to connect to the bus is done
before the application UI is shown, which prevents it unnecessarily
blocking initialisation of the `MctUserControls` widget.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-23 14:43:22 +00:00
Philip Withnall 5f170ab5fe Merge branch 'piotrdrag/update-potfiles-200320' into 'master'
Update POTFILES.in 200320

See merge request pwithnall/malcontent!48
2020-03-20 17:24:49 +00:00
Piotr Drąg 8b880748ef Update POTFILES.in 2020-03-20 18:09:33 +01:00
Philip Withnall 743529a82f Merge branch 'data-serialisation' into 'master'
Support data serialisation and deserialisation

See merge request pwithnall/malcontent!45
2020-03-19 09:44:31 +00:00
Philip Withnall 6ba767029f session-limits: Add serialize and deserialize methods
See the previous commit; this is the same, but for session limits.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-19 09:42:25 +00:00
Philip Withnall cba851fc27 app-filter: Add serialize and deserialize methods
Add methods to serialise and deserialise the app filter, and use them to
replace the code in `MctManager` which was previously doing this. This
exposes the variant format for the app filter in the API (although the
format is described as ‘opaque’) so that user code can log it or store
it separately.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-18 10:40:27 +00:00
Philip Withnall a617365bba Merge branch 'papercuts' into 'master'
Fix papercuts when editing parental controls of current user

See merge request pwithnall/malcontent!46
2020-03-18 10:00:41 +00:00
Philip Withnall 4481cf1271 malcontent-control: Imply all app-filter polkit permissions
When unlocking malcontent-control while running as an unprivileged user
to edit *that* user’s parental controls, the `ChangeOwn` and `ReadOwn`
privileges should also be granted.

Otherwise a second polkit authorisation dialogue is popped up after
editing any of the parental controls, to get permission to save the
changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-17 17:31:53 +00:00
Philip Withnall cbc9b93348 malcontent-control: Tweak polkit label wording
When malcontent-control is run as an unprivileged user (i.e. a child)
the fact that the unlock wording refers to ‘other users’ is a little
confusing, since the purpose of running malcontent-control was likely to
edit the parental controls for *this* user.

Adjust the wording to make this a little clearer.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-17 17:30:49 +00:00
Philip Withnall 6125cc3a85 build: Add an option to build against libmalcontent from the system
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
2020-03-16 18:31:57 +00:00
Philip Withnall fda2fbd330 build: Add -Dui option to Meson
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
2020-03-16 18:31:57 +00:00
Philip Withnall bd173218e6 Merge branch 'glib-testing-system' into 'master'
Use libglib-testing submodule only as fallback

See merge request pwithnall/malcontent!40
2020-03-16 18:14:41 +00:00
Philip Withnall 8b95a655a8 Merge branch 'oars-button-direction' into 'master'
user-controls: Make OARS drop down open to the right

See merge request pwithnall/malcontent!43
2020-03-16 17:11:22 +00:00
Philip Withnall 8166044e6e Merge branch 'locale-change' into 'master'
Fix updating the UI when a user’s locale changes

See merge request pwithnall/malcontent!44
2020-03-16 12:19:01 +00:00
Philip Withnall bf0eaea612 user-controls: Update when the ActUser changes
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>
2020-03-16 12:11:45 +00:00
Philip Withnall 4698ad88a0 user-controls: Update OARS menu entries before choosing an updated one
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>
2020-03-16 12:10:11 +00:00
Matthew Leeds 87db73178f user-controls: Make OARS drop down open to the right
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.
2020-03-13 11:32:11 -07:00
Philip Withnall e9c2f3d054 Merge branch 'readme-licensing' into 'master'
docs: Update license information in README and meson.build

See merge request pwithnall/malcontent!42
2020-03-10 14:16:01 +00:00
Philip Withnall 12c320d43a docs: Update license information in README and meson.build
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>
2020-03-10 14:12:25 +00:00
Philip Withnall 1064221a9c Merge branch 'patch-1' into 'master'
Fix typo in malcontent-client.8

See merge request pwithnall/malcontent!41
2020-03-09 18:24:34 +00:00
Laurent Bigonville a05d3e8b8f Fix the NAME section of malcontent-client.8
This fix the debian lintian "manpage-has-bad-whatis-entry" warning
2020-03-07 11:21:08 +00:00
Laurent Bigonville ed794f58c9 Fix typo in malcontent-client.8 2020-03-07 09:53:01 +00:00
Jan Tojnar fc4efbef74
Use libglib-testing submodule only as fallback
Eventually, we will only use the one from system but until then both variants should work.
2020-03-06 20:41:21 +01:00
Philip Withnall 991d002a4e Merge branch 'piotrdrag/pl-translation-200306' into 'master'
Add Polish translation

See merge request pwithnall/malcontent!39
2020-03-06 17:00:30 +00:00
Piotr Drąg 90680f1552 Add Polish translation 2020-03-06 17:47:06 +01:00
Philip Withnall 8f82a7b05c Merge branch '16-dependencies' into 'master'
Drop a few unnecessary dependencies

See merge request pwithnall/malcontent!37
2020-03-02 16:28:35 +00:00
Philip Withnall b4c5ca22f2 malcontent-control: Drop unused flatpak dependency
Note that it’s still transitively required through libmalcontent-ui.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-02 15:58:25 +00:00
Philip Withnall 2cc56e1441 user-controls: Drop unused flatpak include
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-02 15:58:10 +00:00
Philip Withnall 18926be3ae Merge branch 'uk-update' into 'master'
Update Ukrainian translation

See merge request pwithnall/malcontent!35
2020-03-02 10:30:30 +00:00
Yuri Chornoivan f624fc277e Update Ukrainian translation 2020-03-02 10:30:30 +00:00
Philip Withnall 15e3e7a407 0.6.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 15:19:00 +00:00
Philip Withnall 240c5e1c69 Merge branch '11-more-ui-tweaks' into 'master'
More small UI tweaks

Closes #11

See merge request pwithnall/malcontent!34
2020-02-27 13:06:59 +00:00
Philip Withnall 82ecf17079 user-controls: Left-align the OARS drop-down text
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
2020-02-26 11:00:41 +00:00
Philip Withnall 3f3e86bcbb user-controls: More minor wording tweaks
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
2020-02-26 11:00:28 +00:00
Philip Withnall 1d46f55be4 restrict-applications-dialog: Remove the Save button
Add a close button instead, as the dialogue is instant-apply.

See https://developer.gnome.org/hig/stable/dialogs.html.en#instant-and-explicit-apply

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
2020-02-26 11:00:12 +00:00
Philip Withnall 8bde311b9c Merge branch '11-ui-improvements' into 'master'
Tweak user controls UI

Closes #11

See merge request pwithnall/malcontent!25
2020-02-26 09:17:21 +00:00
Philip Withnall 8c7815e33c restrict-applications-dialog: Allow introduction label to wrap
Rather than ellipsising, allow it to wrap. Also ensure it’s
left-aligned.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
2020-02-26 09:15:19 +00:00
Philip Withnall 7a7c26bcbf Merge branch 'parent-account' into 'master'
accounts-service: Add AccountInfo interface

See merge request pwithnall/malcontent!26
2020-02-25 13:14:08 +00:00
Philip Withnall 372d51a491 accounts-service: Add AccountInfo interface
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>
2020-02-25 13:10:35 +00:00
Philip Withnall 2d43ac38ec libmalcontent-ui: Restyle ‘restricts’ switches in yellow
This has fewer ‘error’ connotations than red. See
https://gitlab.freedesktop.org/pwithnall/malcontent/issues/11#note_419124.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
2020-02-25 12:49:29 +00:00
Philip Withnall 3db3a42e8d user-controls: Line wrap labels rather than ellipsising
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
2020-02-25 12:25:40 +00:00
Philip Withnall 008b75edd1 user-controls: Add a drop-down arrow next to the OARS age selector
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
2020-02-25 12:25:40 +00:00
Philip Withnall 7ad804835a user-controls: Rename OARS widget variables to be more descriptive
This doesn’t introduce any functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
2020-02-25 12:25:40 +00:00