Commit Graph

10 Commits

Author SHA1 Message Date
Philip Withnall 9b3dedd9ed malcontent-control: Centre the user controls
This causes the controls on the main window to be centred at their full
width (when there’s enough window width to do so), rather than expanding
to fill the entire window.

It’s not currently possible with GTK+3 to easily set a maximum width
(of, say, 600px) to the column, without writing a custom widget (like
`HdyColumn` does).

From a suggestion by Nick Richards
(https://www.nedrichards.com/2020/04/endless-3.8.0-beta-1-trip-report/).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-05-01 16:11:39 +01:00
Philip Withnall 99736b3f6c malcontent-control: Add a header bar and primary menu
This makes it easier to access the help and about dialogue, and brings
the application in line with the [GNOME
HIG](https://developer.gnome.org/hig/stable/header-bars.html.en).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-06 12:38:11 +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 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 2ab9924d8d malcontent-control: Hide administrator accounts
Children can’t be administrator accounts, otherwise applying parental
controls to them would be pointless and ineffective. So hide the
administrator accounts from the parental controls app.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 17:29:17 +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 36162c2c23 malcontent-control: Tweak default window height to match new controls
A fairly arbitrary decision which seems to match the new controls a bit
better, removing the large whitespace gap at the bottom of the window.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 17:29:17 +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