Commit graph

414 commits

Author SHA1 Message Date
Philip Withnall
ffbe93d91e Merge branch 'import-endless-translations' into 'master'
Import translations from Endless

See merge request pwithnall/malcontent!63
2020-04-16 09:31:08 +00:00
Philip Withnall
2c0eea4ce5 Merge branch 'no-more-subprojects' into 'master'
Remove use of libglib-testing subproject

See merge request pwithnall/malcontent!3
2020-04-15 14:31:45 +00:00
Philip Withnall
d85126da9d build: Stop building libglib-testing as a subproject
Just add it as a dependency instead. It’s a lot less painful (git
submodules are still a pain to use; and `git evtag` doesn’t work well
with them); and libglib-testing has just done a 0.1.0 release which we
can depend on.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-15 15:03:39 +01:00
Philip Withnall
d374ea676f ci: Switch from Fedora to Debian for CI
Debian Unstable now has libglib-testing packaged, which can be used to
avoid having to build it as a submodule. Otherwise, building on Debian
should be largely equivalent to building on Fedora.

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

Helps: !3
2020-04-15 15:02:33 +01:00
Will Thompson
39bdde59d6 Import translations from Endless
Much of this code previously lived in Endless's fork of
gnome-control-center, and so many strings had previously been translated
there. I imported a bunch of them from
https://github.com/endlessm/gnome-control-center/tree/eos3.7 as follows:

    cp ~/src/endlessm/gnome-control-center/po/LINGUAS po
    ninja -C _build/ meson-malcontent-update-po
    for x in po/*.po; do
        t3k copy ~/src/endlessm/gnome-control-center/$x $x
    done
    ninja -C _build/ meson-malcontent-update-po

Then manually reviewed the output from t3k to exclude languages where
only trivial translations such as "Help" were copied.

Many of these translations are for OARS rating descriptions, which are
actually originally from gnome-software, and were imported into our
gnome-control-center in a similar way. I have long been sad that these
strings were not present in some common shared library; hooray! now they
are.

[t3k]: https://gitlab.gnome.org/wjt/translate-o-tron-3000/
2020-04-15 13:57:55 +01:00
Philip Withnall
7813a3c40f Merge branch 'piotrdrag/malcontent-piotrdrag/pl-update-200412' 2020-04-14 14:37:07 +01:00
Piotr Drąg
6bc4383cce Add Polish help translation 2020-04-14 14:36:28 +01:00
Piotr Drąg
f731994dc3 Update Polish translation 2020-04-14 14:35:50 +01:00
Philip Withnall
0a86c5ba93 Merge branch 'master' into 'master'
Added Indonesian help translation

See merge request pwithnall/malcontent!62
2020-04-14 13:31:12 +00:00
Andika Triwidada
19e9be56e3 Added Indonesian help translation 2020-04-14 13:31:12 +00:00
Philip Withnall
980f035ea9 Merge branch 'builder-problems' into 'master'
user-controls: Add a fallback bus connection

See merge request pwithnall/malcontent!60
2020-04-07 13:27:23 +00:00
Philip Withnall
28992ac7f3 user-controls: Add a fallback bus connection
This is a hack to allow `MctUserControls` to be used from `GtkBuilder`
templates, where it’s not possible to pass construct-only properties in
to the `MctUserControls` constructor. It’s not feasible to make
`MctUserControls:dbus-connection` not construct-only, because it gets
used to construct an `MctManager` which then subscribes to various
signals.

So for the cases where `MctUserControls` is used from a builder
template, the code has to connect to the system bus manually, which is
possibly (though unlikely) a blocking operation.

This fixes a critical warning when enabling parental controls in
gnome-initial-setup.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-07 12:52:15 +01:00
Philip Withnall
6f09483b4c libmalcontent: Clarify nullability of MctManager:connection
It’s not.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-07 12:52:15 +01:00
Philip Withnall
b79e6c3589 Merge branch 'piotrdrag/pl-update-200405' into 'master'
Update Polish translation 200405

See merge request pwithnall/malcontent!56
2020-04-07 11:51:51 +00:00
Philip Withnall
784d8f495e Merge branch 'update_uk' into 'master'
Update Ukrainian translation + docs translation

See merge request pwithnall/malcontent!57
2020-04-07 11:51:42 +00:00
Yuri Chornoivan
4c6d77ff6d Update Ukrainian translation + docs translation 2020-04-07 09:06:54 +03:00
Philip Withnall
78d553bafd Merge branch 'meson-warnings' into 'master'
meson: bump minimum version to 0.50.0

See merge request pwithnall/malcontent!59
2020-04-06 13:46:25 +00:00
Philip Withnall
fb176f8039 Merge branch 'header-bar' into 'master'
malcontent-control: Add a header bar and primary menu

See merge request pwithnall/malcontent!58
2020-04-06 13:33:41 +00:00
Will Thompson
c7041f362a meson: bump minimum version to 0.50.0
WARNING: Project specifies a minimum meson_version '>= 0.49.0' but
    uses features which were added in newer versions:
     * 0.50.0: {'install arg in configure_file'}
2020-04-06 14:32:22 +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
Jan Tojnar
0d60138e0a
build: Only update post-install caches when they exist
When building without UI, there are no icon or desktop files so there is no need to run the commands to refresh the caches.

It would be even nicer to move the postinstall script to the malcontent-control subdirectory but it really applies to the installation output of the whole project, not just the malcontent-control part.
2020-04-05 10:52:05 +02:00
Jan Tojnar
697fd56f38
build: Remove schema generation
We do not have any GSettings schemas.
2020-04-05 10:52:05 +02:00
Piotr Drąg
367a83eaff Update Polish translation 2020-04-05 10:48:26 +02:00
Philip Withnall
8a764cc0cd Merge branch 'introspection-error-fix' into 'master'
libmalcontent: Add enum types to fix introspection of MctManagerError

See merge request pwithnall/malcontent!55
2020-04-03 23:39:20 +00:00
Philip Withnall
aaca135199 libmalcontent: Add enum types to fix introspection of MctManagerError
Without a GType for the error enum, g-ir-scanner fails to properly
associate it with the error quark function, and (for example) error code
matching in JS doesn’t work.

This adds the enum types in a new public header file.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-04 00:37:26 +01:00
Philip Withnall
2d7e38aa74 Merge branch 'help' into 'master'
Add user manual/documentation

See merge request pwithnall/malcontent!51
2020-04-03 14:28:39 +00: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
b683ef7e37 help: Add a basic user manual for malcontent-control
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-03 15:08:47 +01:00
Philip Withnall
2591a20beb Merge branch 'uk_update' into 'master'
Update Ukrainian translation

See merge request pwithnall/malcontent!54
2020-04-02 09:00:23 +00:00
Yuri Chornoivan
f8df997db7 Update Ukrainian translation 2020-04-02 09:21:04 +03:00
Philip Withnall
9997311537 Merge branch 'master' into 'master'
Added Indonesian translation

See merge request pwithnall/malcontent!53
2020-03-31 13:00:45 +00:00
Andika Triwidada
9f001159db Added Indonesian translation 2020-03-31 13:00:45 +00:00
Philip Withnall
942007f275 Merge branch 'piotrdrag/pl-update-200329' into 'master'
Update Polish translation 200329

See merge request pwithnall/malcontent!52
2020-03-30 22:19:13 +00:00
Piotr Drąg
0e4b953606 Update Polish translation 2020-03-29 12:41:16 +02:00
Philip Withnall
2e8a07d58c 0.7.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-24 11:23:01 +00:00
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