[gnome-control-center/wip/gbsneto/new-keyboard-panel: 3/19] panel: add a autocleanup function
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/new-keyboard-panel: 3/19] panel: add a autocleanup function
- Date: Thu, 21 Jul 2016 22:54:00 +0000 (UTC)
commit 9d93585fe45f1277df1fb07b078bf01661d24f05
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jun 14 14:54:03 2016 -0300
panel: add a autocleanup function
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-panel.h b/shell/cc-panel.h
index ef77e91..6253d27 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]