[gnome-builder] search: be more careful when destroying rows
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] search: be more careful when destroying rows
- Date: Fri, 26 Aug 2016 19:39:02 +0000 (UTC)
commit 681eaf6fc12a0a1d60a13ce08191f52990d98377
Author: Christian Hergert <chergert redhat com>
Date: Fri Aug 26 12:37:45 2016 -0700
search: be more careful when destroying rows
Ensure we actually destroy the row and clear the qdata for our backpointer
to the widget.
libide/search/ide-omni-search-group.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libide/search/ide-omni-search-group.c b/libide/search/ide-omni-search-group.c
index 659e35d..91590af 100644
--- a/libide/search/ide-omni-search-group.c
+++ b/libide/search/ide-omni-search-group.c
@@ -135,8 +135,11 @@ ide_omni_search_group_remove_result (IdeOmniSearchGroup *self,
row = g_object_get_qdata (G_OBJECT (result), quarkRow);
- if (row)
- gtk_container_remove (GTK_CONTAINER (self->rows), row);
+ if (IDE_IS_OMNI_SEARCH_ROW (row))
+ {
+ g_object_set_qdata (G_OBJECT (result), quarkRow, NULL);
+ gtk_widget_destroy (row);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]