[gnome-software: 1/13] gs-category-tile: Use dispose() for cleanup rather than destroy()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/13] gs-category-tile: Use dispose() for cleanup rather than destroy()
- Date: Fri, 6 Aug 2021 16:50:51 +0000 (UTC)
commit fa36e39cbde3907e3b1c6d71fbb25fef11233179
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Jul 29 14:32:20 2021 +0100
gs-category-tile: Use dispose() for cleanup rather than destroy()
It’s more conventional.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
src/gs-category-tile.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-category-tile.c b/src/gs-category-tile.c
index eb35e67dd..17fab7355 100644
--- a/src/gs-category-tile.c
+++ b/src/gs-category-tile.c
@@ -52,13 +52,13 @@ gs_category_tile_set_category (GsCategoryTile *tile, GsCategory *cat)
}
static void
-gs_category_tile_destroy (GtkWidget *widget)
+gs_category_tile_dispose (GObject *object)
{
- GsCategoryTile *tile = GS_CATEGORY_TILE (widget);
+ GsCategoryTile *tile = GS_CATEGORY_TILE (object);
g_clear_object (&tile->cat);
- GTK_WIDGET_CLASS (gs_category_tile_parent_class)->destroy (widget);
+ G_OBJECT_CLASS (gs_category_tile_parent_class)->dispose (object);
}
static void
@@ -71,9 +71,10 @@ gs_category_tile_init (GsCategoryTile *tile)
static void
gs_category_tile_class_init (GsCategoryTileClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- widget_class->destroy = gs_category_tile_destroy;
+ object_class->dispose = gs_category_tile_dispose;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-category-tile.ui");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]