diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2020-06-02 16:32:13 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2020-06-02 16:47:56 +0200 |
commit | d2e0ada794417e90e6ea611b98ceb5b39df87632 (patch) | |
tree | a048502fbad5b884a00bc0f1685e75610fa1782a /gtk/gtktextview.c | |
parent | c07ae5806ee14511a45998ee291777a63b24f262 (diff) | |
download | gtk+-d2e0ada794417e90e6ea611b98ceb5b39df87632.tar.gz |
textview: Unparent the emoji chooser on dispose
This was causing the warning "GtkEmojiChooser is not a child of
GtkTextView" when destroying a GtkTextView if the emoji chooser was
shown.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index d69e1b1546..d186b4941b 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -3766,6 +3766,13 @@ gtk_text_view_dispose (GObject *object) GtkTextViewPrivate *priv = text_view->priv; GtkWidget *child; + child = g_object_get_data (object, "gtk-emoji-chooser"); + if (child) + { + gtk_widget_unparent (child); + g_object_set_data (object, "gtk-emoji-chooser", NULL); + } + while ((child = gtk_widget_get_first_child (GTK_WIDGET (text_view)))) gtk_text_view_remove (text_view, child); |