Commit Graph

14 Commits

Author SHA1 Message Date
Christopher Davis 73c1d7f3fe restrict-applications-selector: Hide placeholder when list isn't empty
Prevents a broken bottom border radius on the list.
2022-07-20 19:23:12 -03:00
Christopher Davis 9ed46ae597 restrict-applications-selector: Use HdyActionRow
Implements click-to-activate for rows in the dialog.
2022-07-20 19:23:12 -03:00
Philip Withnall af3a8b33db libmalcontent-ui: Drop handling of eos-link desktop files
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>
2021-03-11 13:50:53 +00:00
Will Thompson fc047e6e67 libmalcontent-ui: Sort apps on the visible name
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
2021-02-25 14:12:20 +00:00
Philip Withnall e7588a2333 libmalcontent-ui: Sync switches with app filter when loading selector
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>
2020-10-29 19:20:14 +00:00
Philip Withnall 93b88af0c1 libmalcontent-ui: Reload the app list when it changes on the system
This will no longer destroy in-progress user input.

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

Fixes: #18
2020-10-20 19:13:01 +01:00
Philip Withnall e1b5bcd324 libmalcontent-ui: Load the app list when constructing the apps selector
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
2020-10-20 19:13:01 +01:00
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)