Commit Graph

13 Commits

Author SHA1 Message Date
Philip Withnall 2010898947 malcontent-control: Add link to guidance on how to set parental controls
Try and nudge parents/carers towards the best practice for how to set
parental controls on a user, by linking them to appropriate external
content from people who know what they’re talking about.

This external content can vary in the translations so that parents are
pointed to appropriate localised guidelines. In the UK, for example,
this may be
https://www.nspcc.org.uk/keeping-children-safe/online-safety/.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-04 11:58:06 +00:00
Philip Withnall db54baf9d6 malcontent-control: Add a --user command line argument
This is handled on the primary instance, and causes the tab to be
switched to show the given username (if possible).

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #19
2020-10-19 17:55:47 +01:00
Will Thompson a626236f59 Add translator comments for about dialog strings
When ordering commercial translations, at least one translator
translated these literally, eg "Sitio web de mal gusto" and
"créditos-de-traductor".

It's likely that translators familiar with GNOME would not make this
mistake, but let's be explicit anyway.
2020-04-20 13:47:22 +01:00
Philip Withnall e03bb128b8 malcontent-control: Add an action to launch the help
Also add actions for `app.about` and `app.quit`, for completeness.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-03 15:08:47 +01: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 1f3f0a4560 libmalcontent-ui: Move widgets over from malcontent-control
They need to be re-used in gnome-initial-setup. The other widgets which
remain in malcontent-control don’t need to be used in g-i-s so can stay
where they are for now. They might move across to libmalcontent-ui later
if there’s a need for it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-04 11:36:58 +00:00
Philip Withnall a05ac751a1 malcontent-control: Add a main stack page for when there are no users
Point the admin towards gnome-control-center so they can add child user
accounts.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 17:29:17 +00:00
Philip Withnall 8badee7fa9 malcontent-control: Add polkit policy support
Add an unlock screen to the application, which is shown on startup if
the current user doesn’t have permission to view the parental controls
of other users. It requests permission using a new polkit action which
implies the various accounts-service actions we need.

This adds a dependency on `polkit-gobject-1`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 17:29:17 +00:00
Philip Withnall bffab0942f malcontent-control: Move the app restrictions into a separate dialogue
Rather than having a scrollable listbox within a scrollable list of
widgets, move the listbox out to a separate dialogue.

This involves separating out all the code to query the apps, to get and
to set the app filter, from `MctUserControls` out into the new
`MctRestrictApplicationsSelector`. Most of it is unchanged, aside from
its interaction with the filter: the filter is now provided to the
widget by the calling code, rather than being queried by the widget
itself. The widget’s status can be queried into an
`MctAppFilterBuilder`, rather than being used to set the app filter
directly.

This commit redesigns the appearance of the relevant widgets in the main
window so that they follow the new list-box-like visual design. A
following commit will apply similar changes to the other widgest in the
main screen.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 17:29:17 +00:00
Philip Withnall 0e22ad7861 malcontent-control: Use g_signal_connect_object() when we don’t hold ref
The application doesn’t hold a ref to some of the widgets it holds a
pointer to, since their ownership is controlled by the main window. The
main window’s lifecycle is controlled by the application, but its
dispose cycle runs at a slightly different time.

Hence, we should disconnect from the widget signals when we can, but
without holding a strong ref.
2020-02-03 17:19:59 +00:00
Philip Withnall c7f975bb2b malcontent-control: Add initial draft of main interface
This replicates the old interface from Endless’ gnome-control-center,
with no attempt to improve or rework it. That will come later.

It might not work fully.

It allows a user to be selected, and their parental controls to be
changed. It currently doesn’t filter the users.

It supports a simple ‘Loading’ screen, before displaying the main
interface. If loading fails (due to a D-Bus error with accountsservice),
an error page is displayed instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-30 09:31:40 +00:00
Philip Withnall b0f72c432f malcontent-control: Add initial main window
It’s currently empty, but it’s a start.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-29 15:27:33 +00:00
Philip Withnall 1d8f7d665c malcontent-control: Add initial skeleton application
This does nothing at the moment (not even showing a main window), but it
soon will do.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-29 15:07:15 +00:00