[gnome-software: 3/5] gs-shell: Properly destroy modal dialogs
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 3/5] gs-shell: Properly destroy modal dialogs
- Date: Wed, 6 Oct 2021 10:36:43 +0000 (UTC)
commit f15854271cc12359b3de76ca7c7f21f2f93c6ba5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Oct 5 18:53:42 2021 -0300
gs-shell: Properly destroy modal dialogs
Setting a free func to the GPtrArray holding these dialogs didn't
work well because we would end up calling gtk_window_destroy() on
dialogs during their destruction.
Don't set the free function on the GPtrArray; instead, manually
destroy these dialogs in the only code path where that would
need to happen.
src/gs-shell.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index e7be3f011..9e2cde8c8 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -573,6 +573,7 @@ stack_notify_visible_child_cb (GObject *object,
g_signal_handlers_disconnect_by_func (dialog,
modal_dialog_unmapped_cb,
shell);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
g_ptr_array_set_size (shell->modal_dialogs, 0);
}
@@ -2614,7 +2615,7 @@ gs_shell_init (GsShell *shell)
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (shell->search_bar), GTK_EDITABLE (shell->entry_search));
shell->back_entry_stack = g_queue_new ();
- shell->modal_dialogs = g_ptr_array_new_with_free_func ((GDestroyNotify) gtk_window_destroy);
+ shell->modal_dialogs = g_ptr_array_new ();
}
GsShell *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]