[gtk/wip/baedert/for-master: 85/97] emojichooser: Avoid using gtk_widget_destroy()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 85/97] emojichooser: Avoid using gtk_widget_destroy()
- Date: Fri, 21 Feb 2020 12:22:32 +0000 (UTC)
commit 0778d54fa2d814528150f865bebf0becbf9dfec0
Author: Timm Bäder <mail baedert org>
Date: Thu Feb 20 19:21:59 2020 +0100
emojichooser: Avoid using gtk_widget_destroy()
gtk/gtkemojichooser.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index 641cd33438..5764c5fd79 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -210,13 +210,13 @@ add_recent_item (GtkEmojiChooser *chooser,
if (modifier == modifier2 && g_variant_equal (item, item2))
{
- gtk_widget_destroy (GTK_WIDGET (l->data));
+ gtk_container_remove (GTK_CONTAINER (chooser->recent.box), l->data);
i--;
continue;
}
if (i >= MAX_RECENT)
{
- gtk_widget_destroy (GTK_WIDGET (l->data));
+ gtk_container_remove (GTK_CONTAINER (chooser->recent.box), l->data);
continue;
}
@@ -413,7 +413,8 @@ add_emoji (GtkWidget *box,
if (pango_layout_get_unknown_glyphs_count (layout) > 0 ||
rect.width >= 1.5 * chooser->emoji_max_width)
{
- gtk_widget_destroy (label);
+ g_object_ref_sink (label);
+ g_object_unref (label);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]