From 34fe60fe030f6ea17dd80280b93df82974110c1c Mon Sep 17 00:00:00 2001 From: velsinki <112010-velsinki@users.noreply.gitlab.gnome.org> Date: Wed, 15 Nov 2023 22:52:08 +0100 Subject: [PATCH] applications: Fix File & Link Associations UI When removing a File & Link Association from the dialog, or resetting them, the UI does not update. Fix this by rebuilding the handler dialog on both unset and reset. Fixes #389 Fixes #2172 --- panels/applications/cc-applications-panel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c index 5cbc5d208..42bf8091a 100644 --- a/panels/applications/cc-applications-panel.c +++ b/panels/applications/cc-applications-panel.c @@ -145,6 +145,8 @@ static void select_app (CcApplicationsPanel *self, const gchar *app_id, gboolean emit_activate); +static void update_handler_dialog (CcApplicationsPanel *self, GAppInfo *info); + G_DEFINE_TYPE (CcApplicationsPanel, cc_applications_panel, CC_TYPE_PANEL) enum @@ -978,6 +980,7 @@ unset_cb (CcApplicationsPanel *self, type = (const gchar *)g_object_get_data (G_OBJECT (button), "type"); g_app_info_remove_supports_type (self->current_app_info, type, NULL); + update_handler_dialog (self, self->current_app_info); } static void @@ -1097,6 +1100,7 @@ handler_reset_cb (CcApplicationsPanel *self) } g_signal_handler_unblock (self->monitor, self->monitor_id); g_signal_emit_by_name (self->monitor, "changed"); + update_handler_dialog(self, self->current_app_info); } static void