The toggle switches remain focusable, but the rows should not be
focusable. Otherwise tabbing through the list involves two tabs per row.
The screen reader continues to work correctly with this MR applied: when
tabbing to a new switch, it reads out the label from the row, plus the
switch state.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #52
This was supposed to be a project-wide commit, but actually only
MctRestrictApplicationsDialog had APIs to be updated. MctUseImage
will undergo a major surgery soon, so it's left out.
This simply changes namespaces. Fortunately, no further widgetry
changes will be necessary - all the widgets and APIs seem to have
an exact match in libadwaita.
They are being dropped in Endless OS, and would have been filtered out
by the fact they’re not flatpaks anyway.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Previously, we sorted apps based on their display name, but
(confusingly) displayed their name. This leads to inconsistencies like
Rhythmbox being sorted (in French) as "Lecteur de musique Rhythmbox"
which places it between Krita and LibreOffice, but displayed as
"Rhythmbox".
Fixes#32
Since the changes to avoid reloading the app list entirely when loading
an app filter (commit 9d4639cf49), the switch states haven’t been set
properly when loading a new app filter, since the app rows already
exist, and the switch states were only set on creation.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Rather than waiting until an app filter is set on the application
selector, load the app list immediately at construction time. This is
now possible because it can be diffed easily when the app filter is set.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #28
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
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
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.
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>
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)