[gnome-text-editor] sourceview: force clear actions/menu on dispose
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] sourceview: force clear actions/menu on dispose
- Date: Fri, 24 Jun 2022 21:07:14 +0000 (UTC)
commit dbb943c453882296409e26965382000f61b39b5d
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 24 14:06:33 2022 -0700
sourceview: force clear actions/menu on dispose
To help avoid risks of these sticking around in the action muxer longer
than we want, clear them as part of dispose.
src/editor-source-view.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/editor-source-view.c b/src/editor-source-view.c
index ac37959..d7f6e40 100644
--- a/src/editor-source-view.c
+++ b/src/editor-source-view.c
@@ -742,6 +742,9 @@ editor_source_view_dispose (GObject *object)
{
EditorSourceView *self = (EditorSourceView *)object;
+ gtk_text_view_set_extra_menu (GTK_TEXT_VIEW (self), NULL);
+ gtk_widget_insert_action_group (GTK_WIDGET (self), "spelling", NULL);
+
g_clear_object (&self->css_provider);
g_clear_object (&self->spelling_menu);
g_clear_pointer (&self->spelling_word, g_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]