From 61d7abe795b4434fd1ae3d28aed8b9d86180bba3 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 14 Jun 2016 14:54:03 -0300 Subject: [PATCH] shell: add a autocleanup function to CcPanel CcPanel uses the old boilerplate code from GLib, which does not set an autocleanup function. The lack of a cleanup function implies that panels cannot use G_DECLARE_{FINAL,DERIVABLE}_TYPE, making the code stick to the old boilerplate. This patch adds a cleanup function to CcPanel. It doesn't move CcPanel to G_DECLARE_DERIVABLE_TYPE() because it'd break the CcPanel's subclasses. https://bugzilla.gnome.org/show_bug.cgi?id=769063 --- shell/cc-panel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/cc-panel.h b/shell/cc-panel.h index ef77e9111..6253d2736 100644 --- a/shell/cc-panel.h +++ b/shell/cc-panel.h @@ -50,6 +50,8 @@ typedef struct CcPanelPrivate CcPanelPrivate; typedef struct _CcPanel CcPanel; typedef struct _CcPanelClass CcPanelClass; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (CcPanel, g_object_unref) + /* cc-shell.h requires CcPanel, so make sure it is defined first */ #include "cc-shell.h"