malcontent-control: Fix losing user changes when apps are installed

If the user has the restrict applications dialogue open and has made
some changes, then installs/uninstalls a flatpak (for example) from
gnome-software in another window, then the list of apps in the restrict
applications dialogue will be reloaded and the user’s changes will be
lost.

Prevent that by not reloading when the set of installed apps changes.
This is not a long-term solution: ideally we’d diff the changes against
the list of apps in the restrict applications dialogue and only update
what’s changed.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-02-03 17:49:21 +00:00
parent 591f63890b
commit 4054913dc2
1 changed files with 5 additions and 0 deletions

View File

@ -478,9 +478,14 @@ static void
app_info_changed_cb (GAppInfoMonitor *monitor,
gpointer user_data)
{
/* FIXME: We should update the list of apps here, but we cant call
* reload_apps() because that will dump and reload the entire list, losing
* any changes the user has already made to the set of switches. We need
* something more fine-grained.
MctRestrictApplicationsSelector *self = MCT_RESTRICT_APPLICATIONS_SELECTOR (user_data);
reload_apps (self);
*/
}
/* Will return %NULL if @flatpak_id is not installed. */