[gtk/carlosgc/emoji-chooser-fixes: 1/2] textview: Unparent the emoji chooser on dispose
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/carlosgc/emoji-chooser-fixes: 1/2] textview: Unparent the emoji chooser on dispose
- Date: Tue, 2 Jun 2020 14:49:06 +0000 (UTC)
commit d2e0ada794417e90e6ea611b98ceb5b39df87632
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue Jun 2 16:32:13 2020 +0200
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.
gtk/gtktextview.c | 7 +++++++
1 file changed, 7 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]