Commit Graph

7 Commits

Author SHA1 Message Date
Philip Withnall 9d4639cf49 libmalcontent-ui: Cache and diff the app list when rebuilding it
Instead of removing all the entries in the list store when the set of
installed apps is updated, diff the old and new lists so that removed
apps can be selectively removed from the list store, and added apps can
be selectively added.

This means that we can (in subsequent commits) reload the app list less
conservatively, as doing so will no longer remove in-progress user
modifications to the set of blocked apps. Modifications are still only
saved when the restrict applications dialogue is closed.

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

Helps: #18, #28
2020-10-20 19:13:01 +01:00
Philip Withnall 1d5da7c094 libmalcontent-ui: Adjust the app list sort to be more stable
This doesn’t achieve anything by itself, but makes some upcoming commits
to diff the new/old app lists work properly.

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

Helps: #18, #28
2020-10-15 16:40:10 +01:00
Philip Withnall d01f063c39 libmalcontent-ui: Add g_autolist() to simplify memory management
This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-10-15 15:09:11 +01:00
Matthew Leeds 15e8a74b21 tree-wide: Replace usages of whitelist/blacklist
Replace usages of the terms whitelist and blacklist with the more
inclusive and more precise terms allowlist and blocklist, which are
actually also more consistent with parts of the codebase, e.g.
mct_app_filter_is_content_type_allowed().

The only API break here is in libmalcontent/app-filter.h but the
relevant API is not used anywhere else in Endless OS beyond this repo,
nor to my knowledge in any other distribution. Also, per the README,
this project's API is not stable, so now is a good time to make this
change.
2020-06-09 15:35:21 -07:00
Philip Withnall 3556813c55 libmalcontent-ui: Use library i18n functions
Rather than application i18n functions and `#include`s. This ensures
that the correct translation domain is used.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-27 11:55:10 +01:00
Philip Withnall dee4d92ea9 restrict-applications-dialog: Invert controls to be restrictive
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
2020-02-25 12:25:40 +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
Renamed from malcontent-control/restrict-applications-selector.c (Browse further)